org.springframework.data.redis.core.query
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).


Method Summary
 String getBy()
          Returns the pattern of the external key used for sorting.
 List<String> getGetPattern()
          Returns the external key(s) whose values are returned by the sort.
 K getKey()
          Return the target key for sorting.
 SortParameters.Range getLimit()
          Returns the sorting limit (range or pagination).
 SortParameters.Order getOrder()
          Returns the sorting order.
 Boolean isAlphabetic()
          Indicates if the sorting is numeric (default) or alphabetical (lexicographical).
 

Method Detail

getOrder

SortParameters.Order getOrder()
Returns the sorting order. Can be null if nothing is specified.

Returns:
sorting order

isAlphabetic

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

SortParameters.Range getLimit()
Returns the sorting limit (range or pagination). Can be null if nothing is specified.

Returns:
sorting limit/range

getKey

K getKey()
Return the target key for sorting.

Returns:
the target key

getBy

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