Class AbstractCouchbaseQueryBase<CouchbaseOperationsType>
java.lang.Object
org.springframework.data.couchbase.repository.query.AbstractCouchbaseQueryBase<CouchbaseOperationsType>
- All Implemented Interfaces:
RepositoryQuery
- Direct Known Subclasses:
AbstractCouchbaseQuery
,AbstractReactiveCouchbaseQuery
public abstract class AbstractCouchbaseQueryBase<CouchbaseOperationsType>
extends Object
implements RepositoryQuery
RepositoryQuery
implementation for Couchbase. CouchbaseOperationsType is either CouchbaseOperations or
ReactiveCouchbaseOperations- Since:
- 4.1
- Author:
- Michael Reiche
-
Constructor Summary
ConstructorDescriptionAbstractCouchbaseQueryBase
(CouchbaseQueryMethod method, CouchbaseOperationsType operations, SpelExpressionParser expressionParser, QueryMethodEvaluationContextProvider evaluationContextProvider) Creates a newAbstractCouchbaseQuery
from the givenReactiveCouchbaseQueryMethod
andCouchbaseOperations
. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Query
createCountQuery
(ParametersParameterAccessor accessor) Creates aQuery
instance using the givenParametersParameterAccessor
.protected abstract Query
createQuery
(ParametersParameterAccessor accessor) Creates aQuery
instance using the givenParameterAccessor
protected abstract Object
doExecute
(CouchbaseQueryMethod method, ResultProcessor processor, ParametersParameterAccessor accessor, Class<?> typeToRead) Execute theRepositoryQuery
of the given method with the parameters provided by theaccessor
Execute the query with the provided parametersprotected boolean
protected boolean
protected boolean
protected abstract boolean
Return whether the query has an explicit limit set.
-
Constructor Details
-
AbstractCouchbaseQueryBase
public AbstractCouchbaseQueryBase(CouchbaseQueryMethod method, CouchbaseOperationsType operations, SpelExpressionParser expressionParser, QueryMethodEvaluationContextProvider evaluationContextProvider) Creates a newAbstractCouchbaseQuery
from the givenReactiveCouchbaseQueryMethod
andCouchbaseOperations
.- Parameters:
method
- must not be null.operations
- must not be null.expressionParser
- must not be null.evaluationContextProvider
- must not be null.
-
-
Method Details
-
getQueryMethod
- Specified by:
getQueryMethod
in interfaceRepositoryQuery
-
getOperations
-
execute
Execute the query with the provided parameters- Specified by:
execute
in interfaceRepositoryQuery
- See Also:
-
doExecute
protected abstract Object doExecute(CouchbaseQueryMethod method, ResultProcessor processor, ParametersParameterAccessor accessor, @Nullable Class<?> typeToRead) Execute theRepositoryQuery
of the given method with the parameters provided by theaccessor
- Parameters:
method
- theReactiveCouchbaseQueryMethod
invoked. Never null.processor
-ResultProcessor
for post procession. Never null.accessor
- for providing invocation arguments. Never null.typeToRead
- the desired component target type. Can be null.
-
createCountQuery
Creates aQuery
instance using the givenParametersParameterAccessor
. Will delegate tocreateQuery(ParametersParameterAccessor)
by default but allows customization of the count query to be triggered.- Parameters:
accessor
- must not be null.- Returns:
-
createQuery
Creates aQuery
instance using the givenParameterAccessor
- Parameters:
accessor
- must not be null.- Returns:
-
isCountQuery
protected boolean isCountQuery() -
isExistsQuery
protected boolean isExistsQuery() -
isDeleteQuery
protected boolean isDeleteQuery() -
isLimiting
protected abstract boolean isLimiting()Return whether the query has an explicit limit set.- Returns:
-