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