Module spring.data.mongodb
Class ArithmeticOperators.ArithmeticOperatorFactory
java.lang.Object
org.springframework.data.mongodb.core.aggregation.ArithmeticOperators.ArithmeticOperatorFactory
- Enclosing class:
- ArithmeticOperators
- Author:
- Christoph Strobl
-
Constructor Summary
ConstructorsConstructorDescriptionArithmeticOperatorFactory(String fieldReference) Creates newArithmeticOperators.ArithmeticOperatorFactoryfor given fieldReference.ArithmeticOperatorFactory(AggregationExpression expression) Creates newArithmeticOperators.ArithmeticOperatorFactoryfor givenAggregationExpression. -
Method Summary
Modifier and TypeMethodDescriptionabs()Creates newAggregationExpressionthat returns the absolute value of the associated number.acos()Creates newAggregationExpressionthat calculates the inverse cosine of a numeric value.acosh()Creates newAggregationExpressionthat calculates the inverse hyperbolic cosine of a numeric value.Creates newAggregationExpressionthat adds the given value to the associated number.Creates newAggregationExpressionthat adds the value of fieldReference to the associated number.add(AggregationExpression expression) Creates newAggregationExpressionthat adds the resulting value of the givenAggregationExpressionto the associated number.asin()Creates newAggregationExpressionthat calculates the inverse sine of a numeric value.asinh()Creates newAggregationExpressionthat calculates the inverse hyperbolic sine of a numeric value.atan()Creates newAggregationExpressionthat calculates the inverse tangent of a numeric value.Creates newAggregationExpressionthat calculates the inverse tangent of the the numeric value divided by the given numeric value in the argument.Creates newAggregationExpressionthat calculates the inverse tangent of the the numeric value divided by the given field reference in the argument.atan2(AggregationExpression expression) Creates newAggregationExpressionthat calculates the inverse tangent of the the numeric value divided by the givenAggregationExpressionin the argument.atanh()Creates newAggregationExpressionthat calculates the inverse hyperbolic tangent of a numeric value.avg()Creates newAggregationExpressionthat returns the average value of the numeric values.ceil()Creates newAggregationExpressionthat returns the smallest integer greater than or equal to the associated number.cos()Creates newAggregationExpressionthat calculates the cosine of a numeric value given inradians.Creates newAggregationExpressionthat calculates the cosine of a numeric value in the givenunit.cosh()Creates newAggregationExpressionthat calculates the hyperbolic cosine of a numeric value given inradians.Creates newAggregationExpressionthat calculates the hyperbolic cosine of a numeric 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 newAggregationExpressionthat calculates the mathematical derivative value.derivative(String unit) Creates newAggregationExpressionthat calculates the mathematical derivative value.Creates newAggregationExpressionthat calculates the mathematical derivative value.Creates newAggregationExpressionthat divides the associated number by given value.Creates newAggregationExpressionthat divides the associated number by number referenced via fieldReference.divideBy(AggregationExpression expression) Creates newAggregationExpressionthat divides the associated number by number extracted via expression.exp()Creates newAggregationExpressionthat raises Euler’s number (i.e. e ) on the associated number.floor()Creates newAggregationExpressionthat returns the largest integer less than or equal to the associated number.integral()Creates newAggregationExpressionthat calculates the approximation for the mathematical integral value.Creates newAggregationExpressionthat calculates the approximation for the mathematical integral value.Creates newAggregationExpressionthat calculates the approximation for the mathematical integral value.ln()Creates newAggregationExpressionthat calculates the natural logarithm ln (i.e loge) of the associated number.Creates newAggregationExpressionthat calculates the log of a the associated number in the specified base.Creates newAggregationExpressionthat calculates the log of the associated number in the specified base referenced via fieldReference.log(AggregationExpression expression) Creates newAggregationExpressionthat calculates the log of the associated number in the specified base extracted by givenAggregationExpression.log10()Creates newAggregationExpressionthat calculates the log base 10 for the associated number.max()Creates newAggregationExpressionthat returns the maximum value.median()Creates newAggregationExpressionthat calculates the requested percentile(s) of the numeric value.min()Creates newAggregationExpressionthat returns the minimum value.Creates newAggregationExpressionthat divides the associated number by another and returns the remainder.Creates newAggregationExpressionthat divides the associated number by another and returns the remainder.mod(AggregationExpression expression) Creates newAggregationExpressionthat divides the associated number by another and returns the remainder.multiplyBy(Number value) Creates newAggregationExpressionthat multiplies the associated number with another.multiplyBy(String fieldReference) Creates newAggregationExpressionthat multiplies the associated number with another.multiplyBy(AggregationExpression expression) Creates newAggregationExpressionthat multiplies the associated number with another.percentile(Double... percentages) Creates newAggregationExpressionthat calculates the requested percentile(s) of the numeric value.Creates newAggregationExpressionthat raises the associated number to the specified exponent.Creates newAggregationExpressionthat raises the associated number to the specified exponent.pow(AggregationExpression expression) Creates newAggregationExpressionthat raises the associated number to the specified exponent.round()Creates newAggregationExpressionthat rounds a number to a whole integer or to a specified decimal place.roundToPlace(int place) Creates newAggregationExpressionthat rounds a number to a specified decimal place.sin()Creates newAggregationExpressionthat calculates the sine of a numeric value given inradians.Creates newAggregationExpressionthat calculates the sine of a numeric value in the givenunit.sinh()Creates newAggregationExpressionthat calculates the sine of a numeric value given inradians.Creates newAggregationExpressionthat calculates the sine of a numeric value.sqrt()Creates newAggregationExpressionthat calculates the square root of the associated number.Creates newAggregationExpressionthat calculates the population standard deviation of the input values.Creates newAggregationExpressionthat calculates the sample standard deviation of the input values.Creates newAggregationExpressionthat subtracts value from the associated number.Creates newAggregationExpressionthat subtracts value of given from the associated number.subtract(AggregationExpression expression) Creates newAggregationExpressionthat subtracts value of given from the associated number.sum()Creates newAggregationExpressionthat calculates and returns the sum of numeric values.tan()Creates newAggregationExpressionthat calculates the tangent of a numeric value given inradians.Creates newAggregationExpressionthat calculates the tangent of a numeric value in the givenunit.tanh()Creates newAggregationExpressionthat calculates the hyperbolic tangent of a numeric value given inradians.Creates newAggregationExpressionthat calculates the hyperbolic tangent of a numeric value.trunc()Creates newAggregationExpressionthat truncates a number to its integer.
-
Constructor Details
-
ArithmeticOperatorFactory
Creates newArithmeticOperators.ArithmeticOperatorFactoryfor given fieldReference.- Parameters:
fieldReference- must not be null.
-
ArithmeticOperatorFactory
Creates newArithmeticOperators.ArithmeticOperatorFactoryfor givenAggregationExpression.- Parameters:
expression- must not be null.
-
-
Method Details
-
abs
Creates newAggregationExpressionthat returns the absolute value of the associated number.- Returns:
- new instance of
ArithmeticOperators.Abs.
-
add
Creates newAggregationExpressionthat adds the value of fieldReference to the associated number.- Parameters:
fieldReference- must not be null.- Returns:
- new instance of
ArithmeticOperators.Add.
-
add
Creates newAggregationExpressionthat adds the resulting value of the givenAggregationExpressionto the associated number.- Parameters:
expression- must not be null.- Returns:
- new instance of
ArithmeticOperators.Add.
-
add
Creates newAggregationExpressionthat adds the given value to the associated number.- Parameters:
value- must not be null.- Returns:
- new instance of
ArithmeticOperators.Add.
-
ceil
Creates newAggregationExpressionthat returns the smallest integer greater than or equal to the associated number.- Returns:
- new instance of
ArithmeticOperators.Ceil.
-
derivative
Creates newAggregationExpressionthat calculates the mathematical derivative value.- Returns:
- new instance of
ArithmeticOperators.Derivative. - Since:
- 3.3
-
derivative
Creates newAggregationExpressionthat calculates the mathematical derivative value.- Parameters:
unit- The time unit (SetWindowFieldsOperation.WindowUnits.WEEK,SetWindowFieldsOperation.WindowUnits.DAY,SetWindowFieldsOperation.WindowUnits.HOUR,SetWindowFieldsOperation.WindowUnits.MINUTE,SetWindowFieldsOperation.WindowUnits.SECOND,SetWindowFieldsOperation.WindowUnits.MILLISECOND) to apply.- Returns:
- new instance of
ArithmeticOperators.Derivative. - Since:
- 3.3
-
derivative
Creates newAggregationExpressionthat calculates the mathematical derivative value.- Parameters:
unit- The time unit (week, day, hour, minute, second, millisecond) to apply can be null.- Returns:
- new instance of
ArithmeticOperators.Derivative. - Since:
- 3.3
-
divideBy
Creates newAggregationExpressionthat divides the associated number by number referenced via fieldReference.- Parameters:
fieldReference- must not be null.- Returns:
- new instance of
ArithmeticOperators.Divide.
-
divideBy
Creates newAggregationExpressionthat divides the associated number by number extracted via expression.- Parameters:
expression- must not be null.- Returns:
- new instance of
ArithmeticOperators.Divide.
-
divideBy
Creates newAggregationExpressionthat divides the associated number by given value.- Parameters:
value- must not be null.- Returns:
- new instance of
ArithmeticOperators.Divide.
-
exp
Creates newAggregationExpressionthat raises Euler’s number (i.e. e ) on the associated number.- Returns:
- new instance of
ArithmeticOperators.Exp.
-
floor
Creates newAggregationExpressionthat returns the largest integer less than or equal to the associated number.- Returns:
- new instance of
ArithmeticOperators.Floor.
-
integral
Creates newAggregationExpressionthat calculates the approximation for the mathematical integral value.- Returns:
- new instance of
ArithmeticOperators.Integral. - Since:
- 3.3
-
integral
Creates newAggregationExpressionthat calculates the approximation for the mathematical integral value.- Parameters:
unit- The time unit (SetWindowFieldsOperation.WindowUnits.WEEK,SetWindowFieldsOperation.WindowUnits.DAY,SetWindowFieldsOperation.WindowUnits.HOUR,SetWindowFieldsOperation.WindowUnits.MINUTE,SetWindowFieldsOperation.WindowUnits.SECOND,SetWindowFieldsOperation.WindowUnits.MILLISECOND) to apply.- Returns:
- new instance of
ArithmeticOperators.Derivative. - Since:
- 3.3
-
integral
Creates newAggregationExpressionthat calculates the approximation for the mathematical integral value.- Parameters:
unit- the unit of measure.- Returns:
- new instance of
ArithmeticOperators.Integral. - Since:
- 3.3
-
ln
Creates newAggregationExpressionthat calculates the natural logarithm ln (i.e loge) of the associated number.- Returns:
- new instance of
ArithmeticOperators.Ln.
-
log
Creates newAggregationExpressionthat calculates the log of the associated number in the specified base referenced via fieldReference.- Parameters:
fieldReference- must not be null.- Returns:
- new instance of
ArithmeticOperators.Log.
-
log
Creates newAggregationExpressionthat calculates the log of the associated number in the specified base extracted by givenAggregationExpression.- Parameters:
expression- must not be null.- Returns:
- new instance of
ArithmeticOperators.Log.
-
log
Creates newAggregationExpressionthat calculates the log of a the associated number in the specified base.- Parameters:
base- must not be null.- Returns:
- new instance of
ArithmeticOperators.Log.
-
log10
Creates newAggregationExpressionthat calculates the log base 10 for the associated number.- Returns:
- new instance of
ArithmeticOperators.Log10.
-
mod
Creates newAggregationExpressionthat divides the associated number by another and returns the remainder.- Parameters:
fieldReference- must not be null.- Returns:
- new instance of
ArithmeticOperators.Mod.
-
mod
Creates newAggregationExpressionthat divides the associated number by another and returns the remainder.- Parameters:
expression- must not be null.- Returns:
- new instance of
ArithmeticOperators.Mod.
-
mod
Creates newAggregationExpressionthat divides the associated number by another and returns the remainder.- Parameters:
value- must not be null.- Returns:
- new instance of
ArithmeticOperators.Mod.
-
multiplyBy
Creates newAggregationExpressionthat multiplies the associated number with another.- Parameters:
fieldReference- must not be null.- Returns:
- new instance of
ArithmeticOperators.Multiply.
-
multiplyBy
Creates newAggregationExpressionthat multiplies the associated number with another.- Parameters:
expression- must not be null.- Returns:
- new instance of
ArithmeticOperators.Multiply.
-
multiplyBy
Creates newAggregationExpressionthat multiplies the associated number with another.- Parameters:
value- must not be null.- Returns:
- new instance of
ArithmeticOperators.Multiply.
-
pow
Creates newAggregationExpressionthat raises the associated number to the specified exponent.- Parameters:
fieldReference- must not be null.- Returns:
- new instance of
ArithmeticOperators.Pow.
-
pow
Creates newAggregationExpressionthat raises the associated number to the specified exponent.- Parameters:
expression- must not be null.- Returns:
- new instance of
ArithmeticOperators.Pow.
-
pow
Creates newAggregationExpressionthat raises the associated number to the specified exponent.- Parameters:
value- must not be null.- Returns:
- new instance of
ArithmeticOperators.Pow.
-
sqrt
Creates newAggregationExpressionthat calculates the square root of the associated number.- Returns:
- new instance of
ArithmeticOperators.Sqrt.
-
subtract
Creates newAggregationExpressionthat subtracts value of given from the associated number.- Parameters:
fieldReference- must not be null.- Returns:
- new instance of
ArithmeticOperators.Subtract.
-
subtract
Creates newAggregationExpressionthat subtracts value of given from the associated number.- Parameters:
expression- must not be null.- Returns:
- new instance of
ArithmeticOperators.Subtract.
-
subtract
Creates newAggregationExpressionthat subtracts value from the associated number.- Parameters:
value- must not be null.- Returns:
- new instance of
ArithmeticOperators.Subtract.
-
trunc
Creates newAggregationExpressionthat truncates a number to its integer.- Returns:
- new instance of
ArithmeticOperators.Trunc.
-
sum
Creates newAggregationExpressionthat calculates and returns the sum of numeric values.- Returns:
- new instance of
AccumulatorOperators.Sum.
-
avg
Creates newAggregationExpressionthat returns the average value of the numeric values.- Returns:
- new instance of
AccumulatorOperators.Avg.
-
max
Creates newAggregationExpressionthat returns the maximum value.- Returns:
- new instance of
AccumulatorOperators.Max.
-
min
Creates newAggregationExpressionthat returns the minimum value.- Returns:
- new instance of
AccumulatorOperators.Min.
-
stdDevPop
Creates newAggregationExpressionthat calculates the population standard deviation of the input values.- Returns:
- new instance of
AccumulatorOperators.StdDevPop.
-
stdDevSamp
Creates newAggregationExpressionthat 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
-
round
Creates newAggregationExpressionthat rounds a number to a whole integer or to a specified decimal place.- Returns:
- new instance of
ArithmeticOperators.Round. - Since:
- 3.0
-
roundToPlace
Creates newAggregationExpressionthat rounds a number to a specified decimal place.- Returns:
- new instance of
ArithmeticOperators.Round. - Since:
- 3.0
-
sin
Creates newAggregationExpressionthat calculates the sine of a numeric value given inradians.- Returns:
- new instance of
ArithmeticOperators.Sin. - Since:
- 3.3
-
sin
Creates newAggregationExpressionthat calculates the sine of a numeric value in the givenunit.- Parameters:
unit- the unit of measure.- Returns:
- new instance of
ArithmeticOperators.Sin. - Since:
- 3.3
-
sinh
Creates newAggregationExpressionthat calculates the sine of a numeric value given inradians.- Returns:
- new instance of
ArithmeticOperators.Sinh. - Since:
- 3.3
-
sinh
Creates newAggregationExpressionthat calculates the sine of a numeric value.- Parameters:
unit- the unit of measure.- Returns:
- new instance of
ArithmeticOperators.Sinh. - Since:
- 3.3
-
asin
Creates newAggregationExpressionthat calculates the inverse sine of a numeric value.- Returns:
- new instance of
ArithmeticOperators.ASin. - Since:
- 3.3
-
asinh
Creates newAggregationExpressionthat calculates the inverse hyperbolic sine of a numeric value.- Returns:
- new instance of
ArithmeticOperators.ASinh. - Since:
- 3.3
-
cos
Creates newAggregationExpressionthat calculates the cosine of a numeric value given inradians.- Returns:
- new instance of
ArithmeticOperators.Cos. - Since:
- 3.3
-
cos
Creates newAggregationExpressionthat calculates the cosine of a numeric value in the givenunit.- Parameters:
unit- the unit of measure.- Returns:
- new instance of
ArithmeticOperators.Cos. - Since:
- 3.3
-
cosh
Creates newAggregationExpressionthat calculates the hyperbolic cosine of a numeric value given inradians.- Returns:
- new instance of
ArithmeticOperators.Cosh. - Since:
- 3.3
-
cosh
Creates newAggregationExpressionthat calculates the hyperbolic cosine of a numeric value.- Parameters:
unit- the unit of measure.- Returns:
- new instance of
ArithmeticOperators.Cosh. - Since:
- 3.3
-
acos
Creates newAggregationExpressionthat calculates the inverse cosine of a numeric value.- Returns:
- new instance of
ArithmeticOperators.ACos. - Since:
- 3.4
-
acosh
Creates newAggregationExpressionthat calculates the inverse hyperbolic cosine of a numeric value.- Returns:
- new instance of
ArithmeticOperators.ACosh. - Since:
- 3.4
-
tan
Creates newAggregationExpressionthat calculates the tangent of a numeric value given inradians.- Returns:
- new instance of
ArithmeticOperators.Tan. - Since:
- 3.3
-
atan
Creates newAggregationExpressionthat calculates the inverse tangent of a numeric value.- Returns:
- new instance of
ArithmeticOperators.ATan. - Since:
- 3.3
-
atan2
Creates newAggregationExpressionthat calculates the inverse tangent of the the numeric value divided by the given numeric value in the argument.- Parameters:
value- the numeric value- Returns:
- new instance of
ArithmeticOperators.ATan2. - Since:
- 3.3
-
atan2
Creates newAggregationExpressionthat calculates the inverse tangent of the the numeric value divided by the given field reference in the argument.- Parameters:
fieldReference- the numeric value- Returns:
- new instance of
ArithmeticOperators.ATan2. - Since:
- 3.3
-
atan2
Creates newAggregationExpressionthat calculates the inverse tangent of the the numeric value divided by the givenAggregationExpressionin the argument.- Parameters:
expression- the expression evaluating to a numeric value- Returns:
- new instance of
ArithmeticOperators.ATan2. - Since:
- 3.3
-
atanh
Creates newAggregationExpressionthat calculates the inverse hyperbolic tangent of a numeric value.- Returns:
- new instance of
ArithmeticOperators.ATanh. - Since:
- 3.3
-
tan
Creates newAggregationExpressionthat calculates the tangent of a numeric value in the givenunit.- Parameters:
unit- the unit of measure.- Returns:
- new instance of
ArithmeticOperators.Tan. - Since:
- 3.3
-
tanh
Creates newAggregationExpressionthat calculates the hyperbolic tangent of a numeric value given inradians.- Returns:
- new instance of
ArithmeticOperators.Tan. - Since:
- 3.3
-
tanh
Creates newAggregationExpressionthat calculates the hyperbolic tangent of a numeric value.- Parameters:
unit- the unit of measure.- Returns:
- new instance of
ArithmeticOperators.Tanh. - Since:
- 3.3
-
percentile
Creates newAggregationExpressionthat calculates the requested percentile(s) of the numeric value.- Parameters:
percentages- must not be null.- Returns:
- new instance of
AccumulatorOperators.Percentile. - Since:
- 4.2
-
median
Creates newAggregationExpressionthat calculates the requested percentile(s) of the numeric value.- Returns:
- new instance of
AccumulatorOperators.Median. - Since:
- 4.2
-