Package com.blazebit.persistence.view
Annotation Type CollectionMapping
Specifies the behavior of a collection mapping. This can be used to configure ordering, uniqueness and the sort order.
The default sort order of
SortedSet and SortedMap is the natural order. By using this annotation, the sort order can be overridden.- Since:
- 1.0.0
- Author:
- Christian Beikov
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<? extends Comparator>The comparator that should be used for sorting of the collection.booleanSpecifies whether the elements should be forcefully deduplicated if the collection allows duplicates or not.booleanSpecifies whether the index of the indexed collection should be ignored or not.booleanSpecifies whether entries in the collection should be ordered.
-
Element Details
-
comparator
Class<? extends Comparator> comparatorThe comparator that should be used for sorting of the collection.- Returns:
- the comparator used for sorting
- Default:
- java.util.Comparator.class
-
ordered
boolean orderedSpecifies whether entries in the collection should be ordered.- Returns:
- true if ordered, false otherwise
- Default:
- false
-
ignoreIndex
boolean ignoreIndexSpecifies whether the index of the indexed collection should be ignored or not.- Returns:
- true if the index should be ignored, false otherwise
- Default:
- false
-
forceUnique
boolean forceUniqueSpecifies whether the elements should be forcefully deduplicated if the collection allows duplicates or not.- Returns:
- true if the elements should be forcefully deduplicated, false otherwise
- Default:
- false
-