Package org.hibernate.annotations
Annotation Type SortComparator
-
@Target({METHOD,FIELD}) @Retention(RUNTIME) public @interface SortComparator
Sort aSet
orMap
using the givenComparator
.Sorting is performed in memory, by Java's
TreeSet
orTreeMap
, and is maintained by any operation that mutates the collection.- Use
SortNatural
to sort by natural order. - Use
OrderBy
to order using an expression written in HQL. - Use
SQLOrder
to order using an expression written in native SQL.
It is illegal to use both
SortComparator
andSortNatural
.- See Also:
SortComparator
,OrderBy
,SQLOrder
- Use
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description Class<? extends Comparator<?>>
value
A class which implementsComparator<E>
whereE
is the element type.
-
-
-
Element Detail
-
value
Class<? extends Comparator<?>> value
A class which implementsComparator<E>
whereE
is the element type.
-
-