org.kuali.rice.krad.data.metadata.impl
Class DataObjectCollectionImpl

java.lang.Object
  extended by org.kuali.rice.krad.data.metadata.impl.MetadataCommonBase
      extended by org.kuali.rice.krad.data.metadata.impl.MetadataChildBase
          extended by org.kuali.rice.krad.data.metadata.impl.DataObjectCollectionImpl
All Implemented Interfaces:
Serializable, DataObjectCollection, MetadataCommonInternal, MetadataChild, MetadataCommon

public class DataObjectCollectionImpl
extends MetadataChildBase
implements DataObjectCollection

Collection meta data.

Implementation that represents the meta data for a collection in a data object.

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Field Summary
protected  List<DataObjectCollectionSortAttribute> defaultOrdering
           
protected  String elementLabel
           
protected  DataObjectCollection embeddedCollection
           
protected  Boolean indirectCollection
           
protected  Long maxItems
           
protected  Long minItems
           
 
Fields inherited from class org.kuali.rice.krad.data.metadata.impl.MetadataChildBase
attributeRelationships, deletedWithParent, embeddedMetadataChild, inverseRelationship, loadedAtParentLoadTime, loadedDynamicallyUponUse, relatedType, savedWithParent
 
Fields inherited from class org.kuali.rice.krad.data.metadata.impl.MetadataCommonBase
backingObjectName, description, embeddedCommonMetadata, label, mergeAction, name, readOnly, shortLabel
 
Constructor Summary
DataObjectCollectionImpl()
           
 
Method Summary
 List<DataObjectCollectionSortAttribute> getDefaultOrdering()
          Gets the default ordering of a collection.
 String getElementLabel()
          The elementLabel defines the name to be used for a single object within the collection.
 DataObjectCollection getEmbeddedCollection()
          Gets the embedded collection.
 Long getMaxItems()
          The maximum number of items which may be in the collection.
 Long getMinItems()
          Gets the minimum number of items which may be in the collection.
 boolean isIndirectCollection()
          Determines whether a linked objected is used.
 void setDefaultCollectionOrderingAttributeNames(List<DataObjectCollectionSortAttribute> defaultCollectionOrdering)
          Sets attribute that the default order of the collection.
 void setElementLabel(String elementLabel)
          Sets name used for single object within collection.
 void setEmbeddedCollection(DataObjectCollection embeddedCollection)
           
 void setIndirectCollection(boolean indirectCollection)
          Sets whether linked item is used.
 void setMaxItemsInCollection(Long maxOccurs)
          Sets maximum items in collection.
 void setMinItemsInCollection(Long minOccurs)
          Sets minimum items in collection.
 
Methods inherited from class org.kuali.rice.krad.data.metadata.impl.MetadataChildBase
getAttributeRelationships, getEmbeddedMetadataChild, getInverseRelationship, getParentAttributeNameRelatedToChildAttributeName, getRelatedType, isDeletedWithParent, isLoadedAtParentLoadTime, isLoadedDynamicallyUponUse, isSavedWithParent, setAttributeRelationships, setDeletedWithParent, setEmbeddedMetadataChild, setInverseRelationship, setLoadedAtParentLoadTime, setLoadedDynamicallyUponUse, setRelatedType, setSavedWithParent, toString
 
Methods inherited from class org.kuali.rice.krad.data.metadata.impl.MetadataCommonBase
getBackingObjectName, getDescription, getEmbeddedCommonMetadata, getLabel, getLabelFromPropertyName, getMergeAction, getName, getShortLabel, getUniqueKeyForMerging, isReadOnly, mergeLists, setBackingObjectName, setDescription, setEmbeddedCommonMetadata, setLabel, setMergeAction, setName, setReadOnly, setShortLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.data.metadata.MetadataChild
getAttributeRelationships, getInverseRelationship, getParentAttributeNameRelatedToChildAttributeName, getRelatedType, isDeletedWithParent, isLoadedAtParentLoadTime, isLoadedDynamicallyUponUse, isSavedWithParent
 
Methods inherited from interface org.kuali.rice.krad.data.metadata.MetadataCommon
getBackingObjectName, getDescription, getLabel, getMergeAction, getName, getShortLabel, isReadOnly
 

Field Detail

embeddedCollection

protected DataObjectCollection embeddedCollection

elementLabel

protected String elementLabel

minItems

protected Long minItems

maxItems

protected Long maxItems

defaultOrdering

protected List<DataObjectCollectionSortAttribute> defaultOrdering

indirectCollection

protected Boolean indirectCollection
Constructor Detail

DataObjectCollectionImpl

public DataObjectCollectionImpl()
Method Detail

getElementLabel

public String getElementLabel()
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.

Specified by:
getElementLabel in interface DataObjectCollection

setElementLabel

public void setElementLabel(String elementLabel)
Sets name used for single object within collection.

Parameters:
elementLabel - single object name

getMinItems

public Long getMinItems()
Description copied from interface: DataObjectCollection
Gets the minimum number of items which may be in the collection.

This is an optional attribute and may not be set by the metadata provider.

Specified by:
getMinItems in interface DataObjectCollection
Returns:
The minimum number of items which must be in this collection or null if unset.

setMinItemsInCollection

public void setMinItemsInCollection(Long minOccurs)
Sets minimum items in collection.

Parameters:
minOccurs - minimum items in collection.

getMaxItems

public Long getMaxItems()
The maximum number of items which may be in the collection.

This is an optional attribute and may not be set by the metadata provider.

Specified by:
getMaxItems in interface DataObjectCollection
Returns:
The maximum number of items which may be in this collection or null if unset.

setMaxItemsInCollection

public void setMaxItemsInCollection(Long maxOccurs)
Sets maximum items in collection.

Parameters:
maxOccurs - maximum items in collection.

getDefaultOrdering

public List<DataObjectCollectionSortAttribute> getDefaultOrdering()
Gets the default ordering of a collection.

The default ordering of collection items as specified by the metadata provider.

Specified by:
getDefaultOrdering in interface DataObjectCollection
Returns:
The list of fields in order by which to sort, or an empty list if none specified.

setDefaultCollectionOrderingAttributeNames

public void setDefaultCollectionOrderingAttributeNames(List<DataObjectCollectionSortAttribute> defaultCollectionOrdering)
Sets attribute that the default order of the collection.

Parameters:
defaultCollectionOrdering - attribute name

isIndirectCollection

public boolean isIndirectCollection()
Determines whether a linked objected is used.

Whether the referenced collection uses a linking object in the underlying implementation. (In case that is somehow important to using code.).

Specified by:
isIndirectCollection in interface DataObjectCollection
Returns:
whether a linked object is used

setIndirectCollection

public void setIndirectCollection(boolean indirectCollection)
Sets whether linked item is used.

Parameters:
indirectCollection - whether link item used.

getEmbeddedCollection

public DataObjectCollection getEmbeddedCollection()
Gets the embedded collection.

Returns:
the embedded collection, if it exists.

setEmbeddedCollection

public void setEmbeddedCollection(DataObjectCollection embeddedCollection)


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.