Class QSort
java.lang.Object
org.springframework.data.domain.Sort
org.springframework.data.querydsl.QSort
- All Implemented Interfaces:
Serializable,Iterable<Sort.Order>,Supplier<Stream<Sort.Order>>,Streamable<Sort.Order>
Sort option for queries that wraps a Querydsl
OrderSpecifier.- Author:
- Thomas Darimont, Christoph Strobl, Mark Paluch
- 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionand(com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers) Returns a newQSortconsisting of theOrderSpecifiers of the currentQSortcombined with the ones from the givenQSort.static QSortby(com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers) List<com.querydsl.core.types.OrderSpecifier<?>>booleanisEmpty()Returns whether the currentStreamableis empty.static QSortunsorted()Methods inherited from class org.springframework.data.domain.Sort
and, ascending, by, by, by, by, descending, doReverse, equals, getOrderFor, hashCode, isSorted, isUnsorted, iterator, reverse, sort, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
QSort
public QSort(com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers) Creates a newQSortinstance with the givenOrderSpecifiers.- Parameters:
orderSpecifiers- must not be null .
-
QSort
Creates a newQSortinstance with the givenOrderSpecifiers.- Parameters:
orderSpecifiers- must not be null.
-
-
Method Details
-
by
-
unsorted
-
isEmpty
public boolean isEmpty()Description copied from interface:StreamableReturns whether the currentStreamableis empty.- Specified by:
isEmptyin interfaceStreamable<Sort.Order>- Overrides:
isEmptyin classSort- Returns:
-
getOrderSpecifiers
- Returns:
- the orderSpecifier
-
and
Returns a newQSortconsisting of theOrderSpecifiers of the currentQSortcombined with the ones from the givenQSort.- Parameters:
sort- can be null.- Returns:
-
and
Returns a newQSortconsisting of theOrderSpecifiers of the currentQSortcombined with the given ones.- Parameters:
orderSpecifiers- must not be null or empty.- Returns:
-
and
Returns a newQSortconsisting of theOrderSpecifiers of the currentQSortcombined with the given ones.- Parameters:
orderSpecifiers- must not be null or empty.- Returns:
-