public abstract class AbstractReactiveMongoQuery extends Object implements RepositoryQuery
RepositoryQuery implementations for MongoDB.| Constructor and Description |
|---|
AbstractReactiveMongoQuery(ReactiveMongoQueryMethod method,
ReactiveMongoOperations operations,
ExpressionParser expressionParser,
ReactiveQueryMethodEvaluationContextProvider evaluationContextProvider)
|
| Modifier and Type | Method and Description |
|---|---|
protected reactor.core.publisher.Mono<Query> |
createCountQuery(ConvertingParameterAccessor accessor)
Creates a
Query instance using the given ConvertingParameterAccessor. |
protected abstract reactor.core.publisher.Mono<Query> |
createQuery(ConvertingParameterAccessor accessor)
Creates a
Query instance using the given ParameterAccessor |
protected org.reactivestreams.Publisher<Object> |
doExecute(ReactiveMongoQueryMethod method,
ResultProcessor processor,
ConvertingParameterAccessor accessor,
Class<?> typeToRead)
Execute the
RepositoryQuery of the given method with the parameters provided by the
accessor |
org.reactivestreams.Publisher<Object> |
execute(Object[] parameters) |
protected reactor.core.publisher.Mono<org.bson.codecs.configuration.CodecRegistry> |
getCodecRegistry() |
MongoQueryMethod |
getQueryMethod() |
protected reactor.core.publisher.Mono<SpELExpressionEvaluator> |
getSpelEvaluatorFor(ExpressionDependencies dependencies,
ConvertingParameterAccessor accessor)
Obtain a
publisher emitting the SpELExpressionEvaluator suitable to evaluate expressions
backed by the given dependencies. |
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 AbstractReactiveMongoQuery(ReactiveMongoQueryMethod method, ReactiveMongoOperations operations, ExpressionParser expressionParser, ReactiveQueryMethodEvaluationContextProvider 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 org.reactivestreams.Publisher<Object> execute(Object[] parameters)
execute in interface RepositoryQueryprotected org.reactivestreams.Publisher<Object> doExecute(ReactiveMongoQueryMethod method, ResultProcessor processor, ConvertingParameterAccessor accessor, @Nullable Class<?> typeToRead)
RepositoryQuery of the given method with the parameters provided by the
accessormethod - the ReactiveMongoQueryMethod 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 reactor.core.publisher.Mono<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 reactor.core.publisher.Mono<SpELExpressionEvaluator> getSpelEvaluatorFor(ExpressionDependencies dependencies, ConvertingParameterAccessor accessor)
publisher emitting the SpELExpressionEvaluator suitable to evaluate expressions
backed by the given dependencies.dependencies - must not be null.accessor - must not be null.Mono emitting the SpELExpressionEvaluator when ready.protected reactor.core.publisher.Mono<org.bson.codecs.configuration.CodecRegistry> getCodecRegistry()
Mono emitting the CodecRegistry when ready.protected abstract reactor.core.publisher.Mono<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–2022 Pivotal Software, Inc.. All rights reserved.