Class ExpressionMath


  • public class ExpressionMath
    extends java.lang.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);
     
    • Constructor Summary

      Constructors 
      Constructor Description
      ExpressionMath()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Expression abs​(Expression expression)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression acos​(Expression expression)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression add​(Expression left, int right)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression add​(Expression right, java.lang.Object left)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression asin​(Expression expression)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression atan​(Expression expression)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression atan2​(Expression expression, int value)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression atan2​(Expression expression, java.lang.Object value)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression atan2​(Expression expression1, Expression expression2)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression ceil​(Expression expression)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression chr​(Expression expression)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression cos​(Expression expression)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression cosh​(Expression expression)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression cot​(Expression expression)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression divide​(Expression left, int right)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression divide​(Expression left, java.lang.Object right)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression exp​(Expression expression)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression floor​(Expression expression)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static ExpressionOperator getOperator​(int selector)
      INTERNAL: Return the operator.
      static Expression ln​(Expression expression)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression log​(Expression expression)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression max​(Expression left, int right)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression max​(Expression left, java.lang.Object right)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression min​(Expression left, int right)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression min​(Expression left, java.lang.Object right)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression mod​(Expression expression, int base)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression mod​(Expression expression, java.lang.Object base)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression multiply​(Expression left, int right)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression multiply​(Expression left, java.lang.Object right)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression negate​(Expression expression)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression power​(Expression expression, int raised)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression power​(Expression expression, java.lang.Object raised)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression round​(Expression expression, int decimalPlaces)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression round​(Expression expression, java.lang.Object decimalPlaces)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression sign​(Expression expression)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression sin​(Expression expression)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression sinh​(Expression expression)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression sqrt​(Expression expression)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression subtract​(Expression left, int right)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression subtract​(Expression left, java.lang.Object right)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression tan​(Expression expression)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression tanh​(Expression expression)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression trunc​(Expression expression, int decimalPlaces)
      PUBLIC: Return a new expression that applies the function to the given expression.
      static Expression trunc​(Expression expression, java.lang.Object decimalPlaces)
      PUBLIC: Return a new expression that applies the function to the given expression.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExpressionMath

        public ExpressionMath()
    • 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.