Annotation Interface CollectionRelationship


@Target(FIELD) @Retention(RUNTIME) @Documented public @interface CollectionRelationship
Defines that the associated Collection field contains a collection of DataObjects.

Analog to the DataObjectCollection metadata.

Author:
Kuali Rice Team (rice.collab@kuali.org)
  • Element Details

    • collectionElementClass

      Class<?> collectionElementClass
      The element type of the collection.

      If the collection contains Generics, it will be derived automatically.

      Returns:
      the element type of the collection.
      Default:
      java.lang.Object.class
    • attributeRelationships

      AttributeRelationship[] attributeRelationships
      The list of attribute relationships linking the parent object and the collection objects.
      Returns:
      list of attribute relationships linking the parent object and the collection objects.
    • sortAttributes

      CollectionSortAttribute[] sortAttributes
      The default sort order for the collection.
      Returns:
      the default sort order for the collection.
      Default:
      {}
    • minItemsInCollection

      long minItemsInCollection
      The minimum items that can appear in the collection.
      Returns:
      lhe minimum items that can appear in the collection.
      Default:
      0L
    • maxItemsInCollection

      long maxItemsInCollection
      The maximum items that can appear in the collection.
      Returns:
      lhe maximum items that can appear in the collection.
      Default:
      9223372036854775807L
    • indirectCollection

      boolean indirectCollection
      Whether this collection uses an indirection table between the parent and collection objects.

      This has no function at present, but is here for informational purposes.

      Returns:
      whether this collection uses an indirection table between the parent and collection objects.
      Default:
      false
    • elementLabel

      String elementLabel
      When needed, how to label each element of the collection.

      This is usually singular. Will default to the label of the contained element type.

      Returns:
      how to label each element of the collection.
      Default:
      ""
    • label

      String label
      The label of the collection itself.

      This is usually plural.

      Returns:
      the label of the collection itself.
      Default:
      ""