public static class ConditionalOperators.Switch extends Object
AggregationExpression for $switch.| Modifier and Type | Class and Description |
|---|---|
static class |
ConditionalOperators.Switch.CaseOperator
Encapsulates the aggregation framework case document inside a
$switch-operation. |
protected String getMongoMethod()
public static ConditionalOperators.Switch switchCases(ConditionalOperators.Switch.CaseOperator... conditions)
ConditionalOperators.Switch.conditions - must not be null.public static ConditionalOperators.Switch switchCases(List<ConditionalOperators.Switch.CaseOperator> conditions)
ConditionalOperators.Switch.conditions - must not be null.public ConditionalOperators.Switch defaultTo(Object value)
public org.bson.Document toDocument(AggregationOperationContext context)
AggregationExpressiontoDocument in interface AggregationExpressionpublic org.bson.Document toDocument(Object value, AggregationOperationContext context)
protected <T> T get(int index)
T - index - protected <T> T get(Object key)
T - key - protected boolean contains(Object key)
key - Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.