Class DataDictionaryEntryBase

java.lang.Object
org.kuali.rice.krad.datadictionary.DictionaryBeanBase
org.kuali.rice.krad.datadictionary.DataDictionaryEntryBase
All Implemented Interfaces:
Serializable, Cloneable, Copyable, DataDictionaryEntry, DictionaryBean
Direct Known Subclasses:
DataObjectEntry, DocumentEntry

public abstract class DataDictionaryEntryBase extends DictionaryBeanBase implements DataDictionaryEntry, Serializable
Contains common properties and methods for data dictionary entries
Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
  • Field Details

  • Constructor Details

    • DataDictionaryEntryBase

      public DataDictionaryEntryBase()
  • Method Details

    • getEntryClass

      public abstract Class<?> getEntryClass()
    • getAttributeDefinition

      public AttributeDefinition getAttributeDefinition(String attributeName)
      Specified by:
      getAttributeDefinition in interface DataDictionaryEntry
      Parameters:
      attributeName -
      Returns:
      AttributeDefinition with the given name, or null if none with that name exists
    • getAttributes

      public List<AttributeDefinition> getAttributes()
      Returns:
      a Map containing all AttributeDefinitions associated with this BusinessObjectEntry, indexed by attributeName
    • getComplexAttributes

      public List<ComplexAttributeDefinition> getComplexAttributes()
      Returns:
      the complexAttributes
    • setComplexAttributes

      public void setComplexAttributes(List<ComplexAttributeDefinition> complexAttributes)
      Parameters:
      complexAttributes - the complexAttributes to set
    • getCollectionDefinition

      public CollectionDefinition getCollectionDefinition(String collectionName)
      Parameters:
      collectionName -
      Returns:
      CollectionDefinition with the given name, or null if none with that name exists
    • getCollections

      public List<CollectionDefinition> getCollections()
      Returns:
      a Map containing all CollectionDefinitions associated with this BusinessObjectEntry, indexed by collectionName
    • getRelationshipDefinition

      public RelationshipDefinition getRelationshipDefinition(String relationshipName)
      Parameters:
      relationshipName -
      Returns:
      RelationshipDefinition with the given name, or null if none with that name exists
    • getRelationships

      public List<RelationshipDefinition> getRelationships()
      Specified by:
      getRelationships in interface DataDictionaryEntry
      Returns:
      a Map containing all RelationshipDefinitions associated with this BusinessObjectEntry, indexed by relationshipName
    • completeValidation

      public void completeValidation()
      Directly validate simple fields, call completeValidation on Definition fields.
      Specified by:
      completeValidation in interface DataDictionaryEntry
    • embedMetadata

      protected void embedMetadata()
    • injectMetadataIntoRelationships

      protected void injectMetadataIntoRelationships(org.kuali.rice.krad.data.metadata.DataObjectMetadata dataObjectMetadata)
      Inject the metadata into the relationship definitions. Unlike attributes, in this case we only add missing relationships. If a relationship was defined for a given attribute we leave it alone.
      Parameters:
      dataObjectMetadata -
    • injectMetadataIntoCollections

      protected void injectMetadataIntoCollections(org.kuali.rice.krad.data.metadata.DataObjectMetadata dataObjectMetadata)
    • injectMetadataIntoAttributes

      protected void injectMetadataIntoAttributes(org.kuali.rice.krad.data.metadata.DataObjectMetadata dataObjectMetadata)
    • dataDictionaryPostProcessing

      public void dataDictionaryPostProcessing()
      Description copied from interface: DictionaryBean
      Perform 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:
      dataDictionaryPostProcessing in interface DictionaryBean
      Overrides:
      dataDictionaryPostProcessing in class DictionaryBeanBase
    • completeValidation

      public void completeValidation(ValidationTrace tracer)
      Directly validate simple fields, call completeValidation on Definition fields.
      Specified by:
      completeValidation in interface DataDictionaryEntry
      Parameters:
      tracer - - Record of object's location
      See Also:
    • setAttributes

      public void setAttributes(List<AttributeDefinition> attributes)
      The attributes element contains attribute elements. These define the specifications for business object fields. JSTL: attributes is a Map which is accessed by a key of "attributes". This map contains entries with the following keys: attributeName of first attribute attributeName of second attribute etc. The corresponding value for each entry is an attribute ExportMap. By the time the JSTL export happens, all attributeReferences will be indistinguishable from attributes. See AttributesMapBuilder.java The attribute element specifies the way in which a business object field appears on a screen for data entry or display purposes. These specifications include the following: The title and formatting of the field Descriptive information about the field The edits used at time of data-entry DD: See AttributeDefinition.java JSTL: attribute is a Map which is accessed using a key which is the attributeName of an attribute. Each entry contains the following keys: name (String) forceUppercase (boolean String) label (String) shortLabel (String, copied from label if not present) maxLength (String) exclusiveMin (bigdecimal String) exclusiveMax (bigdecimal String) validationPattern (Map, optional) required (boolean String) control (Map) summary (String) description (String) formatterClass (String, optional) fullClassName (String) displayWorkgroup(String, optional) displayMaskClass(String, optional) See AttributesMapBuilder.java Note: exclusiveMax is mapped from the inclusiveMax element! The validation logic seems to be assuming inclusiveMax.
    • setCollections

      public void setCollections(List<CollectionDefinition> collections)
      The collections element contains collection elements. These define the lists of other business objects which are related to and defined in the business objects. JSTL: collections is a Map which is accessed by a key of "collections". This map contains entries with the following keys: name of first collection name of second collection etc. The corresponding value for each entry is a collection ExportMap. The collection element defines the name and description a list of objects related to the business object. DD: See CollectionDefinition.java. JSTL: collection is a Map which is accessed using a key which is the name of the collection. Each entry contains the following keys: name (String) label (String) shortLabel (String, copied from label if missing) elementLabel (String, copied from contained class if missing) summary (String) description (String) See CollectionsMapBuilder.java.
    • setRelationships

      public void setRelationships(List<RelationshipDefinition> relationships)
      The relationships element contains relationship elements. These are used to map attribute names to fields in a reference object. JSTL: relationships is a Map which is accessed by a key of "relationships". This map contains entries with the following keys: objectAttributeName of first relationship objectAttributeName of second relationship etc. The corresponding value for each entry is a relationship ExportMap. 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 RelationshipsMapBuilder.java.
    • getCollectionNames

      public Set<String> getCollectionNames()
    • getAttributeNames

      public Set<String> getAttributeNames()
    • getRelationshipNames

      public Set<String> getRelationshipNames()
    • getStateMapping

      public StateMapping getStateMapping()
      Description copied from interface: DataDictionaryEntry
      StateMapping for this DataDictionaryEntry, this represents the states of this entry, their names, and where to find the state information on the model
      Specified by:
      getStateMapping in interface DataDictionaryEntry
      Returns:
      StateMapping object
      See Also:
    • setStateMapping

      public void setStateMapping(StateMapping stateMapping)
      Description copied from interface: DataDictionaryEntry
      Set the StateMapping object which represents state information for this entry
      Specified by:
      setStateMapping in interface DataDictionaryEntry
      Parameters:
      stateMapping - StateMapping object
      See Also:
    • hasEmbeddedDataObjectMetadata

      public boolean hasEmbeddedDataObjectMetadata()
    • getDataObjectMetadata

      public org.kuali.rice.krad.data.metadata.DataObjectMetadata getDataObjectMetadata()
    • setDataObjectMetadata

      public void setDataObjectMetadata(org.kuali.rice.krad.data.metadata.DataObjectMetadata dataObjectMetadata)
    • getRelationshipMap

      public Map<String,RelationshipDefinition> getRelationshipMap()
    • setRelationshipMap

      public void setRelationshipMap(Map<String,RelationshipDefinition> relationshipMap)