public abstract class AbstractMongoQuery extends Object implements RepositoryQuery
RepositoryQuery implementations for Mongo.| Constructor and Description |
|---|
AbstractMongoQuery(MongoQueryMethod method,
MongoOperations operations,
SpelExpressionParser expressionParser,
QueryMethodEvaluationContextProvider evaluationContextProvider)
|
| Modifier and Type | Method and Description |
|---|---|
protected Query |
createCountQuery(ConvertingParameterAccessor accessor)
Creates a
Query instance using the given ConvertingParameterAccessor. |
protected abstract Query |
createQuery(ConvertingParameterAccessor accessor)
Creates a
Query instance using the given ParameterAccessor |
protected Object |
doExecute(MongoQueryMethod method,
ResultProcessor processor,
ConvertingParameterAccessor accessor,
Class<?> typeToRead)
Execute the
RepositoryQuery of the given method with the parameters provided by the
accessor |
Object |
execute(Object[] parameters) |
MongoQueryMethod |
getQueryMethod() |
protected abstract boolean |
isCountQuery()
Returns whether the query should get a count projection applied.
|
protected abstract boolean |
isDeleteQuery()
Return weather the query should delete matching documents.
|
protected abstract boolean |
isExistsQuery()
Returns whether the query should get an exists projection applied.
|
protected abstract boolean |
isLimiting()
Return whether the query has an explicit limit set.
|
public AbstractMongoQuery(MongoQueryMethod method, MongoOperations operations, SpelExpressionParser expressionParser, QueryMethodEvaluationContextProvider evaluationContextProvider)
method - must not be null.operations - must not be null.expressionParser - must not be null.evaluationContextProvider - must not be null.public MongoQueryMethod getQueryMethod()
getQueryMethod in interface RepositoryQuerypublic Object execute(Object[] parameters)
execute in interface RepositoryQueryprotected Object doExecute(MongoQueryMethod method, ResultProcessor processor, ConvertingParameterAccessor accessor, @Nullable Class<?> typeToRead)
RepositoryQuery of the given method with the parameters provided by the
accessormethod - the MongoQueryMethod 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.protected Query createCountQuery(ConvertingParameterAccessor accessor)
Query instance using the given ConvertingParameterAccessor. Will delegate to
createQuery(ConvertingParameterAccessor) by default but allows customization of the count query to be
triggered.accessor - must not be null.protected abstract Query createQuery(ConvertingParameterAccessor accessor)
Query instance using the given ParameterAccessoraccessor - must not be null.protected abstract boolean isCountQuery()
protected abstract boolean isExistsQuery()
protected abstract boolean isDeleteQuery()
protected abstract boolean isLimiting()
Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.