Module spring.data.mongodb
Class ArrayOperators.Filter
java.lang.Object
org.springframework.data.mongodb.core.aggregation.ArrayOperators.Filter
- All Implemented Interfaces:
AggregationExpression,MongoExpression
- Enclosing class:
- ArrayOperators
$filter AggregationExpression allows to select a subset of the array to return based on the
specified condition.- Since:
- 1.10
- Author:
- Christoph Strobl
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interface -
Method Summary
Modifier and TypeMethodDescriptionSet the field to apply the$filterto.Set the values to apply the$filterto.filter(AggregationExpression expression) Set theAggregationExpressionresolving to an array to apply the$filterto.Set the field to apply the$filterto.org.bson.DocumenttoDocument(AggregationOperationContext context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.mongodb.core.aggregation.AggregationExpression
toDocument
-
Method Details
-
filter
Set the field to apply the$filterto.- Parameters:
field- must not be null.- Returns:
- never null.
-
filter
Set the field to apply the$filterto.- Parameters:
field- must not be null.- Returns:
- never null.
-
filter
Set theAggregationExpressionresolving to an array to apply the$filterto.- Parameters:
expression- must not be null.- Returns:
- never null.
- Since:
- 4.2
-
filter
Set the values to apply the$filterto.- Parameters:
values- must not be null.- Returns:
- new instance of
ArrayOperators.Filter.AsBuilderto create theArrayOperators.Filter.
-
toDocument
Description copied from interface:AggregationExpression- Specified by:
toDocumentin interfaceAggregationExpression- Parameters:
context- must not be null.- Returns:
- the MongoDB native (
Document) form of the expression.
-