public class HazelcastPartTreeQuery
extends org.springframework.data.keyvalue.repository.query.KeyValuePartTreeQuery
There is one instance for each query method defined for a repository, providing a query from the bind parameters.
TODO The execute(java.lang.Object[]) method calls the prepareQuery(java.lang.Object[]) to bind the parameters to the query. This results in
Hazelcast's PredicateBuilder being called for each query execution. A
more efficient mechanism would be to some sort of templating that would allow the parameters to be instantiated into
the output of the predicate builder rather than the input.
| Constructor and Description |
|---|
HazelcastPartTreeQuery(org.springframework.data.repository.query.QueryMethod queryMethod,
org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider,
org.springframework.data.keyvalue.core.KeyValueOperations keyValueOperations,
Class<? extends org.springframework.data.repository.query.parser.AbstractQueryCreator<?,?>> queryCreator)
Create a
RepositoryQuery implementation for each query method defined in a HazelcastRepository. |
| Modifier and Type | Method and Description |
|---|---|
Object |
execute(Object[] parameters)
Execute this query instance, using any invocation parameters.
|
protected org.springframework.data.keyvalue.core.query.KeyValueQuery<?> |
prepareQuery(Object[] parameters)
Create the query from the bind parameters.
|
public HazelcastPartTreeQuery(org.springframework.data.repository.query.QueryMethod queryMethod,
org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider,
org.springframework.data.keyvalue.core.KeyValueOperations keyValueOperations,
Class<? extends org.springframework.data.repository.query.parser.AbstractQueryCreator<?,?>> queryCreator)
Create a RepositoryQuery implementation for each query method defined in a HazelcastRepository.
queryMethod - Method defined in HazelcastRepositoryevaluationContextProvider - Not usedkeyValueOperations - Interface to HazelcastqueryCreator - Not usedpublic Object execute(Object[] parameters)
Execute this query instance, using any invocation parameters.
Expecting findBy...(), countBy...() or deleteBy...()
execute in interface org.springframework.data.repository.query.RepositoryQueryexecute in class org.springframework.data.keyvalue.repository.query.KeyValuePartTreeQueryparameters - Any parametersprotected org.springframework.data.keyvalue.core.query.KeyValueQuery<?> prepareQuery(Object[] parameters)
Create the query from the bind parameters.
prepareQuery in class org.springframework.data.keyvalue.repository.query.KeyValuePartTreeQueryparameters - Possibly empty list of query parametersCopyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.