public interface DataObjectMetaDataService
Service provides a facade to the various services for retrieving metadata
within the framework, such as the DataDictionaryService and
the PersistenceService
| Modifier and Type | Method and Description |
|---|---|
boolean |
areNotesSupported(Class<?> dataObjectClass)
Indicates whether notes are supported by the given data object class, currently this
can only be true for business objects
|
boolean |
equalsByPrimaryKeys(Object do1,
Object do2)
Compares two dataObject instances for equality of type and key values using toString()
of each value for comparison purposes.
|
String |
getDataObjectIdentifierString(Object dataObject)
Builds a string that uniquely identifiers the data object instance
|
DataObjectRelationship |
getDataObjectRelationship(Object dataObject,
Class<?> dataObjectClass,
String attributeName,
String attributePrefix,
boolean keysOnly,
boolean supportsLookup,
boolean supportsInquiry)
Attempts to find a relationship for the given attribute within the given
data object
|
List<DataObjectRelationship> |
getDataObjectRelationships(Class<?> dataObjectClass)
Attempts to find relationships for the given data object class
|
RelationshipDefinition |
getDictionaryRelationship(Class<?> dataObjectClass,
String attributeName)
Fetches the RelationshipDefinition for the attribute with the given name within
the given class
|
Map<String,?> |
getPrimaryKeyFieldValues(Object dataObject)
Determines 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
|
Map<String,?> |
getPrimaryKeyFieldValues(Object dataObject,
boolean sortFieldNames)
Determines 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
|
String |
getTitleAttribute(Class<?> dataObjectClass)
Returns the attribute to be associated with for object level markings.
|
List<String> |
listPrimaryKeyFieldNames(Class<?> clazz)
Checks the DataDictionary and OJB Repository File to determine the primary
fields names for a given class.
|
List<String> listPrimaryKeyFieldNames(Class<?> clazz)
clazz - - the Class to check for primary keysMap<String,?> getPrimaryKeyFieldValues(Object dataObject)
dataObject - - object whose primary key field name,value pairs you wantIllegalArgumentException - if the given Object is nullMap<String,?> getPrimaryKeyFieldValues(Object dataObject, boolean sortFieldNames)
dataObject - - object whose primary key field name,value pairs you wantsortFieldNames - - if true, the returned Map will iterate through its entries sorted by fieldNameIllegalArgumentException - if the given Object is nullboolean equalsByPrimaryKeys(Object do1, Object do2)
do1 - do2 - DataObjectRelationship getDataObjectRelationship(Object dataObject, Class<?> dataObjectClass, String attributeName, String attributePrefix, boolean keysOnly, boolean supportsLookup, boolean supportsInquiry)
First the data dictionary is queried to find any relationship definitions
setup that include the attribute, if found the
BusinessObjectRetationship is 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
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 inquiryList<DataObjectRelationship> getDataObjectRelationships(Class<?> dataObjectClass)
First the data dictionary is queried to find any relationship definitions
BusinessObjectRetationship is 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
dataObjectClass - - class for the data object that contains the attributeRelationshipDefinition getDictionaryRelationship(Class<?> dataObjectClass, String attributeName)
dataObjectClass - - data object class that contains the attributeattributeName - - property name for the attributeString getTitleAttribute(Class<?> dataObjectClass)
dataObjectClass - - data object class to obtain title attribute ofIllegalArgumentException - if the given Class is nullboolean areNotesSupported(Class<?> dataObjectClass)
dataObjectClass - - class for data object to checkString getDataObjectIdentifierString(Object dataObject)
Based 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.
dataObject - - data object instance to build identifier string forCopyright © 2005–2016 The Kuali Foundation. All rights reserved.