Class ExpressionMath
- java.lang.Object
-
- org.eclipse.persistence.expressions.ExpressionMath
-
public class ExpressionMath extends java.lang.ObjectPurpose: This class mirrors the java.lang.Math class to allow mathimetical function support within expressions.
Example:
ExpressionBuilder builder = new ExpressionBuilder(); Expression poorAndRich = ExpressionMath.abs(builder.get("netWorth")).greaterThan(1000000); session.readAllObjects(Company.class, poorAndRich);
-
-
Constructor Summary
Constructors Constructor Description ExpressionMath()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Expressionabs(Expression expression)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionacos(Expression expression)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionadd(Expression left, int right)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionadd(Expression right, java.lang.Object left)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionasin(Expression expression)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionatan(Expression expression)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionatan2(Expression expression, int value)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionatan2(Expression expression, java.lang.Object value)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionatan2(Expression expression1, Expression expression2)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionceil(Expression expression)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionchr(Expression expression)PUBLIC: Return a new expression that applies the function to the given expression.static Expressioncos(Expression expression)PUBLIC: Return a new expression that applies the function to the given expression.static Expressioncosh(Expression expression)PUBLIC: Return a new expression that applies the function to the given expression.static Expressioncot(Expression expression)PUBLIC: Return a new expression that applies the function to the given expression.static Expressiondivide(Expression left, int right)PUBLIC: Return a new expression that applies the function to the given expression.static Expressiondivide(Expression left, java.lang.Object right)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionexp(Expression expression)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionfloor(Expression expression)PUBLIC: Return a new expression that applies the function to the given expression.static ExpressionOperatorgetOperator(int selector)INTERNAL: Return the operator.static Expressionln(Expression expression)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionlog(Expression expression)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionmax(Expression left, int right)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionmax(Expression left, java.lang.Object right)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionmin(Expression left, int right)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionmin(Expression left, java.lang.Object right)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionmod(Expression expression, int base)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionmod(Expression expression, java.lang.Object base)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionmultiply(Expression left, int right)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionmultiply(Expression left, java.lang.Object right)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionnegate(Expression expression)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionpower(Expression expression, int raised)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionpower(Expression expression, java.lang.Object raised)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionround(Expression expression, int decimalPlaces)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionround(Expression expression, java.lang.Object decimalPlaces)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionsign(Expression expression)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionsin(Expression expression)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionsinh(Expression expression)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionsqrt(Expression expression)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionsubtract(Expression left, int right)PUBLIC: Return a new expression that applies the function to the given expression.static Expressionsubtract(Expression left, java.lang.Object right)PUBLIC: Return a new expression that applies the function to the given expression.static Expressiontan(Expression expression)PUBLIC: Return a new expression that applies the function to the given expression.static Expressiontanh(Expression expression)PUBLIC: Return a new expression that applies the function to the given expression.static Expressiontrunc(Expression expression, int decimalPlaces)PUBLIC: Return a new expression that applies the function to the given expression.static Expressiontrunc(Expression expression, java.lang.Object decimalPlaces)PUBLIC: Return a new expression that applies the function to the given expression.
-
-
-
Method Detail
-
abs
public static Expression abs(Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.Example:
Example: ExpressionMath.abs(builder.get("netWorth")).greaterThan(1000000);
-
acos
public static Expression acos(Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.
-
add
public static Expression add(Expression left, int right)
PUBLIC: Return a new expression that applies the function to the given expression.
-
add
public static Expression add(Expression right, java.lang.Object left)
PUBLIC: Return a new expression that applies the function to the given expression.
-
asin
public static Expression asin(Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.
-
atan
public static Expression atan(Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.
-
atan2
public static Expression atan2(Expression expression, int value)
PUBLIC: Return a new expression that applies the function to the given expression.
-
atan2
public static Expression atan2(Expression expression, java.lang.Object value)
PUBLIC: Return a new expression that applies the function to the given expression.
-
atan2
public static Expression atan2(Expression expression1, Expression expression2)
PUBLIC: Return a new expression that applies the function to the given expression.
-
ceil
public static Expression ceil(Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.
-
chr
public static Expression chr(Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.
-
cos
public static Expression cos(Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.
-
cosh
public static Expression cosh(Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.
-
cot
public static Expression cot(Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.
-
divide
public static Expression divide(Expression left, int right)
PUBLIC: Return a new expression that applies the function to the given expression.
-
divide
public static Expression divide(Expression left, java.lang.Object right)
PUBLIC: Return a new expression that applies the function to the given expression.
-
exp
public static Expression exp(Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.
-
floor
public static Expression floor(Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.
-
getOperator
public static ExpressionOperator getOperator(int selector)
INTERNAL: Return the operator.
-
ln
public static Expression ln(Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.
-
log
public static Expression log(Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.
-
max
public static Expression max(Expression left, int right)
PUBLIC: Return a new expression that applies the function to the given expression.
-
max
public static Expression max(Expression left, java.lang.Object right)
PUBLIC: Return a new expression that applies the function to the given expression.
-
min
public static Expression min(Expression left, int right)
PUBLIC: Return a new expression that applies the function to the given expression.
-
min
public static Expression min(Expression left, java.lang.Object right)
PUBLIC: Return a new expression that applies the function to the given expression.
-
mod
public static Expression mod(Expression expression, int base)
PUBLIC: Return a new expression that applies the function to the given expression.
-
mod
public static Expression mod(Expression expression, java.lang.Object base)
PUBLIC: Return a new expression that applies the function to the given expression.
-
multiply
public static Expression multiply(Expression left, int right)
PUBLIC: Return a new expression that applies the function to the given expression.
-
multiply
public static Expression multiply(Expression left, java.lang.Object right)
PUBLIC: Return a new expression that applies the function to the given expression.
-
negate
public static Expression negate(Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.
-
power
public static Expression power(Expression expression, int raised)
PUBLIC: Return a new expression that applies the function to the given expression.
-
power
public static Expression power(Expression expression, java.lang.Object raised)
PUBLIC: Return a new expression that applies the function to the given expression.
-
round
public static Expression round(Expression expression, int decimalPlaces)
PUBLIC: Return a new expression that applies the function to the given expression.
-
round
public static Expression round(Expression expression, java.lang.Object decimalPlaces)
PUBLIC: Return a new expression that applies the function to the given expression.
-
sign
public static Expression sign(Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.
-
sin
public static Expression sin(Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.
-
sinh
public static Expression sinh(Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.
-
sqrt
public static Expression sqrt(Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.
-
subtract
public static Expression subtract(Expression left, int right)
PUBLIC: Return a new expression that applies the function to the given expression.
-
subtract
public static Expression subtract(Expression left, java.lang.Object right)
PUBLIC: Return a new expression that applies the function to the given expression.
-
tan
public static Expression tan(Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.
-
tanh
public static Expression tanh(Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.
-
trunc
public static Expression trunc(Expression expression, int decimalPlaces)
PUBLIC: Return a new expression that applies the function to the given expression.
-
trunc
public static Expression trunc(Expression expression, java.lang.Object decimalPlaces)
PUBLIC: Return a new expression that applies the function to the given expression.
-
-