|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataObjectMetaDataService
Provides metadata such as relationships and key fields for data objects
Method Summary | |
---|---|
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. |
BusinessObjectRelationship |
getDataObjectRelationship(Object dataObject,
Class<?> dataObjectClass,
String attributeName,
String attributePrefix,
boolean keysOnly,
boolean supportsLookup,
boolean supportInquiry)
Attempts to find a relationship for the given attribute within the given data object |
RelationshipDefinition |
getDictionaryRelationship(Class<?> dataObjectClass,
String attributeName)
This method fetches the RelationshipDefinition using the parameters. |
Map<String,?> |
getPrimaryKeyFieldValues(Object dataObject)
|
Map<String,?> |
getPrimaryKeyFieldValues(Object dataObject,
boolean sortFieldNames)
|
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. |
Method Detail |
---|
List<String> listPrimaryKeyFieldNames(Class<?> clazz)
clazz
- The Class to check for primary keys
Map<String,?> getPrimaryKeyFieldValues(Object dataObject)
DataObject
- object whose primary key field name,value pairs you want
IllegalArgumentException
- if the given Object is nullMap<String,?> getPrimaryKeyFieldValues(Object dataObject, boolean sortFieldNames)
persistableObject
- object whose primary key field name,value pairs you wantsortFieldNames
- if true, the returned Map will iterate through its entries sorted by fieldName
IllegalArgumentException
- if the given Object is nullboolean equalsByPrimaryKeys(Object do1, Object do2)
do1
- do2
-
BusinessObjectRelationship getDataObjectRelationship(Object dataObject, Class<?> dataObjectClass, String attributeName, String attributePrefix, boolean keysOnly, boolean supportsLookup, boolean supportInquiry)
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 inquiry
RelationshipDefinition getDictionaryRelationship(Class<?> dataObjectClass, String attributeName)
dataObjectClass
- - data object class that contains the attributeattributeName
- - property name for the attribute
String getTitleAttribute(Class<?> dataObjectClass)
dataObjectClass
- - data object class to obtain title attribute of
IllegalArgumentException
- if the given Class is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |