Module spring.data.mongodb
Class TypedAggregation<I>
java.lang.Object
org.springframework.data.mongodb.core.aggregation.Aggregation
org.springframework.data.mongodb.core.aggregation.TypedAggregation<I>
A
TypedAggregation is a special Aggregation that holds information of the input aggregation type.- Author:
- Thomas Darimont, Oliver Gierke
-
Field Summary
Fields inherited from class org.springframework.data.mongodb.core.aggregation.Aggregation
CURRENT, DEFAULT_CONTEXT, DEFAULT_OPTIONS, pipeline, REMOVE, ROOT -
Constructor Summary
ConstructorsConstructorDescriptionTypedAggregation(Class<I> inputType, List<AggregationOperation> operations) Creates a newTypedAggregationfrom the givenAggregationOperations.TypedAggregation(Class<I> inputType, List<AggregationOperation> operations, AggregationOptions options) Creates a newTypedAggregationfrom the givenAggregationOperations and the givenAggregationOptions.TypedAggregation(Class<I> inputType, AggregationOperation... operations) Creates a newTypedAggregationfrom the givenAggregationOperations. -
Method Summary
Modifier and TypeMethodDescriptionReturns the input type for theAggregation.withOptions(AggregationOptions options) Returns a copy of thisAggregationwith the givenAggregationOptionsset.Methods inherited from class org.springframework.data.mongodb.core.aggregation.Aggregation
addFields, asAggregationList, bind, bucket, bucket, bucketAuto, bucketAuto, count, facet, facet, fields, geoNear, getOptions, getPipeline, graphLookup, group, group, limit, lookup, lookup, lookup, match, match, match, merge, newAggregation, newAggregation, newAggregation, newAggregation, newAggregationOptions, newUpdate, out, previousOperation, project, project, project, redact, replaceRoot, replaceRoot, replaceRoot, sample, skip, sort, sort, sortByCount, sortByCount, stage, stage, toDocument, toPipeline, toString, unwind, unwind, unwind, unwind, vectorSearch
-
Constructor Details
-
TypedAggregation
Creates a newTypedAggregationfrom the givenAggregationOperations.- Parameters:
inputType- must not be null.operations- must not be null or empty.
-
TypedAggregation
Creates a newTypedAggregationfrom the givenAggregationOperations.- Parameters:
inputType- must not be null.operations- must not be null or empty.
-
TypedAggregation
public TypedAggregation(Class<I> inputType, List<AggregationOperation> operations, AggregationOptions options) Creates a newTypedAggregationfrom the givenAggregationOperations and the givenAggregationOptions.- Parameters:
inputType- must not be null.operations- must not be null or empty.options- must not be null.
-
-
Method Details
-
getInputType
Returns the input type for theAggregation.- Returns:
- the inputType will never be null.
-
withOptions
Description copied from class:AggregationReturns a copy of thisAggregationwith the givenAggregationOptionsset. Note that options are supported in MongoDB version 2.6+.- Overrides:
withOptionsin classAggregation- Parameters:
options- must not be null.- Returns:
- new instance of
Aggregation.
-