Class CollectionDefinition
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DataDictionaryDefinition,DictionaryBean,CollectionSizeConstrainable,Constrainable,CollectionSizeConstraint,Constraint
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 Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected org.kuali.rice.krad.data.metadata.DataObjectCollectionprotected Stringprotected Stringprotected Stringprotected Integerprotected Integerprotected Stringprotected Stringprotected StringFields 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 fields, call completeValidation on Definition fields.gets the data object classorg.kuali.rice.krad.data.metadata.DataObjectCollectiongets the descriptionGets the elementLabel attributegetLabel()gets the labelgets maximum amount of items in this collectiongets the minimum amount of items in this collectiongetName()gets the name of the collection (collection property on owning data object)gets the short labelgets the summaryvoidsetDataObjectClass(String dataObjectClass) sets the data object classvoidsetDataObjectCollection(org.kuali.rice.krad.data.metadata.DataObjectCollection dataObjectCollection) voidsetDescription(String description) sets the descriptionvoidsetElementLabel(String elementLabel) gets the element labelvoidsets the labelvoidsetMaxOccurs(Integer maxOccurs) sets maximum amount of items in this collectionvoidsetMinOccurs(Integer minOccurs) gets the minimum amount of items in this collectionvoidsets the name of the collectionvoidsetShortLabel(String shortLabel) sets the short labelvoidsetSummary(String summary) gets the summaryMethods 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, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCodeMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode
-
Field Details
-
dataObjectCollection
protected org.kuali.rice.krad.data.metadata.DataObjectCollection dataObjectCollection -
dataObjectClass
-
name
-
label
-
shortLabel
-
elementLabel
-
summary
-
description
-
minOccurs
-
maxOccurs
-
-
Constructor Details
-
CollectionDefinition
public CollectionDefinition()default constructor
-
-
Method Details
-
getName
gets the name of the collection (collection property on owning data object)- Specified by:
getNamein interfaceConstrainable- Returns:
- the collection name
-
setName
sets the name of the collection- Parameters:
name- - the collection name- Throws:
IllegalArgumentException- if the name is blank
-
getLabel
gets the label- Returns:
- the label
-
setLabel
sets the label- Parameters:
label- - a descriptive string to use for a label
-
getShortLabel
gets the short label- Returns:
- the shortLabel, or the label if no shortLabel has been set
-
setShortLabel
sets the short label- Parameters:
shortLabel- - the short label- Throws:
IllegalArgumentException- whenshortLabelis blank
-
getElementLabel
Gets the elementLabel attribute- Returns:
- the element Label
-
setElementLabel
gets the element labelThe 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
gets the summarysummary 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
gets the summary -
getDescription
gets the descriptionThe 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
sets the description- Parameters:
description- - the description to set
-
getDataObjectClass
gets the data object classThis is the Java class type of the object contained in this collection
- Returns:
- the dataObjectClass
-
setDataObjectClass
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:
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, 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 validationtracer-ValidationTraceclass used to track what was being validated at the time of any problems discovered- See Also:
-
getMaximumNumberOfElements
- Specified by:
getMaximumNumberOfElementsin interfaceCollectionSizeConstraint- See Also:
-
getMinimumNumberOfElements
- Specified by:
getMinimumNumberOfElementsin interfaceCollectionSizeConstraint- See Also:
-
getMinOccurs
gets the minimum amount of items in this collection- Returns:
- the minOccurs
-
setMinOccurs
gets the minimum amount of items in this collection- Parameters:
minOccurs- the minOccurs to set
-
getMaxOccurs
gets maximum amount of items in this collection- Returns:
- the maxOccurs
-
setMaxOccurs
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)
-