Class AccumulatorOperators.AccumulatorOperatorFactory
java.lang.Object
org.springframework.data.mongodb.core.aggregation.AccumulatorOperators.AccumulatorOperatorFactory
- Enclosing class:
- AccumulatorOperators
- Author:
- Christoph Strobl, Julia Lee
-
Constructor Summary
ConstructorDescriptionAccumulatorOperatorFactory
(String fieldReference) Creates newAccumulatorOperators.AccumulatorOperatorFactory
for given fieldReference.AccumulatorOperatorFactory
(AggregationExpression expression) Creates newAccumulatorOperators.AccumulatorOperatorFactory
for givenAggregationExpression
. -
Method Summary
Modifier and TypeMethodDescriptionavg()
Creates newAggregationExpression
that takes the associated numeric value expression and returns the average value.covariancePop
(String fieldReference) Creates newAggregationExpression
that uses the previous input (field/expression) and the value of the given field to calculate the population covariance of the two.covariancePop
(AggregationExpression expression) Creates newAggregationExpression
that uses the previous input (field/expression) and the result of the givenexpression
to calculate the population covariance of the two.covarianceSamp
(String fieldReference) Creates newAggregationExpression
that uses the previous input (field/expression) and the value of the given field to calculate the sample covariance of the two.covarianceSamp
(AggregationExpression expression) Creates newAggregationExpression
that uses the previous input (field/expression) and the result of the givenexpression
to calculate the sample covariance of the two.Creates newAccumulatorOperators.ExpMovingAvgBuilder
that to buildexpMovingAvg
that calculates the exponential moving average of numeric valuesmax()
Creates newAggregationExpression
that takes the associated numeric value expression and returns the maximum value.max
(int numberOfResults) Creates newAggregationExpression
that takes the associated numeric value expression and returns the requested number of maximum values.median()
Creates newAggregationExpression
that calculates the median of the associated numeric value expression.min()
Creates newAggregationExpression
that takes the associated numeric value expression and returns the minimum value.min
(int numberOfResults) Creates newAggregationExpression
that takes the associated numeric value expression and returns the requested number of maximum values.percentile
(Double... percentages) Creates newAggregationExpression
that calculates the requested percentile(s) of the associated numeric value expression.Creates newAggregationExpression
that takes the associated numeric value expression and calculates the population standard deviation of the input values.Creates newAggregationExpression
that takes the associated numeric value expression and calculates the sample standard deviation of the input values.sum()
Creates newAggregationExpression
that takes the associated numeric value expression and calculates and returns the sum.
-
Constructor Details
-
AccumulatorOperatorFactory
Creates newAccumulatorOperators.AccumulatorOperatorFactory
for given fieldReference.- Parameters:
fieldReference
- must not be null.
-
AccumulatorOperatorFactory
Creates newAccumulatorOperators.AccumulatorOperatorFactory
for givenAggregationExpression
.- Parameters:
expression
- must not be null.
-
-
Method Details
-
sum
Creates newAggregationExpression
that takes the associated numeric value expression and calculates and returns the sum.- Returns:
- new instance of
AccumulatorOperators.Sum
.
-
avg
Creates newAggregationExpression
that takes the associated numeric value expression and returns the average value.- Returns:
- new instance of
AccumulatorOperators.Avg
.
-
max
Creates newAggregationExpression
that takes the associated numeric value expression and returns the maximum value.- Returns:
- new instance of
AccumulatorOperators.Max
.
-
max
Creates newAggregationExpression
that takes the associated numeric value expression and returns the requested number of maximum values.- Returns:
- new instance of
AccumulatorOperators.Max
. - Since:
- 4.0
-
min
Creates newAggregationExpression
that takes the associated numeric value expression and returns the minimum value.- Returns:
- new instance of
AccumulatorOperators.Min
.
-
min
Creates newAggregationExpression
that takes the associated numeric value expression and returns the requested number of maximum values.- Returns:
- new instance of
AccumulatorOperators.Max
. - Since:
- 4.0
-
stdDevPop
Creates newAggregationExpression
that takes the associated numeric value expression and calculates the population standard deviation of the input values.- Returns:
- new instance of
AccumulatorOperators.StdDevPop
.
-
stdDevSamp
Creates newAggregationExpression
that takes the associated numeric value expression and calculates the sample standard deviation of the input values.- Returns:
- new instance of
AccumulatorOperators.StdDevSamp
.
-
covariancePop
Creates newAggregationExpression
that uses the previous input (field/expression) and the value of the given field to calculate the population covariance of the two.- Parameters:
fieldReference
- must not be null.- Returns:
- new instance of
AccumulatorOperators.CovariancePop
. - Since:
- 3.3
-
covariancePop
Creates newAggregationExpression
that uses the previous input (field/expression) and the result of the givenexpression
to calculate the population covariance of the two.- Parameters:
expression
- must not be null.- Returns:
- new instance of
AccumulatorOperators.CovariancePop
. - Since:
- 3.3
-
covarianceSamp
Creates newAggregationExpression
that uses the previous input (field/expression) and the value of the given field to calculate the sample covariance of the two.- Parameters:
fieldReference
- must not be null.- Returns:
- new instance of
AccumulatorOperators.CovariancePop
. - Since:
- 3.3
-
covarianceSamp
Creates newAggregationExpression
that uses the previous input (field/expression) and the result of the givenexpression
to calculate the sample covariance of the two.- Parameters:
expression
- must not be null.- Returns:
- new instance of
AccumulatorOperators.CovariancePop
. - Since:
- 3.3
-
expMovingAvg
Creates newAccumulatorOperators.ExpMovingAvgBuilder
that to buildexpMovingAvg
that calculates the exponential moving average of numeric values- Returns:
- new instance of
AccumulatorOperators.ExpMovingAvg
. - Since:
- 3.3
-
percentile
Creates newAggregationExpression
that calculates the requested percentile(s) of the associated numeric value expression.- Parameters:
percentages
- must not be null.- Returns:
- new instance of
AccumulatorOperators.Percentile
. - Since:
- 4.2
-
median
Creates newAggregationExpression
that calculates the median of the associated numeric value expression.- Returns:
- new instance of
AccumulatorOperators.Median
. - Since:
- 4.2
-