org.springframework.data.querydsl

## 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:
  Serialized Form

### 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
Constructor and Description
`QSort(List<com.querydsl.core.types.OrderSpecifier<?>> orderSpecifiers)` Creates a new `QSort` instance with the given `OrderSpecifier`s.
`QSort(com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers)` Creates a new `QSort` instance with the given `OrderSpecifier`s.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`QSort` `and(List<com.querydsl.core.types.OrderSpecifier<?>> orderSpecifiers)` Returns a new `QSort` consisting of the `OrderSpecifier`s of the current `QSort` combined with the given ones.
`QSort` `and(com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers)` Returns a new `QSort` consisting of the `OrderSpecifier`s of the current `QSort` combined with the given ones.
`QSort` `and(QSort sort)` Returns a new `QSort` consisting of the `OrderSpecifier`s of the current `QSort` combined with the ones from the given `QSort`.
`static QSort` `by(com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers)`
`List<com.querydsl.core.types.OrderSpecifier<?>>` `getOrderSpecifiers()`
`static QSort` `unsorted()`

### Methods inherited from class org.springframework.data.domain.Sort

`and, ascending, by, by, by, by, descending, equals, getOrderFor, hashCode, isSorted, isUnsorted, iterator, sort, toString`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.springframework.data.util.Streamable

`and, and, and, and, empty, filter, flatMap, get, isEmpty, map, of, of, of, stream, toList, toSet, toStreamable, toStreamable`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

### Constructor Detail

#### QSort

    public QSort(com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers)

Creates a new `QSort` instance with the given `OrderSpecifier`s.

Parameters:
  `orderSpecifiers` - must not be null .

#### QSort

    public QSort(List<com.querydsl.core.types.OrderSpecifier<?>> orderSpecifiers)

Creates a new `QSort` instance with the given `OrderSpecifier`s.

Parameters:
  `orderSpecifiers` - must not be null.

### Method Detail

#### by

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

#### unsorted

    public static QSort unsorted()

#### 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 `OrderSpecifier`s 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 `OrderSpecifier`s 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 `OrderSpecifier`s of the current `QSort` combined with the given ones.

Parameters:
  `orderSpecifiers` - must not be null or empty.
Returns: