public interface DataObjectMetadata extends MetadataCommon
References the data object class and contains lists of all the attributes, collections, and relationships within the class.
Modifier and Type | Method and Description |
---|---|
DataObjectAttribute |
getAttribute(String attributeName)
Gets attribute metadata.
|
List<DataObjectAttribute> |
getAttributes()
Gets attributes defined on the data object.
|
Collection<UifAutoCreateViewType> |
getAutoCreateUifViewTypes()
BETA: Gets auto create uif view types.
|
List<String> |
getBusinessKeyAttributeNames()
List of attribute names which form a "user friendly" key.
|
DataObjectCollection |
getCollection(String collectionName)
Gets the named collection's metadata from the data object.
|
List<DataObjectCollection> |
getCollections()
Gets child collections.
|
String |
getPrimaryDisplayAttributeName()
Gets primary display attribute name
|
List<String> |
getPrimaryKeyAttributeNames()
Get the list of primary key attribute names for this data object.
|
DataObjectRelationship |
getRelationship(String relationshipName)
Gets the named relationship's metadata from the data object.
|
DataObjectRelationship |
getRelationshipByLastAttributeInRelationship(String attributeName)
Gets relationship of last attribute.
|
List<DataObjectRelationship> |
getRelationships()
Gets child relationships.
|
List<DataObjectRelationship> |
getRelationshipsInvolvingAttribute(String attributeName)
Gets attribute relationships.
|
Class<?> |
getType()
Gets metadata object type.
|
Boolean |
hasDistinctBusinessKey()
Returns true if the list of primary key names and business key attribute names are different.
|
boolean |
isSupportsOptimisticLocking()
Determines whether optimistic locking is supported.
|
boolean |
shouldAutoCreateUifViewOfType(UifAutoCreateViewType viewType)
BETA: Determines where view type should be auto created.
|
getBackingObjectName, getDescription, getLabel, getMergeAction, getName, getShortLabel, isReadOnly
Class<?> getType()
The type represented by this metadata object. Usually this will simply contain the class name created by the persistence layer when it is loaded from the database.
List<DataObjectAttribute> getAttributes()
Gets all the attributes defined on the data object in the order given by the MetadataProvider. This may or may not be the same as the backing object's (table) and is most likely the order in which they appear in the source persistence metadata (XML or annotations).
List<DataObjectCollection> getCollections()
Gets all the child collections defined on the data object in the order given by the MetadataProvider.
List<DataObjectRelationship> getRelationships()
Gets all the child relationships defined on the data object in the order given by the MetadataProvider.
DataObjectAttribute getAttribute(String attributeName)
Get the named attribute's metadata from the data object.
DataObjectAttribute
otherwise.DataObjectCollection getCollection(String collectionName)
The name is the property on the data object which holds
the Collection
.
DataObjectCollection
otherwise.DataObjectRelationship getRelationship(String relationshipName)
The name is the property on the data object which holds the related business object's instance.
DataObjectRelationship
otherwise.List<DataObjectRelationship> getRelationshipsInvolvingAttribute(String attributeName)
Returns all relationships of which the given attribute is part of the foreign key relationship.
DataObjectRelationship getRelationshipByLastAttributeInRelationship(String attributeName)
Returns a single relationship for which the given attribute is the last in the foreign key relationship.
DataObjectRelationship
otherwise.List<String> getPrimaryKeyAttributeNames()
List<String> getBusinessKeyAttributeNames()
An example here would be the KIM Role object where the Role ID is the primary key, but the Namespace and Name properties form the user-visible and enterable key.
Boolean hasDistinctBusinessKey()
String getPrimaryDisplayAttributeName()
This is the field on the object which best represents it on displays. It will be used to build inquiry links and determine where to place quickfinder links. Usually this will be the the primary key or the last field of the primary key if there are multiple fields.
If not specified by the provider, the base implementation will default it to the last attribute in the primaryKeyAttributeNames list.
boolean isSupportsOptimisticLocking()
Returns true if the underlying ORM tool performs optimistic locking checks on this object before saving. Under the KNS, this was done via the versionNumber property and appropriate OJB configuration. In JPA, this is linked to the @Version annotation.
@Beta Collection<UifAutoCreateViewType> getAutoCreateUifViewTypes()
Returns collections of uif view types that should be auto created.
@Beta boolean shouldAutoCreateUifViewOfType(UifAutoCreateViewType viewType)
Determines whether the specified uif view type can be auto created.
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.