public static class AccumulatorOperators.Avg extends Object
AggregationExpression
for $avg
.Modifier and Type | Method and Description |
---|---|
AccumulatorOperators.Avg |
and(AggregationExpression expression)
Creates new
AccumulatorOperators.Avg with all previously added arguments appending the given one. |
AccumulatorOperators.Avg |
and(String fieldReference)
Creates new
AccumulatorOperators.Avg 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 static List<Field> |
asFields(String... fieldRefs) |
static AccumulatorOperators.Avg |
avgOf(AggregationExpression expression)
Creates new
AccumulatorOperators.Avg . |
static AccumulatorOperators.Avg |
avgOf(String fieldReference)
Creates new
AccumulatorOperators.Avg . |
protected String |
getMongoMethod() |
com.mongodb.DBObject |
toDbObject(AggregationOperationContext context)
|
com.mongodb.DBObject |
toDbObject(Object value,
AggregationOperationContext context) |
protected List<Object> |
values() |
protected String getMongoMethod()
public static AccumulatorOperators.Avg avgOf(String fieldReference)
AccumulatorOperators.Avg
.fieldReference
- must not be null.public static AccumulatorOperators.Avg avgOf(AggregationExpression expression)
AccumulatorOperators.Avg
.expression
- must not be null.public AccumulatorOperators.Avg and(String fieldReference)
AccumulatorOperators.Avg
with all previously added arguments appending the given one. $project
stage.fieldReference
- must not be null.public AccumulatorOperators.Avg and(AggregationExpression expression)
AccumulatorOperators.Avg
with all previously added arguments appending the given one. $project
stage.expression
- must not be null.public com.mongodb.DBObject toDbObject(Object value, AggregationOperationContext context)
public com.mongodb.DBObject toDbObject(AggregationOperationContext context)
AggregationExpression
toDbObject
in interface AggregationExpression
Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.