Class ReactiveStringBasedAggregation
java.lang.Object
org.springframework.data.mongodb.repository.query.AbstractReactiveMongoQuery
org.springframework.data.mongodb.repository.query.ReactiveStringBasedAggregation
- All Implemented Interfaces:
org.springframework.data.repository.query.RepositoryQuery
A reactive
RepositoryQuery
to use a plain JSON String to create an
aggregation
pipeline to actually execute.- Since:
- 2.2
- Author:
- Christoph Strobl, Mark Paluch
-
Constructor Summary
ConstructorDescriptionReactiveStringBasedAggregation
(ReactiveMongoQueryMethod method, ReactiveMongoOperations reactiveMongoOperations, ExpressionParser expressionParser, org.springframework.data.repository.query.ReactiveQueryMethodEvaluationContextProvider evaluationContextProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected reactor.core.publisher.Mono<Query>
createQuery
(ConvertingParameterAccessor accessor) Creates aQuery
instance using the givenParameterAccessor
protected org.reactivestreams.Publisher<Object>
doExecute
(ReactiveMongoQueryMethod method, org.springframework.data.repository.query.ResultProcessor processor, ConvertingParameterAccessor accessor, Class<?> typeToRead) Execute theRepositoryQuery
of the given method with the parameters provided by theaccessor
protected boolean
Returns whether the query should get a count projection applied.protected boolean
Return weather the query should delete matching documents.protected boolean
Returns whether the query should get an exists projection applied.protected boolean
Return whether the query has an explicit limit set.Methods inherited from class org.springframework.data.mongodb.repository.query.AbstractReactiveMongoQuery
createCountQuery, createUpdate, execute, getCodecRegistry, getParameterBindingCodec, getQueryMethod, getSpelEvaluatorFor, parseAggregationPipeline
-
Constructor Details
-
ReactiveStringBasedAggregation
public ReactiveStringBasedAggregation(ReactiveMongoQueryMethod method, ReactiveMongoOperations reactiveMongoOperations, ExpressionParser expressionParser, org.springframework.data.repository.query.ReactiveQueryMethodEvaluationContextProvider evaluationContextProvider) - Parameters:
method
- must not be null.reactiveMongoOperations
- must not be null.expressionParser
- must not be null.evaluationContextProvider
- must not be null.
-
-
Method Details
-
doExecute
protected org.reactivestreams.Publisher<Object> doExecute(ReactiveMongoQueryMethod method, org.springframework.data.repository.query.ResultProcessor processor, ConvertingParameterAccessor accessor, Class<?> typeToRead) Description copied from class:AbstractReactiveMongoQuery
Execute theRepositoryQuery
of the given method with the parameters provided by theaccessor
- Overrides:
doExecute
in classAbstractReactiveMongoQuery
- Parameters:
method
- theReactiveMongoQueryMethod
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.
-
createQuery
Description copied from class:AbstractReactiveMongoQuery
Creates aQuery
instance using the givenParameterAccessor
- Specified by:
createQuery
in classAbstractReactiveMongoQuery
- Parameters:
accessor
- must not be null.- Returns:
-
isCountQuery
protected boolean isCountQuery()Description copied from class:AbstractReactiveMongoQuery
Returns whether the query should get a count projection applied.- Specified by:
isCountQuery
in classAbstractReactiveMongoQuery
- Returns:
-
isExistsQuery
protected boolean isExistsQuery()Description copied from class:AbstractReactiveMongoQuery
Returns whether the query should get an exists projection applied.- Specified by:
isExistsQuery
in classAbstractReactiveMongoQuery
- Returns:
-
isDeleteQuery
protected boolean isDeleteQuery()Description copied from class:AbstractReactiveMongoQuery
Return weather the query should delete matching documents.- Specified by:
isDeleteQuery
in classAbstractReactiveMongoQuery
- Returns:
-
isLimiting
protected boolean isLimiting()Description copied from class:AbstractReactiveMongoQuery
Return whether the query has an explicit limit set.- Specified by:
isLimiting
in classAbstractReactiveMongoQuery
- Returns:
-