Class MetadataCommonBase

java.lang.Object
org.kuali.rice.krad.data.metadata.impl.MetadataCommonBase
All Implemented Interfaces:
Serializable, MetadataCommonInternal, MetadataCommon
Direct Known Subclasses:
DataObjectAttributeImpl, DataObjectMetadataImpl, MetadataChildBase

public abstract class MetadataCommonBase extends Object implements MetadataCommonInternal
Class defining common attributes on many different components of the metadata (data objects, attributes, etc...)
Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
  • Field Details

    • embeddedCommonMetadata

      protected MetadataCommon embeddedCommonMetadata
    • mergeAction

      protected MetadataMergeAction mergeAction
    • backingObjectName

      protected String backingObjectName
    • name

      protected String name
    • label

      protected String label
    • shortLabel

      protected String shortLabel
    • description

      protected String description
    • readOnly

      protected Boolean readOnly
  • Constructor Details

    • MetadataCommonBase

      public MetadataCommonBase()
  • Method Details

    • getUniqueKeyForMerging

      public Object getUniqueKeyForMerging()
      Returns the object's name without relying on embedded metadata. To override, this name must be set.
      Specified by:
      getUniqueKeyForMerging in interface MetadataCommonInternal
    • getBackingObjectName

      public String getBackingObjectName()
      Description copied from interface: MetadataCommon
      Provider specific name of the persistent storage behind this object type. For a data object, this would likely be the table name. For an attribute, this would be the table column name. It is to be used for reference purposes only. The default implementation will return the name property if none is provided by the metadata providers.
      Specified by:
      getBackingObjectName in interface MetadataCommon
      Returns:
      String representing the backing object. Must not return null.
    • setBackingObjectName

      public void setBackingObjectName(String backingObjectName)
    • getName

      public String getName()
      Description copied from interface: MetadataCommon
      The name of the object as known to the system. This would be the class name, attribute name, etc...
      Specified by:
      getName in interface MetadataCommon
      Returns:
      name
    • setName

      public void setName(String name)
    • getLabel

      public String getLabel()
      Description copied from interface: MetadataCommon
      The user displayed name of the object.
      Specified by:
      getLabel in interface MetadataCommon
      Returns:
      user diplayed name
    • setLabel

      public void setLabel(String label)
    • getShortLabel

      public String getShortLabel()
      Description copied from interface: MetadataCommon
      A shorter version of the user displayed name of the object.
      Specified by:
      getShortLabel in interface MetadataCommon
      Returns:
      short name
    • setShortLabel

      public void setShortLabel(String shortLabel)
    • getDescription

      public String getDescription()
      Description copied from interface: MetadataCommon
      A longer description of the object. This can be used to provide a more complete description of the data object and its purpose. This information can be used when displaying help information to the end-user.
      Specified by:
      getDescription in interface MetadataCommon
      Returns:
      description
    • setDescription

      public void setDescription(String description)
    • isReadOnly

      public boolean isReadOnly()
      Description copied from interface: MetadataCommon
      Whether this metadata object should be considered read-only by calling code.

      That is, the persistence layer is not likely to accept/persist an update to this object, attribute, collection, reference.

      Specified by:
      isReadOnly in interface MetadataCommon
      Returns:
      whether metadata read-only
    • setReadOnly

      public void setReadOnly(boolean readOnly)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getLabelFromPropertyName

      protected String getLabelFromPropertyName(String propertyName)
      Parses the label from the property name.
      Parameters:
      propertyName - the full property name including separators
    • getEmbeddedCommonMetadata

      public MetadataCommon getEmbeddedCommonMetadata()
      Description copied from interface: MetadataCommonInternal
      If this data object instance is wrapping another (generated by a lower metadata provider), return that. Returns null if this instance is not wrapping another.
      Specified by:
      getEmbeddedCommonMetadata in interface MetadataCommonInternal
    • setEmbeddedCommonMetadata

      public void setEmbeddedCommonMetadata(MetadataCommon embeddedCommonMetadata)
      Specified by:
      setEmbeddedCommonMetadata in interface MetadataCommonInternal
    • getMergeAction

      public MetadataMergeAction getMergeAction()
      Description copied from interface: MetadataCommon
      MetadataMergeAction which determines how to handle the embedding of this object when multiple metadata providers are in use.
      Specified by:
      getMergeAction in interface MetadataCommon
      Returns:
      the merge action to use when embedding this metadata when multiple metadata providers are in use
      See Also:
    • setMergeAction

      public void setMergeAction(MetadataMergeAction mergeAction)
    • mergeLists

      protected <T extends MetadataCommon> List<T> mergeLists(List<T> embeddedList, List<T> localList)
      Merges multiple lists into one.

      Merges embedded and locallists.

      Parameters:
      embeddedList - the embedded list.
      localList - the local list.