Class SpelSortAccessor
java.lang.Object
org.springframework.data.keyvalue.core.SpelSortAccessor
- All Implemented Interfaces:
SortAccessor<Comparator<?>>
SortAccessor
implementation capable of creating SpelPropertyComparator
.- Author:
- Christoph Strobl, Oliver Gierke, Mark Paluch
-
Constructor Summary
ConstructorDescriptionSpelSortAccessor
(SpelExpressionParser parser) Creates a newSpelSortAccessor
givenSpelExpressionParser
. -
Method Summary
Modifier and TypeMethodDescriptionComparator<?>
resolve
(KeyValueQuery<?> query) ReadsKeyValueQuery.getSort()
of givenKeyValueQuery
and applies required transformation to match the desired type.
-
Constructor Details
-
SpelSortAccessor
Creates a newSpelSortAccessor
givenSpelExpressionParser
.- Parameters:
parser
- must not be null.
-
-
Method Details
-
resolve
Description copied from interface:SortAccessor
ReadsKeyValueQuery.getSort()
of givenKeyValueQuery
and applies required transformation to match the desired type.- Specified by:
resolve
in interfaceSortAccessor<Comparator<?>>
- Parameters:
query
- must not be null.- Returns:
- null in case
Sort
has not been defined onKeyValueQuery
.
-