添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Class ConditionalOperators.IfNull

java.lang.Object
org.springframework.data.mongodb.core.aggregation.ConditionalOperators.IfNull
All Implemented Interfaces:
AggregationExpression , MongoExpression
Enclosing class:
ConditionalOperators
public static class ConditionalOperators.IfNull extends Object implements AggregationExpression
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:
  • https://docs.mongodb.com/manual/reference/operator/aggregation/ifNull/
  • Description
    ifNull ( String fieldReference)
    org.bson.Document
    Turns the AggregationExpression into a Document within the given AggregationOperationContext .

    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

    ifNull

    public static ConditionalOperators.IfNull.ThenBuilder ifNull ( String fieldReference)
    Parameters:
    fieldReference - the field to check for a null value, field reference must not be null.
    Returns:
    never null.

    ifNull

    Parameters:
    expression - the expression to check for a null value, field reference must not be null.
    Returns:
    never null.

    toDocument

    public org.bson.Document toDocument ( AggregationOperationContext context)
    Description copied from interface: AggregationExpression
    Turns the AggregationExpression into a Document within the given AggregationOperationContext .
    Specified by:
    toDocument in interface AggregationExpression
    Parameters:
    context - must not be null.
    Returns:
    the MongoDB native ( Document ) form of the expression.