Class ExpressionMath
java.lang.Object
org.eclipse.persistence.expressions.ExpressionMath
Purpose: 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 -
Method Summary
Modifier and TypeMethodDescriptionstatic 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, Object decimalPlaces) PUBLIC: Return a new expression that applies the function to the given expression.
-
Constructor Details
-
ExpressionMath
public ExpressionMath()
-
-
Method Details
-
abs
PUBLIC: Return a new expression that applies the function to the given expression.Example:
Example: ExpressionMath.abs(builder.get("netWorth")).greaterThan(1000000); -
acos
PUBLIC: Return a new expression that applies the function to the given expression. -
add
PUBLIC: Return a new expression that applies the function to the given expression. -
add
PUBLIC: Return a new expression that applies the function to the given expression. -
asin
PUBLIC: Return a new expression that applies the function to the given expression. -
atan
PUBLIC: Return a new expression that applies the function to the given expression. -
atan2
PUBLIC: Return a new expression that applies the function to the given expression. -
atan2
PUBLIC: Return a new expression that applies the function to the given expression. -
atan2
PUBLIC: Return a new expression that applies the function to the given expression. -
ceil
PUBLIC: Return a new expression that applies the function to the given expression. -
chr
PUBLIC: Return a new expression that applies the function to the given expression. -
cos
PUBLIC: Return a new expression that applies the function to the given expression. -
cosh
PUBLIC: Return a new expression that applies the function to the given expression. -
cot
PUBLIC: Return a new expression that applies the function to the given expression. -
divide
PUBLIC: Return a new expression that applies the function to the given expression. -
divide
PUBLIC: Return a new expression that applies the function to the given expression. -
exp
PUBLIC: Return a new expression that applies the function to the given expression. -
floor
PUBLIC: Return a new expression that applies the function to the given expression. -
getOperator
INTERNAL: Return the operator. -
ln
PUBLIC: Return a new expression that applies the function to the given expression. -
log
PUBLIC: Return a new expression that applies the function to the given expression. -
max
PUBLIC: Return a new expression that applies the function to the given expression. -
max
PUBLIC: Return a new expression that applies the function to the given expression. -
min
PUBLIC: Return a new expression that applies the function to the given expression. -
min
PUBLIC: Return a new expression that applies the function to the given expression. -
mod
PUBLIC: Return a new expression that applies the function to the given expression. -
mod
PUBLIC: Return a new expression that applies the function to the given expression. -
multiply
PUBLIC: Return a new expression that applies the function to the given expression. -
multiply
PUBLIC: Return a new expression that applies the function to the given expression. -
negate
PUBLIC: Return a new expression that applies the function to the given expression. -
power
PUBLIC: Return a new expression that applies the function to the given expression. -
power
PUBLIC: Return a new expression that applies the function to the given expression. -
round
PUBLIC: Return a new expression that applies the function to the given expression. -
round
PUBLIC: Return a new expression that applies the function to the given expression. -
sign
PUBLIC: Return a new expression that applies the function to the given expression. -
sin
PUBLIC: Return a new expression that applies the function to the given expression. -
sinh
PUBLIC: Return a new expression that applies the function to the given expression. -
sqrt
PUBLIC: Return a new expression that applies the function to the given expression. -
subtract
PUBLIC: Return a new expression that applies the function to the given expression. -
subtract
PUBLIC: Return a new expression that applies the function to the given expression. -
tan
PUBLIC: Return a new expression that applies the function to the given expression. -
tanh
PUBLIC: Return a new expression that applies the function to the given expression. -
trunc
PUBLIC: Return a new expression that applies the function to the given expression. -
trunc
PUBLIC: Return a new expression that applies the function to the given expression.
-