public static class ComparisonOperators.Cmp extends Object
AggregationExpression for $cmp.| Modifier and Type | Method and Description |
|---|---|
protected List<Object> |
append(Object value) |
protected Map<String,Object> |
append(String key,
Object value) |
protected Map<String,Object> |
argumentMap()
Get the argument map.
|
protected static List<Field> |
asFields(String... fieldRefs) |
ComparisonOperators.Cmp |
compareTo(AggregationExpression expression)
Creates new
ComparisonOperators.Cmp with all previously added arguments appending the given one. |
ComparisonOperators.Cmp |
compareTo(String fieldReference)
Creates new
ComparisonOperators.Cmp with all previously added arguments appending the given one. |
ComparisonOperators.Cmp |
compareToValue(Object value)
Creates new
ComparisonOperators.Cmp with all previously added arguments appending the given one. |
protected boolean |
contains(Object key)
Check if the given key is available.
|
protected <T> T |
get(int index)
Get the value at a given index.
|
protected <T> T |
get(Object key)
Get the value for a given key.
|
protected String |
getMongoMethod() |
org.bson.Document |
toDocument(AggregationOperationContext context)
|
org.bson.Document |
toDocument(Object value,
AggregationOperationContext context) |
static ComparisonOperators.Cmp |
valueOf(AggregationExpression expression)
Creates new
ComparisonOperators.Cmp. |
static ComparisonOperators.Cmp |
valueOf(String fieldReference)
Creates new
ComparisonOperators.Cmp. |
protected List<Object> |
values() |
protected String getMongoMethod()
public static ComparisonOperators.Cmp valueOf(String fieldReference)
ComparisonOperators.Cmp.fieldReference - must not be null.public static ComparisonOperators.Cmp valueOf(AggregationExpression expression)
ComparisonOperators.Cmp.expression - must not be null.public ComparisonOperators.Cmp compareTo(String fieldReference)
ComparisonOperators.Cmp with all previously added arguments appending the given one.fieldReference - must not be null.public ComparisonOperators.Cmp compareTo(AggregationExpression expression)
ComparisonOperators.Cmp with all previously added arguments appending the given one.expression - must not be null.public ComparisonOperators.Cmp compareToValue(Object value)
ComparisonOperators.Cmp with all previously added arguments appending the given one.value - must not be null.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.