Class CollectionDefinition

All Implemented Interfaces:
Serializable, Cloneable, Copyable, DataDictionaryDefinition, DictionaryBean, CollectionSizeConstrainable, Constrainable, CollectionSizeConstraint, Constraint

public class CollectionDefinition extends DataDictionaryDefinitionBase implements CollectionSizeConstrainable
CollectionDefinition defines a single Collection attribute definition in the DataDictionary

It contains information relating to the display, validation, and general maintenance of a specific Collection attribute of an entry. It helps to provide meaningful labels for collections on a business or data object. It can be used to define collections that are generated at runtime and marked using @Transient in the containing business or data object class.

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
  • Field Details

    • dataObjectCollection

      protected org.kuali.rice.krad.data.metadata.DataObjectCollection dataObjectCollection
    • dataObjectClass

      protected String dataObjectClass
    • name

      protected String name
    • label

      protected String label
    • shortLabel

      protected String shortLabel
    • elementLabel

      protected String elementLabel
    • summary

      protected String summary
    • description

      protected String description
    • minOccurs

      protected Integer minOccurs
    • maxOccurs

      protected Integer maxOccurs
  • Constructor Details

    • CollectionDefinition

      public CollectionDefinition()
      default constructor
  • Method Details

    • getName

      public String getName()
      gets the name of the collection (collection property on owning data object)
      Specified by:
      getName in interface Constrainable
      Returns:
      the collection name
    • setName

      public void setName(String name)
      sets the name of the collection
      Parameters:
      name - - the collection name
      Throws:
      IllegalArgumentException - if the name is blank
    • getLabel

      public String getLabel()
      gets the label
      Returns:
      the label
    • setLabel

      public void setLabel(String label)
      sets the label
      Parameters:
      label - - a descriptive string to use for a label
    • getShortLabel

      public String getShortLabel()
      gets the short label
      Returns:
      the shortLabel, or the label if no shortLabel has been set
    • setShortLabel

      public void setShortLabel(String shortLabel)
      sets the short label
      Parameters:
      shortLabel - - the short label
      Throws:
      IllegalArgumentException - when shortLabel is blank
    • getElementLabel

      public String getElementLabel()
      Gets the elementLabel attribute
      Returns:
      the element Label
    • setElementLabel

      public void setElementLabel(String elementLabel)
      gets the element label

      The elementLabel defines the name to be used for a single object within the collection. For example: "Address" may be the name of one object within the "Addresses" collection.

    • getSummary

      public String getSummary()
      gets the summary

      summary element is used to provide a short description of the attribute or collection. This is designed to be used for help purposes.

      Returns:
      the summary
    • setSummary

      public void setSummary(String summary)
      gets the summary
    • getDescription

      public String getDescription()
      gets the description

      The description element is used to provide a long description of the attribute or collection. This is designed to be used for help purposes.

      Returns:
      the description
    • setDescription

      public void setDescription(String description)
      sets the description
      Parameters:
      description - - the description to set
    • getDataObjectClass

      public String getDataObjectClass()
      gets the data object class

      This is the Java class type of the object contained in this collection

      Returns:
      the dataObjectClass
    • setDataObjectClass

      public void setDataObjectClass(String dataObjectClass)
      sets the data object class
      Parameters:
      dataObjectClass - the dataObjectClass to set
    • completeValidation

      @Deprecated public void completeValidation(Class rootBusinessObjectClass, Class otherBusinessObjectClass)
      Deprecated.
      Directly validate simple fields, call completeValidation on Definition fields
      Specified by:
      completeValidation in interface DataDictionaryDefinition
      Overrides:
      completeValidation in class DataDictionaryDefinitionBase
      Parameters:
      rootBusinessObjectClass - Class of the BusinessObjectEntry which ultimately contains this definition
      otherBusinessObjectClass - other stuff required to complete validation
      See Also:
    • completeValidation

      public void completeValidation(Class rootBusinessObjectClass, Class otherBusinessObjectClass, ValidationTrace tracer)
      Directly validate simple fields, call completeValidation on Definition fields.
      Specified by:
      completeValidation in interface DataDictionaryDefinition
      Overrides:
      completeValidation in class DataDictionaryDefinitionBase
      Parameters:
      rootBusinessObjectClass - Class of the BusinessObjectEntry which ultimately contains this definition
      otherBusinessObjectClass - other stuff required to complete validation
      tracer - ValidationTrace class used to track what was being validated at the time of any problems discovered
      See Also:
    • getMaximumNumberOfElements

      public Integer getMaximumNumberOfElements()
      Specified by:
      getMaximumNumberOfElements in interface CollectionSizeConstraint
      See Also:
    • getMinimumNumberOfElements

      public Integer getMinimumNumberOfElements()
      Specified by:
      getMinimumNumberOfElements in interface CollectionSizeConstraint
      See Also:
    • getMinOccurs

      public Integer getMinOccurs()
      gets the minimum amount of items in this collection
      Returns:
      the minOccurs
    • setMinOccurs

      public void setMinOccurs(Integer minOccurs)
      gets the minimum amount of items in this collection
      Parameters:
      minOccurs - the minOccurs to set
    • getMaxOccurs

      public Integer getMaxOccurs()
      gets maximum amount of items in this collection
      Returns:
      the maxOccurs
    • setMaxOccurs

      public void setMaxOccurs(Integer maxOccurs)
      sets maximum amount of items in this collection
      Parameters:
      maxOccurs - the maxOccurs to set
    • getDataObjectCollection

      public org.kuali.rice.krad.data.metadata.DataObjectCollection getDataObjectCollection()
    • setDataObjectCollection

      public void setDataObjectCollection(org.kuali.rice.krad.data.metadata.DataObjectCollection dataObjectCollection)