java.lang.Object
org.springframework.data.domain.Sort
org.springframework.data.history.RevisionSort
- All Implemented Interfaces:
Serializable,Iterable<Sort.Order>,Supplier<Stream<Sort.Order>>,Streamable<Sort.Order>
A dedicated
Sort implementation that allows the definition of the ordering of revisions independently of the
property name the revision number is held in.- Since:
- 1.13
- Author:
- Oliver Gierke
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.data.domain.Sort
Sort.Direction, Sort.NullHandling, Sort.Order, Sort.TypedSort<T> -
Field Summary
Fields inherited from class org.springframework.data.domain.Sort
DEFAULT_DIRECTION -
Method Summary
Modifier and TypeMethodDescriptionstatic RevisionSortasc()Creates aRevisionSortwith ascending order for the revision number property, i.e. more recent revisions will come last.static RevisionSortdesc()Creates aRevisionSortwith descending order for the revision number property, i.e. more recent revisions will come first.static Sort.DirectiongetRevisionDirection(Sort sort) Returns in which direction to sort revisions for the givenSortinstance.Methods inherited from class org.springframework.data.domain.Sort
and, ascending, by, by, by, by, descending, doReverse, equals, getOrderFor, hashCode, isEmpty, isSorted, isUnsorted, iterator, reverse, sort, toString, unsortedMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
asc
Creates aRevisionSortwith ascending order for the revision number property, i.e. more recent revisions will come last.- Returns:
-
desc
Creates aRevisionSortwith descending order for the revision number property, i.e. more recent revisions will come first.- Returns:
-
getRevisionDirection
Returns in which direction to sort revisions for the givenSortinstance. Defaults toSort.Direction.ASC.- Parameters:
sort- must not be null.- Returns:
-