Interface AggregationOperation
- All Known Subinterfaces:
FieldsExposingAggregationOperation
,FieldsExposingAggregationOperation.InheritsFieldsAggregationOperation
- All Known Implementing Classes:
AddFieldsOperation
,BucketAutoOperation
,BucketOperation
,BucketOperationSupport
,CountOperation
,DensifyOperation
,FacetOperation
,GeoNearOperation
,GraphLookupOperation
,GroupOperation
,LimitOperation
,LookupOperation
,MatchOperation
,MergeOperation
,OutOperation
,ProjectionOperation
,ProjectionOperation.ExpressionProjectionOperationBuilder
,ProjectionOperation.ProjectionOperationBuilder
,RedactOperation
,ReplaceRootOperation
,ReplaceRootOperation.ReplaceRootDocumentOperation
,ReplaceWithOperation
,SampleOperation
,SetOperation
,SetWindowFieldsOperation
,SkipOperation
,SortByCountOperation
,SortOperation
,UnionWithOperation
,UnsetOperation
,UnwindOperation
public interface AggregationOperation
Represents one single operation in an aggregation pipeline.
- Since:
- 1.3
- Author:
- Sebastian Herold, Thomas Darimont, Oliver Gierke, Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptiondefault String
Return the MongoDB operator that is used for thisAggregationOperation
.org.bson.Document
toDocument
(AggregationOperationContext context) Deprecated.default List<org.bson.Document>
-
Method Details
-
toDocument
Deprecated.since 2.2 in favor oftoPipelineStages(AggregationOperationContext)
.- Parameters:
context
- theAggregationOperationContext
to operate within. Must not be null.- Returns:
- the Document
-
toPipelineStages
Turns theAggregationOperation
into list ofstages
by using the givenAggregationOperationContext
. This allows a singleAggregationOptions
to add additional stages for eg.$sort
or$limit
.- Parameters:
context
- theAggregationOperationContext
to operate within. Must not be null.- Returns:
- the pipeline stages to run through. Never null.
- Since:
- 2.2
-
getOperator
Return the MongoDB operator that is used for thisAggregationOperation
. Aggregation operations should implement this method to avoid document rendering.- Returns:
- the operator used for this
AggregationOperation
. - Since:
- 3.0.2
-
toPipelineStages(AggregationOperationContext)
.