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
ConstructorsConstructorDescriptionAbstractCouchbaseQueryBase(CouchbaseQueryMethod method, CouchbaseOperationsType operations, SpelExpressionParser expressionParser, QueryMethodEvaluationContextProvider evaluationContextProvider) Creates a newAbstractCouchbaseQueryfrom the givenReactiveCouchbaseQueryMethodandCouchbaseOperations. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract QuerycreateCountQuery(ParametersParameterAccessor accessor) Creates aQueryinstance using the givenParametersParameterAccessor.protected abstract QuerycreateQuery(ParametersParameterAccessor accessor) Creates aQueryinstance using the givenParameterAccessorprotected abstract ObjectdoExecute(CouchbaseQueryMethod method, ResultProcessor processor, ParametersParameterAccessor accessor, Class<?> typeToRead) Execute theRepositoryQueryof the given method with the parameters provided by theaccessorExecute the query with the provided parametersprotected booleanprotected booleanprotected booleanprotected abstract booleanReturn whether the query has an explicit limit set.
-
Constructor Details
-
AbstractCouchbaseQueryBase
public AbstractCouchbaseQueryBase(CouchbaseQueryMethod method, CouchbaseOperationsType operations, SpelExpressionParser expressionParser, QueryMethodEvaluationContextProvider evaluationContextProvider) Creates a newAbstractCouchbaseQueryfrom the givenReactiveCouchbaseQueryMethodandCouchbaseOperations.- 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:
getQueryMethodin interfaceRepositoryQuery
-
getOperations
-
execute
Execute the query with the provided parameters- Specified by:
executein interfaceRepositoryQuery- See Also:
-
doExecute
protected abstract Object doExecute(CouchbaseQueryMethod method, ResultProcessor processor, ParametersParameterAccessor accessor, @Nullable Class<?> typeToRead) Execute theRepositoryQueryof the given method with the parameters provided by theaccessor- Parameters:
method- theReactiveCouchbaseQueryMethodinvoked. Never null.processor-ResultProcessorfor post procession. Never null.accessor- for providing invocation arguments. Never null.typeToRead- the desired component target type. Can be null.
-
createCountQuery
Creates aQueryinstance 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 aQueryinstance 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:
-