Top Description Methods
org.hibernate.annotations

public @Interface Sort

extends Annotation
Annotations
@Target:METHOD, FIELD
@Retention:RUNTIME
@Deprecated
Imports
java.lang.annotation.Retention, .Target

Deprecated

Use SortComparator or SortNatural instead depending on need.

Collection sort (in-memory sorting). Different than ordering, which is applied during the SQL select.
Author
Emmanuel Bernard
See Also
OrderBy

Method Summary

Modifier and TypeMethod and Description
public Class<T>
comparator()

Specifies the comparator to use.

public SortType
type()

Deprecated as a consequence of SortType being deprecated.
The type of sorting to use.
Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

comparatorback to summary
public Class<T> comparator()

Specifies the comparator to use. Only valid when type specifies SortType#COMPARATOR. TODO find a way to use Class<Comparator> -> see HHH-8164

typeback to summary
public SortType type()

Deprecated

as a consequence of SortType being deprecated. See corresponding docs for further information.

The type of sorting to use. The default is to not use sorting.