Interface SortQuery<K>


public interface SortQuery<K>
High-level abstraction over a Redis SORT (generified equivalent of SortParameters). To be used with RedisTemplate (just as SortParameters is used by RedisConnection).
Author:
Costin Leau, Mark Paluch
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable String
    Returns the pattern of the external key used for sorting.
    Returns the external key(s) whose values are returned by the sort.
    Return the target key for sorting.
    Returns the sorting limit (range or pagination).
    Returns the sorting order.
    @Nullable Boolean
    Indicates if the sorting is numeric (default) or alphabetical (lexicographical).
  • Method Details

    • getKey

      K getKey()
      Return the target key for sorting.
      Returns:
      the target key
    • getOrder

      @Nullable SortParameters.Order getOrder()
      Returns the sorting order. Can be null if nothing is specified.
      Returns:
      sorting order
    • isAlphabetic

      @Nullable Boolean isAlphabetic()
      Indicates if the sorting is numeric (default) or alphabetical (lexicographical). Can be null if nothing is specified.
      Returns:
      the type of sorting
    • getLimit

      @Nullable SortParameters.Range getLimit()
      Returns the sorting limit (range or pagination). Can be null if nothing is specified.
      Returns:
      sorting limit/range
    • getBy

      @Nullable String getBy()
      Returns the pattern of the external key used for sorting.
      Returns:
      the external key pattern
    • getGetPattern

      List<String> getGetPattern()
      Returns the external key(s) whose values are returned by the sort.
      Returns:
      the (list of) keys used for GET