protected static class BucketOperationSupport.OperationOutput extends BucketOperationSupport.Output
BucketOperationSupport.OperationOutput is used either with a regular field name or an operation keyword (e.g.
$sum, $count).| Constructor and Description |
|---|
OperationOutput(String operation,
Collection<? extends Object> values)
Creates a new
BucketOperationSupport.Output for the given field. |
| Modifier and Type | Method and Description |
|---|---|
protected Field |
getField()
Returns the field that holds the
ProjectionOperationBuilder.OperationProjection. |
protected List<Object> |
getOperationArguments(AggregationOperationContext context) |
com.mongodb.DBObject |
toDbObject(AggregationOperationContext context)
|
BucketOperationSupport.OperationOutput |
withAlias(String alias)
Creates a new instance of this
BucketOperationSupport.OperationOutput with the given alias. |
getExposedFieldpublic OperationOutput(String operation, Collection<? extends Object> values)
BucketOperationSupport.Output for the given field.operation - the actual operation key, must not be null or empty.values - the values to pass into the operation, must not be null.public com.mongodb.DBObject toDbObject(AggregationOperationContext context)
AggregationExpressionprotected List<Object> getOperationArguments(AggregationOperationContext context)
protected Field getField()
ProjectionOperationBuilder.OperationProjection.public BucketOperationSupport.OperationOutput withAlias(String alias)
BucketOperationSupport.OperationOutput with the given alias.alias - the alias to setCopyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.