public class MatchOperation extends Object implements AggregationOperation
$match-operation.
We recommend to use the static factory method
Aggregation.match(org.springframework.data.mongodb.core.query.Criteria) instead of creating instances of this
class directly.
| Constructor and Description |
|---|
MatchOperation(AggregationExpression expression)
Creates a new
MatchOperation for the given AggregationExpression. |
MatchOperation(CriteriaDefinition criteriaDefinition)
Creates a new
MatchOperation for the given CriteriaDefinition. |
| Modifier and Type | Method and Description |
|---|---|
String |
getOperator()
Return the MongoDB operator that is used for this
AggregationOperation. |
org.bson.Document |
toDocument(AggregationOperationContext context)
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoPipelineStagespublic MatchOperation(CriteriaDefinition criteriaDefinition)
MatchOperation for the given CriteriaDefinition.criteriaDefinition - must not be null.public MatchOperation(AggregationExpression expression)
MatchOperation for the given AggregationExpression.expression - must not be null.public org.bson.Document toDocument(AggregationOperationContext context)
AggregationOperationtoDocument in interface AggregationOperationcontext - the AggregationOperationContext to operate within. Must not be null.public String getOperator()
AggregationOperationAggregationOperation. Aggregation operations should
implement this method to avoid document rendering.getOperator in interface AggregationOperationAggregationOperation.Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.