com.holonplatform.core.query

## Interface QuerySort

- All Superinterfaces:
    Expression, Serializable
  All Known Subinterfaces:
    QuerySort.CompositeQuerySort, QuerySort.PathQuerySort<T>

      public interface QuerySort
      extends Serializable, Expression

  A `Query` expression representing a sort condition.
  Since:
    4.4.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `QuerySort.CompositeQuerySort` A `QuerySort` which represents a sort expressions list.
    `static interface` | `QuerySort.PathQuerySort<T>` A `QuerySort` bound to a `Path` expression.
    `static interface` | `QuerySort.QuerySortResolver<T extends QuerySort>` Convenience interface to create an `ExpressionResolver` to resolve a custom `QuerySort` class into a standard `QuerySort`.
    `static interface` | `QuerySort.QuerySortSupport<C extends QuerySort.QuerySortSupport<C>>` Interface implemented by classes which support `QuerySort`s addition.
    `static class` | `QuerySort.SortDirection` Sort direction (ascending or descending) definition

    - ### Nested classes/interfaces inherited from interface com.holonplatform.core.Expression

      `Expression.ExpressionResolverFunction<E extends Expression,R extends Expression>, Expression.InvalidExpressionException`

  - ### Method Summary

    All Methods Static Methods Instance Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default QuerySort` | `and(QuerySort sort)` Combine this sort with given `sort`
    `static <T> QuerySort` | `asc(Path<T> path)` Create a QuerySort on given `path` using `QuerySort.SortDirection.ASCENDING` sort direction.
    `static <T> QuerySort` | `desc(Path<T> path)` Create a QuerySort on given `path` using `QuerySort.SortDirection.DESCENDING` sort direction.
    `static <S extends QuerySort> QuerySort` | `of(List<S> sorts)` Build a multiple QuerySort using given `sorts`, in the order they are provided.
    `static <T> QuerySort` | `of(Path<T> path, boolean ascending)` Create a QuerySort on given `path` using given sort direction
    `static <T> QuerySort` | `of(Path<T> path, QuerySort.SortDirection direction)` Create a QuerySort on given `path` using given sort direction
    `static QuerySort` | `of(QuerySort... sorts)` Build a multiple QuerySort using given `sorts`, in the order they are provided.

    - ### Methods inherited from interface com.holonplatform.core.Expression

      `validate`

- - ### Method Detail

    - #### and

          default QuerySort and(QuerySort sort)

      Combine this sort with given `sort`
      Parameters:
        `sort` - Sort to combine
      Returns:
        A QuerySort using declaring this sort and than the given `sort`

    - #### asc

          static <T> QuerySort asc(Path<T> path)

      Create a QuerySort on given `path` using `QuerySort.SortDirection.ASCENDING` sort direction.
      Type Parameters:
        `T` - Path type
      Parameters:
        `path` - Path by which to sort (not null)
      Returns:
        QuerySort

    - #### desc

          static <T> QuerySort desc(Path<T> path)

      Create a QuerySort on given `path` using `QuerySort.SortDirection.DESCENDING` sort direction.
      Type Parameters:
        `T` - Path type
      Parameters:
        `path` - Path by which to sort (not null)
      Returns:
        QuerySort

    - #### of

          static <T> QuerySort of(Path<T> path,
                                  QuerySort.SortDirection direction)

      Create a QuerySort on given `path` using given sort direction
      Type Parameters:
        `T` - Path type
      Parameters:
        `path` - Path by which to sort (not null)
        `direction` - Sort direction
      Returns:
        QuerySort

    - #### of

          static <T> QuerySort of(Path<T> path,
                                  boolean ascending)

      Create a QuerySort on given `path` using given sort direction
      Type Parameters:
        `T` - Path type
      Parameters:
        `path` - Path by which to sort (not null)
        `ascending` - `true` for ascending or `false` for descending
      Returns:
        QuerySort

    - #### of

          static QuerySort of(QuerySort... sorts)

      Build a multiple QuerySort using given `sorts`, in the order they are provided.
      Parameters:
        `sorts` - Sorts (not null)
      Returns:
        A QuerySort representing a multiple sort on given, ordered, QuerySorts

    - #### of

          static <S extends QuerySort> QuerySort of(List<S> sorts)

      Build a multiple QuerySort using given `sorts`, in the order they are provided.
      Type Parameters:
        `S` - Actual sort type
      Parameters:
        `sorts` - Sorts
      Returns:
        A QuerySort representing a multiple sort on given QuerySorts

Copyright © 2017 The Holon Platform. All rights reserved.