Interface DataObjectMetaDataService
- All Known Subinterfaces:
BusinessObjectMetaDataService
- All Known Implementing Classes:
DataObjectMetaDataServiceImpl
Service provides a facade to the various services for retrieving metadata
within the framework, such as the DataDictionaryService and
the PersistenceService
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Method Summary
Modifier and TypeMethodDescriptionbooleanareNotesSupported(Class<?> dataObjectClass) Deprecated.booleanequalsByPrimaryKeys(Object do1, Object do2) Deprecated.useDataObjectWrapper.equalsByPrimaryKey(Object)getDataObjectIdentifierString(Object dataObject) Deprecated.getDataObjectRelationship(Object dataObject, Class<?> dataObjectClass, String attributeName, String attributePrefix, boolean keysOnly, boolean supportsLookup, boolean supportsInquiry) Deprecated.getDataObjectRelationships(Class<?> dataObjectClass) Deprecated.getDictionaryRelationship(Class<?> dataObjectClass, String attributeName) Deprecated.getPrimaryKeyFieldValues(Object dataObject) Deprecated.useDataObjectWrapper.getPrimaryKeyValues()insteadgetPrimaryKeyFieldValues(Object dataObject, boolean sortFieldNames) Deprecated.useDataObjectWrapper.getPrimaryKeyValues()instead, and sort manually if neededgetTitleAttribute(Class<?> dataObjectClass) Deprecated.booleanhasLocalInquiry(Class<?> dataObjectClass) Deprecated.booleanhasLocalLookup(Class<?> dataObjectClass) Deprecated.listPrimaryKeyFieldNames(Class<?> clazz) Deprecated.useDataObjectMetadata.getPrimaryKeyAttributeNames()
-
Method Details
-
listPrimaryKeyFieldNames
Deprecated.useDataObjectMetadata.getPrimaryKeyAttributeNames()Checks the DataDictionary and OJB Repository File to determine the primary fields names for a given class.- Parameters:
clazz- - the Class to check for primary keys- Returns:
- a list of the primary key field names or an empty list if none are found
-
getPrimaryKeyFieldValues
Deprecated.useDataObjectWrapper.getPrimaryKeyValues()insteadDetermines the primary keys for the class of the given object, then for each key field retrieves the value from the object instance and populates the return map with the primary key name as the map key and the object value as the map value- Parameters:
dataObject- - object whose primary key field name,value pairs you want- Returns:
- a Map containing the names and values of fields for the given class which are designated as key fields in the OJB repository file or DataDictionary
- Throws:
IllegalArgumentException- if the given Object is null
-
getPrimaryKeyFieldValues
Deprecated.useDataObjectWrapper.getPrimaryKeyValues()instead, and sort manually if neededDetermines the primary keys for the class of the given object, then for each key field retrieves the value from the object instance and populates the return map with the primary key name as the map key and the object value as the map value- Parameters:
dataObject- - object whose primary key field name,value pairs you wantsortFieldNames- - if true, the returned Map will iterate through its entries sorted by fieldName- Returns:
- a Map containing the names and values of fields for the given class which are designated as key fields in the OJB repository file or DataDictionary
- Throws:
IllegalArgumentException- if the given Object is null
-
equalsByPrimaryKeys
Deprecated.useDataObjectWrapper.equalsByPrimaryKey(Object)Compares two dataObject instances for equality of type and key values using toString() of each value for comparison purposes.- Parameters:
do1-do2-- Returns:
- boolean indicating whether the two objects are equal.
-
getDataObjectRelationship
@Deprecated DataObjectRelationship getDataObjectRelationship(Object dataObject, Class<?> dataObjectClass, String attributeName, String attributePrefix, boolean keysOnly, boolean supportsLookup, boolean supportsInquiry) Deprecated.Attempts to find a relationship for the given attribute within the given data objectFirst the data dictionary is queried to find any relationship definitions setup that include the attribute, if found the
BusinessObjectRetationshipis build from that. If not and the data object class is persistent, relationships are retrieved from the persistence service. Nested attributes are handled in addition to external business objects. If multiple relationships are found, the one that contains the least amount of joining keys is returned- Parameters:
dataObject- - data object instance that contains the attributedataObjectClass- - class for the data object that contains the attributeattributeName- - property name for the attributeattributePrefix- - property prefix for the attributekeysOnly- - indicates whether only primary key fields should be returned in the relationshipsupportsLookup- - indicates whether the relationship should support lookupsupportsInquiry- - indicates whether the relationship should support inquiry- Returns:
- BusinessObjectRelationship for the attribute, or null if not found
-
getDataObjectRelationships
Deprecated.Attempts to find relationships for the given data object classFirst the data dictionary is queried to find any relationship definitions
BusinessObjectRetationshipis build from that. If not and the data object class is persistent, relationships are retrieved from the persistence service. Nested attributes are handled in addition to external business objects. If multiple relationships are found, the one that contains the least amount of joining keys is returned- Parameters:
dataObjectClass- - class for the data object that contains the attribute- Returns:
- List of DataObjectRelationship for the class
-
getDictionaryRelationship
@Deprecated RelationshipDefinition getDictionaryRelationship(Class<?> dataObjectClass, String attributeName) Deprecated.Fetches the RelationshipDefinition for the attribute with the given name within the given class- Parameters:
dataObjectClass- - data object class that contains the attributeattributeName- - property name for the attribute- Returns:
- RelationshipDefinition for the attribute, or null if not found
-
getTitleAttribute
Deprecated.Returns the attribute to be associated with for object level markings. This would be the field chosen for inquiry links etc.- Parameters:
dataObjectClass- - data object class to obtain title attribute of- Returns:
- property name of title attribute or null if data object entry not found
- Throws:
IllegalArgumentException- if the given Class is null
-
areNotesSupported
Deprecated.Indicates whether notes are supported by the given data object class, currently this can only be true for business objects- Parameters:
dataObjectClass- - class for data object to check- Returns:
- boolean true if notes are supported for data object, false if notes are not supported
-
getDataObjectIdentifierString
Deprecated.Builds a string that uniquely identifiers the data object instanceBased on the metadata available for the class of the data object, the values for fields that uniquely identify an instance are concatenated together into one string. For general data objects these fields will be the primary key fields defined in the data dictionary. For the case of objects with type
PersistableBusinessObject, the object id field will be used.- Parameters:
dataObject- - data object instance to build identifier string for- Returns:
- String identifier string for data object
-
hasLocalLookup
Deprecated.Determines whether the given data object class has an associated lookup in the local running application- Parameters:
dataObjectClass- data object class to find lookup for- Returns:
- boolean true if a lookup exists for the data object class, false if not
-
hasLocalInquiry
Deprecated.Determines whether the given data object class has an associated inquiry in the local running application- Parameters:
dataObjectClass- data object class to find inquiry for- Returns:
- boolean true if a inquiry exists for the data object class, false if not
-
MetadataRepositoryinstead