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
Modifier and TypeClassDescriptionstatic interface
static interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptionSet the field to apply the$filter
to.Set the values to apply the$filter
to.filter
(AggregationExpression expression) Set theAggregationExpression
resolving to an array to apply the$filter
to.Set the field to apply the$filter
to.org.bson.Document
toDocument
(AggregationOperationContext context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.data.mongodb.core.aggregation.AggregationExpression
toDocument
-
Method Details
-
filter
Set the field to apply the$filter
to.- Parameters:
field
- must not be null.- Returns:
- never null.
-
filter
Set the field to apply the$filter
to.- Parameters:
field
- must not be null.- Returns:
- never null.
-
filter
Set theAggregationExpression
resolving to an array to apply the$filter
to.- Parameters:
expression
- must not be null.- Returns:
- never null.
- Since:
- 4.2
-
filter
Set the values to apply the$filter
to.- Parameters:
values
- must not be null.- Returns:
- new instance of
ArrayOperators.Filter.AsBuilder
to create theArrayOperators.Filter
.
-
toDocument
Description copied from interface:AggregationExpression
- Specified by:
toDocument
in interfaceAggregationExpression
- Parameters:
context
- must not be null.- Returns:
- the MongoDB native (
Document
) form of the expression.
-