Module spring.data.mongodb
Interface ReactiveAggregationOperation
- All Known Subinterfaces:
ReactiveFluentMongoOperations,ReactiveMongoOperations
- All Known Implementing Classes:
ReactiveMongoTemplate
public interface ReactiveAggregationOperation
ReactiveAggregationOperation allows creation and execution of reactive MongoDB aggregation operations in a
fluent API style. The starting domainType is used for mapping the
Aggregation provided via by into the
MongoDB specific representation, as well as mapping back the resulting Document. An alternative
input type for mapping the Aggregation can be provided by using
TypedAggregation.
aggregateAndReturn(Jedi.class)
.by(newAggregation(Human.class, project("These are not the droids you are looking for")))
.all();
- Since:
- 2.0
- Author:
- Mark Paluch, Christoph Strobl
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceDefine the aggregation with pipeline stages.static interfaceCollection override (optional).static interfacestatic interfaceTrigger execution by calling one of the terminating methods. -
Method Summary
Modifier and TypeMethodDescriptionaggregateAndReturn(Class<T> domainType) Start creating an aggregation operation that returns results mapped to the given domain type.
-
Method Details
-
aggregateAndReturn
Start creating an aggregation operation that returns results mapped to the given domain type.
UseTypedAggregationto specify a potentially different input type for he aggregation.- Parameters:
domainType- must not be null.- Returns:
- new instance of
ReactiveAggregationOperation.ReactiveAggregation. Never null. - Throws:
IllegalArgumentException- if domainType is null.
-