Module spring.data.mongodb
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 StringReturn the MongoDB operator that is used for thisAggregationOperation.org.bson.DocumenttoDocument(AggregationOperationContext context) Deprecated.default List<org.bson.Document>
-
Method Details
-
toDocument
Deprecated.since 2.2 in favor oftoPipelineStages(AggregationOperationContext).- Parameters:
context- theAggregationOperationContextto operate within. Must not be null.- Returns:
- the Document
-
toPipelineStages
Turns theAggregationOperationinto list ofstagesby using the givenAggregationOperationContext. This allows a singleAggregationOptionsto add additional stages for eg.$sortor$limit.- Parameters:
context- theAggregationOperationContextto 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).