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>

public class QSort extends Sort implements Serializable
Sort option for queries that wraps a Querydsl OrderSpecifier.
Author:
Thomas Darimont, Christoph Strobl, Mark Paluch
See Also:
  • Constructor Details

    • QSort

      public QSort(com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers)
      Creates a new QSort instance with the given OrderSpecifiers.
      Parameters:
      orderSpecifiers - must not be null .
    • QSort

      public QSort(List<com.querydsl.core.types.OrderSpecifier<?>> orderSpecifiers)
      Creates a new QSort instance with the given OrderSpecifiers.
      Parameters:
      orderSpecifiers - must not be null.
  • Method Details

    • by

      public static QSort by(com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers)
    • unsorted

      public static QSort unsorted()
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: Streamable
      Returns whether the current Streamable is empty.
      Specified by:
      isEmpty in interface Streamable<Sort.Order>
      Overrides:
      isEmpty in class Sort
      Returns:
    • getOrderSpecifiers

      public List<com.querydsl.core.types.OrderSpecifier<?>> getOrderSpecifiers()
      Returns:
      the orderSpecifier
    • and

      public QSort and(QSort sort)
      Returns a new QSort consisting of the OrderSpecifiers of the current QSort combined with the ones from the given QSort.
      Parameters:
      sort - can be null.
      Returns:
    • and

      public QSort and(List<com.querydsl.core.types.OrderSpecifier<?>> orderSpecifiers)
      Returns a new QSort consisting of the OrderSpecifiers of the current QSort combined with the given ones.
      Parameters:
      orderSpecifiers - must not be null or empty.
      Returns:
    • and

      public QSort and(com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers)
      Returns a new QSort consisting of the OrderSpecifiers of the current QSort combined with the given ones.
      Parameters:
      orderSpecifiers - must not be null or empty.
      Returns: