Module spring.data.mongodb
Interface ScriptOperators.Accumulator.AccumulatorAccumulateBuilder
- All Known Subinterfaces:
ScriptOperators.Accumulator.AccumulatorInitArgsBuilder
- Enclosing class:
- ScriptOperators.Accumulator
public static interface ScriptOperators.Accumulator.AccumulatorAccumulateBuilder
-
Method Summary
Modifier and TypeMethodDescriptionaccumulate(String function) Set theaccumulatefunction that updates the state for each document.accumulate(ScriptOperators.Function function) Set theaccumulateScriptOperators.Functionthat updates the state for each document.
-
Method Details
-
accumulate
default ScriptOperators.Accumulator.AccumulatorMergeBuilder accumulate(ScriptOperators.Function function) Set theaccumulateScriptOperators.Functionthat updates the state for each document. The functions first argument is the currentstate, additional arguments can be defined viaaccumulateArgs.
function(state, accumArg1, accumArg2, ...) { ... return newState }- Parameters:
function- must not be null.- Returns:
- this.
-
accumulate
Set theaccumulatefunction that updates the state for each document. The functions first argument is the currentstate, additional arguments can be defined viaScriptOperators.Accumulator.AccumulatorAccumulateArgsBuilder.accumulateArgs(Object...).
function(state, accumArg1, accumArg2, ...) { ... return newState }- Parameters:
function- must not be null.- Returns:
- this.
-