FileDocCategorySizeDatePackage
ExpressionMath.javaAPI DocGlassfish v2 API15694Tue May 22 16:54:20 BST 2007oracle.toplink.essentials.expressions

ExpressionMath

public class ExpressionMath extends Object

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);

Fields Summary
Constructors Summary
Methods Summary
public static oracle.toplink.essentials.expressions.Expressionabs(oracle.toplink.essentials.expressions.Expression expression)
PUBLIC: Return a new expression that aplies the function to the given expression.

Example:

Example: ExpressionMath.abs(builder.get("netWorth")).greaterThan(1000000);

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Abs);
        return anOperator.expressionFor(expression);
    
public static oracle.toplink.essentials.expressions.Expressionacos(oracle.toplink.essentials.expressions.Expression expression)
PUBLIC: Return a new expression that aplies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Acos);
        return anOperator.expressionFor(expression);
    
public static oracle.toplink.essentials.expressions.Expressionadd(oracle.toplink.essentials.expressions.Expression left, int right)
PUBLIC: Return a new expression that aplies the function to the given expression.

        return add(left, new Integer(right));
    
public static oracle.toplink.essentials.expressions.Expressionadd(oracle.toplink.essentials.expressions.Expression right, java.lang.Object left)
PUBLIC: Return a new expression that aplies the function to the given expression.

        ExpressionOperator anOperator = right.getOperator(ExpressionOperator.Add);
        return anOperator.expressionFor(right, left);
    
public static oracle.toplink.essentials.expressions.Expressionasin(oracle.toplink.essentials.expressions.Expression expression)
PUBLIC: Return a new expression that aplies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Asin);
        return anOperator.expressionFor(expression);
    
public static oracle.toplink.essentials.expressions.Expressionatan(oracle.toplink.essentials.expressions.Expression expression)
PUBLIC: Return a new expression that aplies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Atan);
        return anOperator.expressionFor(expression);
    
public static oracle.toplink.essentials.expressions.Expressionatan2(oracle.toplink.essentials.expressions.Expression expression, int value)
PUBLIC: Return a new expression that applies the function to the given expression.

        return atan2(expression, new Integer(value));
    
public static oracle.toplink.essentials.expressions.Expressionatan2(oracle.toplink.essentials.expressions.Expression expression, java.lang.Object value)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Atan2);
        return anOperator.expressionFor(expression, value);
    
public static oracle.toplink.essentials.expressions.Expressionatan2(oracle.toplink.essentials.expressions.Expression expression1, oracle.toplink.essentials.expressions.Expression expression2)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = expression1.getOperator(ExpressionOperator.Atan2);
        return anOperator.expressionFor(expression1, expression2);
    
public static oracle.toplink.essentials.expressions.Expressionceil(oracle.toplink.essentials.expressions.Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Ceil);
        return anOperator.expressionFor(expression);
    
public static oracle.toplink.essentials.expressions.Expressionchr(oracle.toplink.essentials.expressions.Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Chr);
        return anOperator.expressionFor(expression);
    
public static oracle.toplink.essentials.expressions.Expressioncos(oracle.toplink.essentials.expressions.Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Cos);
        return anOperator.expressionFor(expression);
    
public static oracle.toplink.essentials.expressions.Expressioncosh(oracle.toplink.essentials.expressions.Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Cosh);
        return anOperator.expressionFor(expression);
    
public static oracle.toplink.essentials.expressions.Expressioncot(oracle.toplink.essentials.expressions.Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Cot);
        return anOperator.expressionFor(expression);
    
public static oracle.toplink.essentials.expressions.Expressiondivide(oracle.toplink.essentials.expressions.Expression left, int right)
PUBLIC: Return a new expression that aplies the function to the given expression.

        return divide(left, new Integer(right));
    
public static oracle.toplink.essentials.expressions.Expressiondivide(oracle.toplink.essentials.expressions.Expression left, java.lang.Object right)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = left.getOperator(ExpressionOperator.Divide);
        return anOperator.expressionFor(left, right);
    
public static oracle.toplink.essentials.expressions.Expressionexp(oracle.toplink.essentials.expressions.Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Exp);
        return anOperator.expressionFor(expression);
    
public static oracle.toplink.essentials.expressions.Expressionfloor(oracle.toplink.essentials.expressions.Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Floor);
        return anOperator.expressionFor(expression);
    
public static oracle.toplink.essentials.expressions.ExpressionOperatorgetOperator(int selector)
INTERNAL: Return the operator.

        ExpressionOperator result = ExpressionOperator.getOperator(new Integer(selector));
        if (result != null) {
            return result;
        }

        // Make a temporary operator which we expect the platform
        // to supply later.
        result = new ExpressionOperator();
        result.setSelector(selector);
        result.setNodeClass(ClassConstants.FunctionExpression_Class);
        return result;
    
public static oracle.toplink.essentials.expressions.Expressionln(oracle.toplink.essentials.expressions.Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Ln);
        return anOperator.expressionFor(expression);
    
public static oracle.toplink.essentials.expressions.Expressionlog(oracle.toplink.essentials.expressions.Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Log);
        return anOperator.expressionFor(expression);
    
public static oracle.toplink.essentials.expressions.Expressionmax(oracle.toplink.essentials.expressions.Expression left, int right)
PUBLIC: Return a new expression that applies the function to the given expression.

        return max(left, new Integer(right));
    
public static oracle.toplink.essentials.expressions.Expressionmax(oracle.toplink.essentials.expressions.Expression left, java.lang.Object right)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = left.getOperator(ExpressionOperator.Greatest);
        return anOperator.expressionFor(left, right);
    
public static oracle.toplink.essentials.expressions.Expressionmin(oracle.toplink.essentials.expressions.Expression left, int right)
PUBLIC: Return a new expression that applies the function to the given expression.

        return min(left, new Integer(right));
    
public static oracle.toplink.essentials.expressions.Expressionmin(oracle.toplink.essentials.expressions.Expression left, java.lang.Object right)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = left.getOperator(ExpressionOperator.Least);
        return anOperator.expressionFor(left, right);
    
public static oracle.toplink.essentials.expressions.Expressionmod(oracle.toplink.essentials.expressions.Expression expression, int base)
PUBLIC: Return a new expression that applies the function to the given expression.

        return mod(expression, new Integer(base));
    
public static oracle.toplink.essentials.expressions.Expressionmod(oracle.toplink.essentials.expressions.Expression expression, java.lang.Object base)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Mod);
        return anOperator.expressionFor(expression, base);
    
public static oracle.toplink.essentials.expressions.Expressionmultiply(oracle.toplink.essentials.expressions.Expression left, int right)
PUBLIC: Return a new expression that applies the function to the given expression.

        return multiply(left, new Integer(right));
    
public static oracle.toplink.essentials.expressions.Expressionmultiply(oracle.toplink.essentials.expressions.Expression left, java.lang.Object right)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = left.getOperator(ExpressionOperator.Multiply);
        return anOperator.expressionFor(left, right);
    
public static oracle.toplink.essentials.expressions.Expressionpower(oracle.toplink.essentials.expressions.Expression expression, int raised)
PUBLIC: Return a new expression that applies the function to the given expression.

        return power(expression, new Integer(raised));
    
public static oracle.toplink.essentials.expressions.Expressionpower(oracle.toplink.essentials.expressions.Expression expression, java.lang.Object raised)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Power);
        return anOperator.expressionFor(expression, raised);
    
public static oracle.toplink.essentials.expressions.Expressionround(oracle.toplink.essentials.expressions.Expression expression, int decimalPlaces)
PUBLIC: Return a new expression that applies the function to the given expression.

        return round(expression, new Integer(decimalPlaces));
    
public static oracle.toplink.essentials.expressions.Expressionround(oracle.toplink.essentials.expressions.Expression expression, java.lang.Object decimalPlaces)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Round);
        return anOperator.expressionFor(expression, decimalPlaces);
    
public static oracle.toplink.essentials.expressions.Expressionsign(oracle.toplink.essentials.expressions.Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Sign);
        return anOperator.expressionFor(expression);
    
public static oracle.toplink.essentials.expressions.Expressionsin(oracle.toplink.essentials.expressions.Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Sin);
        return anOperator.expressionFor(expression);
    
public static oracle.toplink.essentials.expressions.Expressionsinh(oracle.toplink.essentials.expressions.Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Sinh);
        return anOperator.expressionFor(expression);
    
public static oracle.toplink.essentials.expressions.Expressionsubtract(oracle.toplink.essentials.expressions.Expression left, int right)
PUBLIC: Return a new expression that applies the function to the given expression.

        return subtract(left, new Integer(right));
    
public static oracle.toplink.essentials.expressions.Expressionsubtract(oracle.toplink.essentials.expressions.Expression left, java.lang.Object right)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = left.getOperator(ExpressionOperator.Subtract);
        return anOperator.expressionFor(left, right);
    
public static oracle.toplink.essentials.expressions.Expressiontan(oracle.toplink.essentials.expressions.Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Tan);
        return anOperator.expressionFor(expression);
    
public static oracle.toplink.essentials.expressions.Expressiontanh(oracle.toplink.essentials.expressions.Expression expression)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Tanh);
        return anOperator.expressionFor(expression);
    
public static oracle.toplink.essentials.expressions.Expressiontrunc(oracle.toplink.essentials.expressions.Expression expression, int decimalPlaces)
PUBLIC: Return a new expression that applies the function to the given expression.

        return trunc(expression, new Integer(decimalPlaces));
    
public static oracle.toplink.essentials.expressions.Expressiontrunc(oracle.toplink.essentials.expressions.Expression expression, java.lang.Object decimalPlaces)
PUBLIC: Return a new expression that applies the function to the given expression.

        ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Trunc);
        return anOperator.expressionFor(expression, decimalPlaces);