Package org.hibernate.annotations
Annotation Type SortNatural
-
@Target({METHOD,FIELD}) @Retention(RUNTIME) public @interface SortNatural
Sort aSet
orMap
in itsnatural order
Sorting is performed in memory, by Java's
TreeSet
orTreeMap
, and is maintained by any operation that mutates the collection.- Use
SortComparator
to sort the collection in memory using aComparator
. - 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
SortNatural
andSortComparator
.- See Also:
SortComparator
,OrderBy
,SQLOrder
- Use