public static class AccumulatorOperators.Sum extends Object
AggregationExpression for $sum.| Modifier and Type | Method and Description |
|---|---|
AccumulatorOperators.Sum |
and(AggregationExpression expression)
Creates new
AccumulatorOperators.Sum with all previously added arguments appending the given one. |
AccumulatorOperators.Sum |
and(Number value)
Creates new
AccumulatorOperators.Sum with all previously added arguments appending the given one. |
AccumulatorOperators.Sum |
and(String fieldReference)
Creates new
AccumulatorOperators.Sum with all previously added arguments appending the given one. |
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) |
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() |
static AccumulatorOperators.Sum |
sumOf(AggregationExpression expression)
Creates new
AccumulatorOperators.Sum. |
static AccumulatorOperators.Sum |
sumOf(String fieldReference)
Creates new
AccumulatorOperators.Sum. |
org.bson.Document |
toDocument(AggregationOperationContext context)
|
org.bson.Document |
toDocument(Object value,
AggregationOperationContext context) |
protected List<Object> |
values() |
protected String getMongoMethod()
public static AccumulatorOperators.Sum sumOf(String fieldReference)
AccumulatorOperators.Sum.fieldReference - must not be null.public static AccumulatorOperators.Sum sumOf(AggregationExpression expression)
AccumulatorOperators.Sum.expression - must not be null.public AccumulatorOperators.Sum and(String fieldReference)
AccumulatorOperators.Sum with all previously added arguments appending the given one. $project stage.fieldReference - must not be null.public AccumulatorOperators.Sum and(AggregationExpression expression)
AccumulatorOperators.Sum with all previously added arguments appending the given one. $project stage.expression - must not be null.public AccumulatorOperators.Sum and(Number value)
AccumulatorOperators.Sum with all previously added arguments appending the given one. $project stage.value - the value to add.AccumulatorOperators.Sum.public org.bson.Document toDocument(Object value, AggregationOperationContext context)
public org.bson.Document toDocument(AggregationOperationContext context)
AggregationExpressiontoDocument in interface AggregationExpressionprotected <T> T get(int index)
T - index - protected <T> T get(Object key)
T - key - protected boolean contains(Object key)
key - Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.