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 TypeMethodDescriptiongetBy()
Returns the pattern of the external key used for sorting.Returns the external key(s) whose values are returned by the sort.getKey()
Return the target key for sorting.getLimit()
Returns the sorting limit (range or pagination).getOrder()
Returns the sorting order.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
Returns the sorting order. Can be null if nothing is specified.- Returns:
- sorting order
-
isAlphabetic
Indicates if the sorting is numeric (default) or alphabetical (lexicographical). Can be null if nothing is specified.- Returns:
- the type of sorting
-
getLimit
Returns the sorting limit (range or pagination). Can be null if nothing is specified.- Returns:
- sorting limit/range
-
getBy
Returns the pattern of the external key used for sorting.- Returns:
- the external key pattern
-
getGetPattern
Returns the external key(s) whose values are returned by the sort.- Returns:
- the (list of) keys used for GET
-