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
-
Method Summary
Modifier and TypeMethodDescriptionand
(com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers) Returns a newQSort
consisting of theOrderSpecifier
s of the currentQSort
combined with the ones from the givenQSort
.static QSort
by
(com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers) List<com.querydsl.core.types.OrderSpecifier<?>>
boolean
isEmpty()
Returns whether the currentStreamable
is empty.static QSort
unsorted()
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, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
QSort
public QSort(com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers) Creates a newQSort
instance with the givenOrderSpecifier
s.- Parameters:
orderSpecifiers
- must not be null .
-
QSort
Creates a newQSort
instance with the givenOrderSpecifier
s.- Parameters:
orderSpecifiers
- must not be null.
-
-
Method Details
-
by
-
unsorted
-
isEmpty
public boolean isEmpty()Description copied from interface:Streamable
Returns whether the currentStreamable
is empty.- Specified by:
isEmpty
in interfaceStreamable<Sort.Order>
- Overrides:
isEmpty
in classSort
- Returns:
-
getOrderSpecifiers
- Returns:
- the orderSpecifier
-
and
Returns a newQSort
consisting of theOrderSpecifier
s of the currentQSort
combined with the ones from the givenQSort
.- Parameters:
sort
- can be null.- Returns:
-
and
Returns a newQSort
consisting of theOrderSpecifier
s of the currentQSort
combined with the given ones.- Parameters:
orderSpecifiers
- must not be null or empty.- Returns:
-
and
Returns a newQSort
consisting of theOrderSpecifier
s of the currentQSort
combined with the given ones.- Parameters:
orderSpecifiers
- must not be null or empty.- Returns:
-