Class KeyValuePartTreeQuery
java.lang.Object
org.springframework.data.keyvalue.repository.query.KeyValuePartTreeQuery
- All Implemented Interfaces:
org.springframework.data.repository.query.RepositoryQuery
- Direct Known Subclasses:
CachingKeyValuePartTreeQuery
public class KeyValuePartTreeQuery
extends Object
implements org.springframework.data.repository.query.RepositoryQuery
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 org.springframework.data.repository.query.parser.AbstractQueryCreator<?,?>> Factory class for obtainingAbstractQueryCreatorinstances for a givenPartTreeandParameterAccessor. -
Constructor Summary
ConstructorsConstructorDescriptionKeyValuePartTreeQuery(org.springframework.data.repository.query.QueryMethod queryMethod, org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider, KeyValueOperations keyValueOperations, Class<? extends org.springframework.data.repository.query.parser.AbstractQueryCreator<?, ?>> queryCreator) Creates a newKeyValuePartTreeQueryfor the givenQueryMethod,EvaluationContextProvider,KeyValueOperationsand query creator type.KeyValuePartTreeQuery(org.springframework.data.repository.query.QueryMethod queryMethod, org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider, KeyValueOperations keyValueOperations, KeyValuePartTreeQuery.QueryCreatorFactory<org.springframework.data.repository.query.parser.AbstractQueryCreator<KeyValueQuery<?>, ?>> queryCreatorFactory) Creates a newKeyValuePartTreeQueryfor the givenQueryMethod,EvaluationContextProvider,KeyValueOperationsusing the givenKeyValuePartTreeQuery.QueryCreatorFactoryproducing theAbstractQueryCreatorin charge of altering the query. -
Method Summary
Modifier and TypeMethodDescriptioncreateQuery(org.springframework.data.repository.query.ParameterAccessor accessor) Create aKeyValueQuerygivenParameterAccessor.protected ObjectdoExecute(Object[] parameters, KeyValueQuery<?> query) org.springframework.data.repository.query.QueryMethodprotected KeyValueQuery<?>prepareQuery(Object[] parameters) protected KeyValueQuery<?>prepareQuery(KeyValueQuery<?> instance, Object[] parameters)
-
Constructor Details
-
KeyValuePartTreeQuery
public KeyValuePartTreeQuery(org.springframework.data.repository.query.QueryMethod queryMethod, org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider, KeyValueOperations keyValueOperations, Class<? extends org.springframework.data.repository.query.parser.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(org.springframework.data.repository.query.QueryMethod queryMethod, org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider, KeyValueOperations keyValueOperations, KeyValuePartTreeQuery.QueryCreatorFactory<org.springframework.data.repository.query.parser.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 interfaceorg.springframework.data.repository.query.RepositoryQuery
-
doExecute
- Parameters:
parameters-query-
-
prepareQuery
-
prepareQuery
-
createQuery
public KeyValueQuery<?> createQuery(org.springframework.data.repository.query.ParameterAccessor accessor) Create aKeyValueQuerygivenParameterAccessor.- Parameters:
accessor- must not be null.- Returns:
- the
KeyValueQuery.
-
getQueryMethod
public org.springframework.data.repository.query.QueryMethod getQueryMethod()- Specified by:
getQueryMethodin interfaceorg.springframework.data.repository.query.RepositoryQuery
-