public class CollectionDefinition extends DataDictionaryDefinitionBase implements CollectionSizeConstrainable
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.
Modifier and Type | Field and Description |
---|---|
protected String |
dataObjectClass |
protected DataObjectCollection |
dataObjectCollection |
protected String |
description |
protected String |
elementLabel |
protected String |
label |
protected Integer |
maxOccurs |
protected Integer |
minOccurs |
protected String |
name |
protected String |
shortLabel |
protected String |
summary |
embeddedDataObjectMetadata, generatedFromMetadata, id
componentCode, namespaceCode
Constructor and Description |
---|
CollectionDefinition()
default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
completeValidation(Class rootBusinessObjectClass,
Class otherBusinessObjectClass)
Deprecated.
|
void |
completeValidation(Class rootBusinessObjectClass,
Class otherBusinessObjectClass,
ValidationTrace tracer)
Directly validate simple fields, call completeValidation on Definition
fields.
|
String |
getDataObjectClass()
gets the data object class
|
DataObjectCollection |
getDataObjectCollection() |
String |
getDescription()
gets the description
|
String |
getElementLabel()
Gets the elementLabel attribute
|
String |
getLabel()
gets the label
|
Integer |
getMaximumNumberOfElements() |
Integer |
getMaxOccurs()
gets maximum amount of items in this collection
|
Integer |
getMinimumNumberOfElements() |
Integer |
getMinOccurs()
gets the minimum amount of items in this collection
|
String |
getName()
gets the name of the collection (collection property on owning data object)
|
String |
getShortLabel()
gets the short label
|
String |
getSummary()
gets the summary
|
void |
setDataObjectClass(String dataObjectClass)
sets the data object class
|
void |
setDataObjectCollection(DataObjectCollection dataObjectCollection) |
void |
setDescription(String description)
sets the description
|
void |
setElementLabel(String elementLabel)
gets the element label
|
void |
setLabel(String label)
sets the label
|
void |
setMaxOccurs(Integer maxOccurs)
sets maximum amount of items in this collection
|
void |
setMinOccurs(Integer minOccurs)
gets the minimum amount of items in this collection
|
void |
setName(String name)
sets the name of the collection
|
void |
setShortLabel(String shortLabel)
sets the short label
|
void |
setSummary(String summary)
gets the summary
|
getId, hasEmbeddedDataObjectMetadata, setEmbeddedDataObjectMetadata, setGeneratedFromMetadata, setId, wasGeneratedFromMetadata
clone, copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode
protected DataObjectCollection dataObjectCollection
protected String dataObjectClass
protected String shortLabel
protected String elementLabel
protected String description
public CollectionDefinition()
public String getName()
getName
in interface Constrainable
public void setName(String name)
name
- - the collection nameIllegalArgumentException
- if the name is blankpublic void setLabel(String label)
label
- - a descriptive string to use for a labelpublic String getShortLabel()
public void setShortLabel(String shortLabel)
shortLabel
- - the short labelIllegalArgumentException
- when shortLabel
is blankpublic String getElementLabel()
public void setElementLabel(String elementLabel)
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.
public String getSummary()
summary element is used to provide a short description of the attribute or collection. This is designed to be used for help purposes.
public void setSummary(String summary)
public String getDescription()
The description element is used to provide a long description of the attribute or collection. This is designed to be used for help purposes.
public void setDescription(String description)
description
- - the description to setpublic String getDataObjectClass()
This is the Java class type of the object contained in this collection
public void setDataObjectClass(String dataObjectClass)
dataObjectClass
- the dataObjectClass to set@Deprecated public void completeValidation(Class rootBusinessObjectClass, Class otherBusinessObjectClass)
completeValidation
in interface DataDictionaryDefinition
completeValidation
in class DataDictionaryDefinitionBase
rootBusinessObjectClass
- Class of the BusinessObjectEntry which ultimately contains this definitionotherBusinessObjectClass
- other stuff required to complete validationDataDictionaryEntry.completeValidation()
public void completeValidation(Class rootBusinessObjectClass, Class otherBusinessObjectClass, ValidationTrace tracer)
completeValidation
in interface DataDictionaryDefinition
completeValidation
in class DataDictionaryDefinitionBase
rootBusinessObjectClass
- Class of the BusinessObjectEntry which ultimately contains this definitionotherBusinessObjectClass
- other stuff required to complete validationtracer
- ValidationTrace
class used to track what was being validated at the time of any problems discoveredDataDictionaryEntry.completeValidation(org.kuali.rice.krad.datadictionary.validator.ValidationTrace)
public Integer getMaximumNumberOfElements()
getMaximumNumberOfElements
in interface CollectionSizeConstraint
CollectionSizeConstraint.getMaximumNumberOfElements()
public Integer getMinimumNumberOfElements()
getMinimumNumberOfElements
in interface CollectionSizeConstraint
CollectionSizeConstraint.getMinimumNumberOfElements()
public Integer getMinOccurs()
public void setMinOccurs(Integer minOccurs)
minOccurs
- the minOccurs to setpublic Integer getMaxOccurs()
public void setMaxOccurs(Integer maxOccurs)
maxOccurs
- the maxOccurs to setpublic DataObjectCollection getDataObjectCollection()
public void setDataObjectCollection(DataObjectCollection dataObjectCollection)
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.