Class ConditionalOperators.IfNull
java.lang.Object
org.springframework.data.mongodb.core.aggregation.ConditionalOperators.IfNull
- All Implemented Interfaces:
AggregationExpression
,MongoExpression
- Enclosing class:
- ConditionalOperators
Encapsulates the aggregation framework
$ifNull
operator. Replacement values can be either field references
, expressions
, values of simple MongoDB types or values that can be
converted to a simple MongoDB type.- Author:
- Mark Paluch
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptionCreates newConditionalOperators.IfNull
.ifNull
(AggregationExpression expression) Creates newConditionalOperators.IfNull
.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
-
ifNull
Creates newConditionalOperators.IfNull
.- Parameters:
fieldReference
- the field to check for a null value, field reference must not be null.- Returns:
- never null.
-
ifNull
Creates newConditionalOperators.IfNull
.- Parameters:
expression
- the expression to check for a null value, field reference must not be null.- Returns:
- never null.
-
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.
-