Module spring.data.keyvalue
Class KeyValuePartTreeQuery
java.lang.Object
org.springframework.data.keyvalue.repository.query.KeyValuePartTreeQuery
- All Implemented Interfaces:
RepositoryQuery
- Direct Known Subclasses:
CachingKeyValuePartTreeQuery
RepositoryQuery implementation deriving queries from PartTree using a predefined
AbstractQueryCreator.- Author:
- Christoph Strobl, Oliver Gierke, Mark Paluch
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceKeyValuePartTreeQuery.QueryCreatorFactory<T extends AbstractQueryCreator<?,?>> Factory class for obtainingAbstractQueryCreatorinstances for a givenPartTreeandParameterAccessor. -
Constructor Summary
ConstructorsConstructorDescriptionKeyValuePartTreeQuery(QueryMethod queryMethod, QueryMethodEvaluationContextProvider evaluationContextProvider, KeyValueOperations keyValueOperations, Class<? extends AbstractQueryCreator<?, ?>> queryCreator) Creates a newKeyValuePartTreeQueryfor the givenQueryMethod,EvaluationContextProvider,KeyValueOperationsand query creator type.KeyValuePartTreeQuery(QueryMethod queryMethod, QueryMethodEvaluationContextProvider evaluationContextProvider, KeyValueOperations keyValueOperations, KeyValuePartTreeQuery.QueryCreatorFactory<AbstractQueryCreator<KeyValueQuery<?>, ?>> queryCreatorFactory) Creates a newKeyValuePartTreeQueryfor the givenQueryMethod,EvaluationContextProvider,KeyValueOperationsusing the givenKeyValuePartTreeQuery.QueryCreatorFactoryproducing theAbstractQueryCreatorin charge of altering the query. -
Method Summary
Modifier and TypeMethodDescriptioncreateQuery(ParameterAccessor accessor) Create aKeyValueQuerygivenParameterAccessor.protected ObjectdoExecute(Object[] parameters, KeyValueQuery<?> query) protected KeyValueQuery<?>prepareQuery(Object[] parameters) protected KeyValueQuery<?>prepareQuery(KeyValueQuery<?> instance, Object[] parameters)
-
Constructor Details
-
KeyValuePartTreeQuery
public KeyValuePartTreeQuery(QueryMethod queryMethod, QueryMethodEvaluationContextProvider evaluationContextProvider, KeyValueOperations keyValueOperations, Class<? extends AbstractQueryCreator<?, ?>> queryCreator) Creates a newKeyValuePartTreeQueryfor the givenQueryMethod,EvaluationContextProvider,KeyValueOperationsand query creator type.- Parameters:
queryMethod- must not be null.evaluationContextProvider- must not be null.keyValueOperations- must not be null.queryCreator- must not be null.
-
KeyValuePartTreeQuery
public KeyValuePartTreeQuery(QueryMethod queryMethod, QueryMethodEvaluationContextProvider evaluationContextProvider, KeyValueOperations keyValueOperations, KeyValuePartTreeQuery.QueryCreatorFactory<AbstractQueryCreator<KeyValueQuery<?>, ?>> queryCreatorFactory) Creates a newKeyValuePartTreeQueryfor the givenQueryMethod,EvaluationContextProvider,KeyValueOperationsusing the givenKeyValuePartTreeQuery.QueryCreatorFactoryproducing theAbstractQueryCreatorin charge of altering the query.- Parameters:
queryMethod- must not be null.evaluationContextProvider- must not be null.keyValueOperations- must not be null.queryCreatorFactory- must not be null.- Since:
- 2.0
-
-
Method Details
-
execute
- Specified by:
executein interfaceRepositoryQuery
-
doExecute
- Parameters:
parameters-query-
-
prepareQuery
-
prepareQuery
-
createQuery
Create aKeyValueQuerygivenParameterAccessor.- Parameters:
accessor- must not be null.- Returns:
- the
KeyValueQuery.
-
getQueryMethod
- Specified by:
getQueryMethodin interfaceRepositoryQuery
-