Class RelationshipDefinition
java.lang.Object
org.kuali.rice.krad.datadictionary.DictionaryBeanBase
org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase
org.kuali.rice.krad.datadictionary.RelationshipDefinition
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DataDictionaryDefinition,DictionaryBean
A single Relationship definition in the DataDictionary, which contains information concerning which primitive
attributes of this
class can be used to retrieve an instance of some related Object instance
The relationship element defines how primitive attributes of this
class can be used to retrieve an instance of some related Object instance
DD: See RelationshipDefinition.java.
JSTL: relationship is a Map which is accessed using a key which is the
objectAttributeName of a relationship. The map contains a single entry
with a key of "primitiveAttributes" and value which is an attributesMap ExportMap.
The attributesMap ExportMap contains the following keys:
0 (for first primitiveAttribute)
1 (for second primitiveAttribute)
etc.
The corresponding value for each entry is an primitiveAttribute ExportMap
which contains the following keys:
"sourceName"
"targetName"
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected List<PrimitiveAttributeDefinition> protected Class<?> protected List<SupportAttributeDefinition> protected Class<?> For 1:1 relationships, this class represents the type of the reference class.Fields inherited from class org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase
embeddedDataObjectMetadata, generatedFromMetadata, idFields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompleteValidation(Class rootBusinessObjectClass, Class otherBusinessObjectClass) Deprecated.voidcompleteValidation(Class rootBusinessObjectClass, Class otherBusinessObjectClass, ValidationTrace tracer) Directly validate simple fieldsvoidPerform any needed post-processing of the bean properties.Class<?> Class<?> Returns thetargetClassbooleanvoidsetObjectAttributeName(String objectAttributeName) Name of the business object property on the containing business object that is linked by the contained PrimitiveAttributeDefinition objects.voidsetPrimitiveAttributes(List<PrimitiveAttributeDefinition> primitiveAttributes) The primitiveAttribute element identifies one pair of corresponding fields in the primary business object and the related business object.voidsetSourceClass(Class<?> sourceClass) voidsetSupportAttributes(List<SupportAttributeDefinition> supportAttributes) Support attributes define additional attributes that can be used to generate lookup field conversions and lookup parameters.voidsetTargetClass(Class<?> targetClass) Sets thetargetClasstoString()Methods inherited from class org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase
getId, hasEmbeddedDataObjectMetadata, setEmbeddedDataObjectMetadata, setGeneratedFromMetadata, setId, wasGeneratedFromMetadataMethods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
clone, copy, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCodeMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
getComponentCode, getNamespaceCode
-
Field Details
-
objectAttributeName
-
sourceClass
-
targetClass
For 1:1 relationships, this class represents the type of the reference class. For 1:n references, this class represents the type of the element of the collection -
primitiveAttributes
-
supportAttributes
-
-
Constructor Details
-
RelationshipDefinition
public RelationshipDefinition()
-
-
Method Details
-
getObjectAttributeName
-
getSourceClass
-
getTargetClass
Returns thetargetClass -
setTargetClass
Sets thetargetClass- Parameters:
targetClass-
-
setObjectAttributeName
Name of the business object property on the containing business object that is linked by the contained PrimitiveAttributeDefinition objects. -
getPrimitiveAttributes
-
getSupportAttributes
-
hasIdentifier
public boolean hasIdentifier() -
getIdentifier
-
dataDictionaryPostProcessing
public void dataDictionaryPostProcessing()Description copied from interface:DictionaryBeanPerform any needed post-processing of the bean properties. This will be called starting at the parent data object entry or document entry class and recursed down though all other DictionaryBean objects contained within.- Specified by:
dataDictionaryPostProcessingin interfaceDictionaryBean- Overrides:
dataDictionaryPostProcessingin classDictionaryBeanBase
-
completeValidation
@Deprecated public void completeValidation(Class rootBusinessObjectClass, Class otherBusinessObjectClass) Deprecated.Directly validate simple fields, call completeValidation on Definition fields.- Specified by:
completeValidationin interfaceDataDictionaryDefinition- Overrides:
completeValidationin classDataDictionaryDefinitionBase- Parameters:
rootBusinessObjectClass- Class of the BusinessObjectEntry which ultimately contains this definitionotherBusinessObjectClass- other stuff required to complete validation- See Also:
-
completeValidation
public void completeValidation(Class rootBusinessObjectClass, Class otherBusinessObjectClass, ValidationTrace tracer) Directly validate simple fields- Specified by:
completeValidationin interfaceDataDictionaryDefinition- Overrides:
completeValidationin classDataDictionaryDefinitionBase- Parameters:
rootBusinessObjectClass- Class of the BusinessObjectEntry which ultimately contains this definitionotherBusinessObjectClass- other stuff required to complete validationtracer-ValidationTraceclass used to track what was being validated at the time of any problems discovered- See Also:
-
setPrimitiveAttributes
The primitiveAttribute element identifies one pair of corresponding fields in the primary business object and the related business object. JSTL: primitiveAttribute is a Map which is accessed by the sequential key of "0", "1", etc. Each entry contains the following keys: sourceName (String) targetName (String) The value corresponding to the sourceName key is the attribute name defined for the primary business object. The value corresponding to the targetName key is the attribute name for the object being referenced by objectAttributeName. -
setSupportAttributes
Support attributes define additional attributes that can be used to generate lookup field conversions and lookup parameters. Field conversions and lookup parameters are normally generated using foreign key relationships defined within OJB and the DD. Because Person objects are linked in a special way (i.e. they may come from an external data source and not from the DB, such as LDAP), it is often necessary to define extra fields that are related to each other, sort of like a supplemental foreign key. sourceName is the name of the POJO property of the business object targetName is the name of attribute that corresponds to the sourceName in the looked up BO identifier when true, only the field marked as an identifier will be passed in as a lookup parameter at most one supportAttribute for each relationship should be defined as identifier="true" -
setSourceClass
- Parameters:
sourceClass- the sourceClass to set
-
toString
-