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.Outputs. |
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. |
protected abstract T |
newBucketOperation(BucketOperationSupport.Outputs outputs)
Implementation hook to create a new bucket operation.
|
org.bson.Document |
toDocument(AggregationOperationContext context)
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinheritsFieldsprotected 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 org.bson.Document toDocument(AggregationOperationContext context)
AggregationOperationtoDocument in interface AggregationOperationpublic ExposedFields getFields()
FieldsExposingAggregationOperationAggregationOperation.getFields in interface FieldsExposingAggregationOperationprotected abstract T newBucketOperation(BucketOperationSupport.Outputs outputs)
outputs - the outputsprotected T andOutput(BucketOperationSupport.Output output)
Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.