View Javadoc

1   package org.kuali.rice.krad.data.metadata;
2   
3   import java.util.List;
4   
5   /**
6    * Represents the metadata for a collection within a data object.
7    * 
8    * @author Kuali Rice Team (rice.collab@kuali.org)
9    */
10  public interface DataObjectCollection extends MetadataChild {
11  
12  	/**
13  	 * The elementLabel defines the name to be used for a single object within the collection.
14  	 * 
15  	 * For example: "Address" may be the name of one object within the "Addresses" collection.
16  	 */
17  	String getElementLabel();
18  
19  	/**
20  	 * The minimum number of items which may be in the collection.
21  	 * 
22  	 * This is an optional attribute and may not be set by the metadata provider.
23  	 * 
24  	 * @return The minimum number of items which must be in this collection or <b>null</b> if unset.
25  	 */
26  	Long getMinItems();
27  
28  	/**
29  	 * The maximum number of items which may be in the collection.
30  	 * 
31  	 * This is an optional attribute and may not be set by the metadata provider.
32  	 * 
33  	 * @return The maximum number of items which may be in this collection or <b>null</b> if unset.
34  	 */
35  	Long getMaxItems();
36  
37  	/**
38  	 * The default ordering of collection items as specified by the metadata provider.
39  	 * 
40  	 * @return The list of fields in order by which to sort, or an empty list if none specified.
41  	 */
42  	List<DataObjectCollectionSortAttribute> getDefaultOrdering();
43  
44  	/**
45  	 * Whether the referenced collection uses a linking object in the underlying implementation. (In case that is
46  	 * somehow important to using code.)
47  	 */
48  	boolean isIndirectCollection();
49  }