org.kuali.rice.krad.datadictionary
Class CollectionDefinition

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.DictionaryBeanBase
      extended by org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase
          extended by org.kuali.rice.krad.datadictionary.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:
Serialized Form

Field Summary
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
           
 
Fields inherited from class org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase
embeddedDataObjectMetadata, generatedFromMetadata, id
 
Fields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCode
 
Constructor Summary
CollectionDefinition()
          default constructor
 
Method Summary
 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
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase
getId, hasEmbeddedDataObjectMetadata, setEmbeddedDataObjectMetadata, setGeneratedFromMetadata, setId, wasGeneratedFromMetadata
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
clone, copy, copyProperties, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, preventModification, setComponentCode, setNamespaceCode
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode
 

Field Detail

dataObjectCollection

protected 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 Detail

CollectionDefinition

public CollectionDefinition()
default constructor

Method Detail

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:
DataDictionaryEntry.completeValidation()

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:
DataDictionaryEntry.completeValidation(org.kuali.rice.krad.datadictionary.validator.ValidationTrace)

getMaximumNumberOfElements

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

getMinimumNumberOfElements

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

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 DataObjectCollection getDataObjectCollection()

setDataObjectCollection

public void setDataObjectCollection(DataObjectCollection dataObjectCollection)


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.