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
ConstructorsConstructorDescriptionReactiveStringBasedAggregation(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 aQueryinstance using the givenParameterAccessorprotected org.reactivestreams.Publisher<Object>doExecute(ReactiveMongoQueryMethod method, org.springframework.data.repository.query.ResultProcessor processor, ConvertingParameterAccessor accessor, Class<?> typeToRead) Execute theRepositoryQueryof the given method with the parameters provided by theaccessorprotected booleanReturns whether the query should get a count projection applied.protected booleanReturn weather the query should delete matching documents.protected booleanReturns whether the query should get an exists projection applied.protected booleanReturn 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:AbstractReactiveMongoQueryExecute theRepositoryQueryof the given method with the parameters provided by theaccessor- Overrides:
doExecutein classAbstractReactiveMongoQuery- Parameters:
method- theReactiveMongoQueryMethodinvoked. Never null.processor-ResultProcessorfor 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:AbstractReactiveMongoQueryCreates aQueryinstance using the givenParameterAccessor- Specified by:
createQueryin classAbstractReactiveMongoQuery- Parameters:
accessor- must not be null.- Returns:
-
isCountQuery
protected boolean isCountQuery()Description copied from class:AbstractReactiveMongoQueryReturns whether the query should get a count projection applied.- Specified by:
isCountQueryin classAbstractReactiveMongoQuery- Returns:
-
isExistsQuery
protected boolean isExistsQuery()Description copied from class:AbstractReactiveMongoQueryReturns whether the query should get an exists projection applied.- Specified by:
isExistsQueryin classAbstractReactiveMongoQuery- Returns:
-
isDeleteQuery
protected boolean isDeleteQuery()Description copied from class:AbstractReactiveMongoQueryReturn weather the query should delete matching documents.- Specified by:
isDeleteQueryin classAbstractReactiveMongoQuery- Returns:
-
isLimiting
protected boolean isLimiting()Description copied from class:AbstractReactiveMongoQueryReturn whether the query has an explicit limit set.- Specified by:
isLimitingin classAbstractReactiveMongoQuery- Returns:
-