1 /**
2 * Copyright 2005-2013 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.kuali.rice.krad.data.metadata;
17
18 import java.util.List;
19
20 /**
21 * Represents the metadata for a collection within a data object.
22 *
23 * @author Kuali Rice Team (rice.collab@kuali.org)
24 */
25 public interface DataObjectCollection extends MetadataChild {
26
27 /**
28 * The elementLabel defines the name to be used for a single object within the collection.
29 *
30 * For example: "Address" may be the name of one object within the "Addresses" collection.
31 */
32 String getElementLabel();
33
34 /**
35 * The minimum number of items which may be in the collection.
36 *
37 * This is an optional attribute and may not be set by the metadata provider.
38 *
39 * @return The minimum number of items which must be in this collection or <b>null</b> if unset.
40 */
41 Long getMinItems();
42
43 /**
44 * The maximum number of items which may be in the collection.
45 *
46 * This is an optional attribute and may not be set by the metadata provider.
47 *
48 * @return The maximum number of items which may be in this collection or <b>null</b> if unset.
49 */
50 Long getMaxItems();
51
52 /**
53 * The default ordering of collection items as specified by the metadata provider.
54 *
55 * @return The list of fields in order by which to sort, or an empty list if none specified.
56 */
57 List<DataObjectCollectionSortAttribute> getDefaultOrdering();
58
59 /**
60 * Whether the referenced collection uses a linking object in the underlying implementation. (In case that is
61 * somehow important to using code.)
62 */
63 boolean isIndirectCollection();
64 }