public abstract class BucketOperationSupport<T extends BucketOperationSupport<T,B>,B extends BucketOperationSupport.OutputBuilder<B,T>> extends Object implements FieldsExposingAggregationOperation
BucketOperationSupport.OutputBuilder
.Modifier and Type | Class and Description |
---|---|
static class |
BucketOperationSupport.ExpressionBucketOperationBuilderSupport<B extends BucketOperationSupport.OutputBuilder<B,T>,T extends BucketOperationSupport<T,B>>
Builder for SpEL expression-based
BucketOperationSupport.Output . |
protected static class |
BucketOperationSupport.OperationOutput
Output field that uses a Mongo operation (expression object) to generate an output field value.
|
protected static class |
BucketOperationSupport.Output
Encapsulates an output field in a bucket aggregation stage.
|
static class |
BucketOperationSupport.OutputBuilder<B extends BucketOperationSupport.OutputBuilder<B,T>,T extends BucketOperationSupport<T,B>>
Base class for
BucketOperationSupport.Output builders that result in a BucketOperationSupport providing the built
BucketOperationSupport.Output . |
protected static class |
BucketOperationSupport.Outputs
Encapsulates
BucketOperationSupport.Output s. |
FieldsExposingAggregationOperation.InheritsFieldsAggregationOperation
Modifier | Constructor and Description |
---|---|
protected |
BucketOperationSupport(AggregationExpression groupByExpression)
Creates a new
BucketOperationSupport given a group-by expression . |
protected |
BucketOperationSupport(BucketOperationSupport<?,?> operationSupport)
Creates a copy of
BucketOperationSupport . |
protected |
BucketOperationSupport(BucketOperationSupport<?,?> operationSupport,
BucketOperationSupport.Outputs outputs)
Creates a copy of
BucketOperationSupport and applies the new BucketOperationSupport.Outputs . |
protected |
BucketOperationSupport(Field groupByField)
Creates a new
BucketOperationSupport given a group-by field . |
Modifier and Type | Method and Description |
---|---|
abstract B |
andOutput(AggregationExpression expression)
Creates a new
BucketOperationSupport given an AggregationExpression to add an output field to the
resulting bucket documents. |
protected T |
andOutput(BucketOperationSupport.Output output) |
abstract B |
andOutput(String fieldName)
Creates a new
BucketOperationSupport given fieldName to add an output field to the resulting
bucket documents. |
B |
andOutputCount()
Creates a new
BucketOperationSupport given to add a count field to the resulting bucket documents. |
abstract BucketOperationSupport.ExpressionBucketOperationBuilderSupport<B,T> |
andOutputExpression(String expression,
Object... params)
Creates a new
BucketOperationSupport.ExpressionBucketOperationBuilderSupport given a SpEL expression and optional
params to add an output field to the resulting bucket documents. |
ExposedFields |
getFields()
Returns the fields exposed by the
AggregationOperation . |
boolean |
inheritsFields() |
protected abstract T |
newBucketOperation(BucketOperationSupport.Outputs outputs)
Implementation hook to create a new bucket operation.
|
com.mongodb.DBObject |
toDBObject(AggregationOperationContext context)
|
protected BucketOperationSupport(Field groupByField)
BucketOperationSupport
given a group-by field
.groupByField
- must not be null.protected BucketOperationSupport(AggregationExpression groupByExpression)
BucketOperationSupport
given a group-by expression
.groupByExpression
- must not be null.protected BucketOperationSupport(BucketOperationSupport<?,?> operationSupport)
BucketOperationSupport
.operationSupport
- must not be null.protected BucketOperationSupport(BucketOperationSupport<?,?> operationSupport, BucketOperationSupport.Outputs outputs)
BucketOperationSupport
and applies the new BucketOperationSupport.Outputs
.operationSupport
- must not be null.outputs
- must not be null.public abstract BucketOperationSupport.ExpressionBucketOperationBuilderSupport<B,T> andOutputExpression(String expression, Object... params)
BucketOperationSupport.ExpressionBucketOperationBuilderSupport
given a SpEL expression and optional
params to add an output field to the resulting bucket documents.expression
- the SpEL expression, must not be null or empty.params
- must not be nullpublic abstract B andOutput(AggregationExpression expression)
BucketOperationSupport
given an AggregationExpression
to add an output field to the
resulting bucket documents.expression
- the SpEL expression, must not be null or empty.public abstract B andOutput(String fieldName)
BucketOperationSupport
given fieldName to add an output field to the resulting
bucket documents. BucketOperationSupport
exposes accumulation operations that can be applied to
fieldName.fieldName
- must not be null or empty.public B andOutputCount()
BucketOperationSupport
given to add a count field to the resulting bucket documents.public com.mongodb.DBObject toDBObject(AggregationOperationContext context)
AggregationOperation
toDBObject
in interface AggregationOperation
public ExposedFields getFields()
FieldsExposingAggregationOperation
AggregationOperation
.getFields
in interface FieldsExposingAggregationOperation
public boolean inheritsFields()
inheritsFields
in interface FieldsExposingAggregationOperation
protected abstract T newBucketOperation(BucketOperationSupport.Outputs outputs)
outputs
- the outputsprotected T andOutput(BucketOperationSupport.Output output)
Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.