Interface ExecutableAggregationOperation
- All Known Subinterfaces:
FluentMongoOperations
,MongoOperations
- All Known Implementing Classes:
MongoTemplate
public interface ExecutableAggregationOperation
ExecutableAggregationOperation
allows creation and execution of 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:
- Christoph Strobl, Mark Paluch
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Define the aggregation with pipeline stages.static interface
Collection override (Optional).static interface
static interface
Trigger 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.
UseTypedAggregation
to specify a potentially different input type for he aggregation.- Parameters:
domainType
- must not be null.- Returns:
- new instance of
ExecutableAggregationOperation.ExecutableAggregation
. - Throws:
IllegalArgumentException
- if domainType is null.
-