public abstract static class BucketOperationSupport.OutputBuilder<B extends BucketOperationSupport.OutputBuilder<B,T>,T extends BucketOperationSupport<T,B>> extends Object
BucketOperationSupport.Output builders that result in a BucketOperationSupport providing the built
BucketOperationSupport.Output.| Modifier and Type | Field and Description |
|---|---|
protected T |
operation |
protected Object |
value |
| Modifier | Constructor and Description |
|---|---|
protected |
OutputBuilder(Object value,
T operation)
Creates a new
BucketOperationSupport.OutputBuilder for the given value and BucketOperationSupport. |
| Modifier and Type | Method and Description |
|---|---|
B |
addToSet()
Generates a builder for an
$addToSet-expression for the current value. |
protected abstract B |
apply(BucketOperationSupport.OperationOutput operationOutput)
Apply an
BucketOperationSupport.OperationOutput to this output. |
B |
apply(String operation,
Object... values)
Apply an operator to the current value.
|
T |
as(String alias)
Returns the finally to be applied
BucketOperation with the given alias. |
B |
avg()
Generates a builder for an
$avg-expression for the current value. |
B |
count()
Generates a builder for a
$sum-expression. |
B |
first()
Generates a builder for a
$first-expression the current value. |
B |
last()
Generates a builder for an
$last-expression for the current value.. |
B |
max()
Generates a builder for an
$max-expression for the current value. |
B |
min()
Generates a builder for an
$min-expression for the current value. |
B |
push()
Generates a builder for an
$push-expression for the current value. |
B |
sum()
Generates a builder for a
$sum-expression for the current value. |
B |
sum(Number value)
Generates a builder for a
$sum-expression for the given value. |
protected final Object value
protected final T extends BucketOperationSupport<T,B> operation
protected OutputBuilder(Object value, T operation)
BucketOperationSupport.OutputBuilder for the given value and BucketOperationSupport.value - must not be null.operation - must not be null.public B count()
$sum-expression. $sum: 1.public B sum()
$sum-expression for the current value.public B sum(Number value)
$sum-expression for the given value.value - public B last()
$last-expression for the current value..public B first()
$first-expression the current value.public B avg()
$avg-expression for the current value.reference - public B min()
$min-expression for the current value.public B max()
$max-expression for the current value.public B push()
$push-expression for the current value.public B addToSet()
$addToSet-expression for the current value.public B apply(String operation, Object... values)
operation - the operation name, must not be null or empty.values - must not be null.protected abstract B apply(BucketOperationSupport.OperationOutput operationOutput)
BucketOperationSupport.OperationOutput to this output.operationOutput - must not be null.public T as(String alias)
BucketOperation with the given alias.alias - will never be null or empty.Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.