Class AccumulatorExpression
- java.lang.Object
-
- dev.morphia.aggregation.experimental.expressions.impls.Expression
-
- dev.morphia.aggregation.experimental.expressions.impls.AccumulatorExpression
-
public class AccumulatorExpression extends Expression
- Since:
- 2.1
-
-
Constructor Summary
Constructors Constructor Description AccumulatorExpression(String initFunction, String accumulateFunction, List<Expression> accumulateArgs, String mergeFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
encode(Mapper mapper, org.bson.BsonWriter writer, org.bson.codecs.EncoderContext encoderContext)
AccumulatorExpression
finalizeFunction(String finalizeFunction)
Optional.AccumulatorExpression
initArgs(List<Expression> initArgs)
Optional.-
Methods inherited from class dev.morphia.aggregation.experimental.expressions.impls.Expression
getOperation, getValue, toString
-
-
-
-
Constructor Detail
-
AccumulatorExpression
public AccumulatorExpression(String initFunction, String accumulateFunction, List<Expression> accumulateArgs, String mergeFunction)
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
-
Method Detail
-
encode
public void encode(Mapper mapper, org.bson.BsonWriter writer, org.bson.codecs.EncoderContext encoderContext)
- Overrides:
encode
in classExpression
- Parameters:
mapper
- the mapperwriter
- the writerencoderContext
- the context
-
finalizeFunction
public AccumulatorExpression finalizeFunction(String finalizeFunction)
Optional. Function used to update the result of the accumulation.- Parameters:
finalizeFunction
- the function body- Returns:
- this
-
initArgs
public AccumulatorExpression initArgs(List<Expression> initArgs)
Optional. Arguments passed to the init function.- Parameters:
initArgs
- the arguments- Returns:
- this
-
-