Package dev.morphia.aggregation
Class Accumulator
- java.lang.Object
-
- dev.morphia.aggregation.Accumulator
-
public class Accumulator extends java.lang.Object
Defines an accumulator for use in an aggregation pipeline.
-
-
Constructor Summary
Constructors Constructor Description Accumulator(java.lang.String operation, java.lang.Object field)
Defines an accumulator for use in an aggregation pipeline.Accumulator(java.lang.String operation, java.lang.String field)
Defines an accumulator for use in an aggregation pipeline.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Accumulator
accumulator(java.lang.String operation, java.lang.Object field)
Defines an accumulator for use in an aggregation pipeline.static Accumulator
accumulator(java.lang.String operation, java.lang.String field)
Defines an accumulator for use in an aggregation pipeline.java.lang.Object
getField()
Deprecated.usegetValue()
java.lang.String
getOperation()
java.lang.Object
getValue()
com.mongodb.DBObject
toDBObject()
-
-
-
Constructor Detail
-
Accumulator
public Accumulator(java.lang.String operation, java.lang.String field)
Defines an accumulator for use in an aggregation pipeline.- Parameters:
operation
- the accumulator operationfield
- the field to use
-
Accumulator
public Accumulator(java.lang.String operation, java.lang.Object field)
Defines an accumulator for use in an aggregation pipeline.- Parameters:
operation
- the accumulator operationfield
- the field to use
-
-
Method Detail
-
accumulator
public static Accumulator accumulator(java.lang.String operation, java.lang.String field)
Defines an accumulator for use in an aggregation pipeline.- Parameters:
operation
- the accumulator operationfield
- the field to use- Returns:
- an Accumulator
-
accumulator
public static Accumulator accumulator(java.lang.String operation, java.lang.Object field)
Defines an accumulator for use in an aggregation pipeline.- Parameters:
operation
- the accumulator operationfield
- the field to use- Returns:
- an Accumulator
-
getField
@Deprecated public java.lang.Object getField()
Deprecated.usegetValue()
- Returns:
- the value for this accumulator
-
getOperation
public java.lang.String getOperation()
- Returns:
- the operation for this accumulator
-
getValue
public java.lang.Object getValue()
- Returns:
- the value for this accumulator
-
toDBObject
public com.mongodb.DBObject toDBObject()
-
-