Class AbstractExpression

java.lang.Object
org.castor.cpa.query.object.AbstractQueryObject
org.castor.cpa.query.object.expression.AbstractExpression
All Implemented Interfaces:
Expression, QueryObject
Direct Known Subclasses:
AbstractField, AbstractFunction, AbstractLiteral, AbstractParameter, CompoundExpression, Negate

public abstract class AbstractExpression extends AbstractQueryObject implements Expression
Abstract base class for Expressions.
Since:
1.3
Version:
$Revision: 7121 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
Author:
Udai Gupta, Ralf Joachim
  • Constructor Details

    • AbstractExpression

      public AbstractExpression()
  • Method Details

    • add

      public final Expression add(long value)
      The method for Add arithmetic expression of query objects.
      Specified by:
      add in interface Expression
      Parameters:
      value - The long value
      Returns:
      The Expression of query objects
    • add

      public final Expression add(double value)
      The method for Add ( + ) additive arithmetic expression of query objects.
      Specified by:
      add in interface Expression
      Parameters:
      value - The double value
      Returns:
      The Expression of query objects of query objects
    • add

      public final Expression add(BigDecimal value)
      The method for Add ( + ) additive arithmetic expression of query objects.
      Specified by:
      add in interface Expression
      Parameters:
      value - The BigDecimal value
      Returns:
      The Expression of query objects
    • add

      public Expression add(Expression expression)
      The method for Add ( + ) additive arithmetic expression of query objects.
      Specified by:
      add in interface Expression
      Parameters:
      expression - The Expression value
      Returns:
      The Expression of query objects
    • subtract

      public final Expression subtract(long value)
      The method for Subtract ( - ) additive arithmetic expression of query objects.
      Specified by:
      subtract in interface Expression
      Parameters:
      value - The long value
      Returns:
      The Expression of query objects
    • subtract

      public final Expression subtract(double value)
      The method for Subtract ( - ) additive arithmetic expression of query objects.
      Specified by:
      subtract in interface Expression
      Parameters:
      value - The double value
      Returns:
      The Expression of query objects
    • subtract

      public final Expression subtract(BigDecimal value)
      The method for Subtract ( - ) additive arithmetic expression of query objects.
      Specified by:
      subtract in interface Expression
      Parameters:
      value - The BigDecimal value
      Returns:
      The Expression of query objects
    • subtract

      public Expression subtract(Expression expression)
      The method for Subtract ( - ) additive arithmetic expression of query objects.
      Specified by:
      subtract in interface Expression
      Parameters:
      expression - The Expression value
      Returns:
      The Expression of query objects
    • concat

      public final Expression concat(String value)
      The method for Concat ( || ) additive arithmetic expression of query objects.
      Specified by:
      concat in interface Expression
      Parameters:
      value - The String value
      Returns:
      The Expression of query objects
    • concat

      public Expression concat(Expression expression)
      The method for Concat ( || ) additive arithmetic expression of query objects.
      Specified by:
      concat in interface Expression
      Parameters:
      expression - The Expression value
      Returns:
      The Expression of query objects
    • multiply

      public final Expression multiply(long value)
      The method for Concat ( || ) additive arithmetic expression of query objects.
      Specified by:
      multiply in interface Expression
      Parameters:
      value - The long value
      Returns:
      The Expression of query objects
    • multiply

      public final Expression multiply(double value)
      The method for Multiply ( * ) multiplicative arithmetic expression of query objects.
      Specified by:
      multiply in interface Expression
      Parameters:
      value - The double value
      Returns:
      The Expression of query objects
    • multiply

      public final Expression multiply(BigDecimal value)
      The method for Multiply ( * ) multiplicative arithmetic expression of query objects.
      Specified by:
      multiply in interface Expression
      Parameters:
      value - The BigDecimal value
      Returns:
      The Expression of query objects
    • multiply

      public Expression multiply(Expression expression)
      The method for Multiply ( * ) multiplicative arithmetic expression of query objects.
      Specified by:
      multiply in interface Expression
      Parameters:
      expression - The Expression value
      Returns:
      The Expression of query objects
    • divide

      public final Expression divide(long value)
      The method for Divide ( / ) multiplicative arithmetic expression of query objects.
      Specified by:
      divide in interface Expression
      Parameters:
      value - The long value
      Returns:
      The Expression of query objects
    • divide

      public final Expression divide(double value)
      The method for Divide ( / ) multiplicative arithmetic expression of query objects.
      Specified by:
      divide in interface Expression
      Parameters:
      value - The double value
      Returns:
      The Expression of query objects
    • divide

      public final Expression divide(BigDecimal value)
      The method for Divide ( / ) multiplicative arithmetic expression of query objects.
      Specified by:
      divide in interface Expression
      Parameters:
      value - The BigDecimal value
      Returns:
      The Expression of query objects
    • divide

      public Expression divide(Expression expression)
      The method for Divide ( / ) multiplicative arithmetic expression of query objects.
      Specified by:
      divide in interface Expression
      Parameters:
      expression - The Expression value
      Returns:
      The Expression of query objects
    • remainder

      public final Expression remainder(long value)
      The method for Reminder ( % ) multiplicative arithmetic expression of query objects.
      Specified by:
      remainder in interface Expression
      Parameters:
      value - The long value
      Returns:
      The Expression of query objects
    • remainder

      public final Expression remainder(double value)
      The method for Reminder ( % ) multiplicative arithmetic expression of query objects.
      Specified by:
      remainder in interface Expression
      Parameters:
      value - The double value
      Returns:
      The Expression of query objects
    • remainder

      public final Expression remainder(BigDecimal value)
      The method for Reminder ( % ) multiplicative arithmetic expression of query objects.
      Specified by:
      remainder in interface Expression
      Parameters:
      value - The BigDecimal value
      Returns:
      The Expression of query objects
    • remainder

      public Expression remainder(Expression expression)
      The method for Reminder ( % ) multiplicative arithmetic expression of query objects.
      Specified by:
      remainder in interface Expression
      Parameters:
      expression - The Expression value
      Returns:
      The Expression of query objects
    • plus

      public final Expression plus()
      Plus.
      Specified by:
      plus in interface Expression
      Returns:
      The Expression of query objects
    • negate

      public Expression negate()
      Negate.
      Specified by:
      negate in interface Expression
      Returns:
      The Expression of query objects
    • length

      public final Function length()
      The method for LENGTH function of query objects.
      Specified by:
      length in interface Expression
      Returns:
      The Function of query objects
    • abs

      public final Function abs()
      The method for ABS function of query objects.
      Specified by:
      abs in interface Expression
      Returns:
      The Function of query objects
    • sqrt

      public final Function sqrt()
      The method for SQRT function of query objects.
      Specified by:
      sqrt in interface Expression
      Returns:
      The Function of query objects
    • lower

      public final Function lower()
      The method for LOWER function of query objects.
      Specified by:
      lower in interface Expression
      Returns:
      The Function of query objects
    • upper

      public final Function upper()
      The method for UPPER function of query objects..
      Specified by:
      upper in interface Expression
      Returns:
      The Function of query objects
    • locate

      public final Function locate(String value)
      The method for LOCATE function of query objects.
      Specified by:
      locate in interface Expression
      Parameters:
      value - The String value
      Returns:
      The Function of query objects
    • locate

      public final Function locate(Expression value)
      The method for LOCATE function of query objects.
      Specified by:
      locate in interface Expression
      Parameters:
      value - The Expression value
      Returns:
      The Function of query objects
    • locate

      public final Function locate(String value, int index)
      The method for LOCATE function of query objects.
      Specified by:
      locate in interface Expression
      Parameters:
      value - The String value
      index - The index
      Returns:
      The Function of query objects
    • locate

      public final Function locate(String value, Expression index)
      The method for LOCATE function of query objects.
      Specified by:
      locate in interface Expression
      Parameters:
      value - The value
      index - The index
      Returns:
      The Function of query objects
    • locate

      public final Function locate(Expression value, int index)
      Locate.
      Specified by:
      locate in interface Expression
      Parameters:
      value - The value
      index - The index
      Returns:
      The Function of query objects
    • locate

      public final Function locate(Expression value, Expression index)
      Locate.
      Specified by:
      locate in interface Expression
      Parameters:
      value - The value
      index - The index
      Returns:
      The Function of query objects
    • substring

      public final Function substring(int index, int length)
      Substring.
      Specified by:
      substring in interface Expression
      Parameters:
      index - The index
      length - The length
      Returns:
      The Function of query objects
    • substring

      public final Function substring(int index, Expression length)
      Substring.
      Specified by:
      substring in interface Expression
      Parameters:
      index - The index
      length - The length
      Returns:
      The Function of query objects
    • substring

      public final Function substring(Expression index, int length)
      Substring.
      Specified by:
      substring in interface Expression
      Parameters:
      index - The index
      length - The length
      Returns:
      The Function of query objects
    • substring

      public final Function substring(Expression index, Expression length)
      Substring.
      Specified by:
      substring in interface Expression
      Parameters:
      index - The index
      length - The length
      Returns:
      The Function of query objects
    • trim

      public final Function trim()
      Trim.
      Specified by:
      trim in interface Expression
      Returns:
      The Function of query objects
    • trim

      public final Function trim(char character)
      Trim.
      Specified by:
      trim in interface Expression
      Parameters:
      character - The character
      Returns:
      The Function of query objects
    • trim

      public final Function trim(Parameter character)
      Trim.
      Specified by:
      trim in interface Expression
      Parameters:
      character - The character
      Returns:
      The Function of query objects
    • trim

      public final Function trim(TrimSpecification trimSpecification)
      Trim.
      Specified by:
      trim in interface Expression
      Parameters:
      trimSpecification - The trim specification
      Returns:
      The Function of query objects
    • trim

      public final Function trim(TrimSpecification trimSpecification, char character)
      Trim.
      Specified by:
      trim in interface Expression
      Parameters:
      trimSpecification - The trim specification
      character - The character
      Returns:
      The Function of query objects
    • trim

      public final Function trim(TrimSpecification trimSpecification, Parameter character)
      Trim.
      Specified by:
      trim in interface Expression
      Parameters:
      trimSpecification - The trim specification
      character - The character
      Returns:
      The Function of query objects
    • equal

      public final Condition equal(boolean value)
      Equal.
      Specified by:
      equal in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • equal

      public final Condition equal(long value)
      Equal.
      Specified by:
      equal in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • equal

      public final Condition equal(double value)
      Equal.
      Specified by:
      equal in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • equal

      public final Condition equal(BigDecimal value)
      Equal.
      Specified by:
      equal in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • equal

      public final Condition equal(String value)
      Equal.
      Specified by:
      equal in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • equal

      public final Condition equal(TemporalType temporalType, Date value)
      Equal.
      Specified by:
      equal in interface Expression
      Parameters:
      temporalType - The temporal type
      value - The value
      Returns:
      The condition
    • equal

      public final Condition equal(TemporalType temporalType, Calendar value)
      Equal.
      Specified by:
      equal in interface Expression
      Parameters:
      temporalType - The temporal type
      value - The value
      Returns:
      The condition
    • equal

      public final Condition equal(Expression value)
      Equal.
      Specified by:
      equal in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • notEqual

      public final Condition notEqual(boolean value)
      Not equal.
      Specified by:
      notEqual in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • notEqual

      public final Condition notEqual(long value)
      Not equal.
      Specified by:
      notEqual in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • notEqual

      public final Condition notEqual(double value)
      Not equal.
      Specified by:
      notEqual in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • notEqual

      public final Condition notEqual(BigDecimal value)
      Not equal.
      Specified by:
      notEqual in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • notEqual

      public final Condition notEqual(String value)
      Not equal.
      Specified by:
      notEqual in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • notEqual

      public final Condition notEqual(TemporalType temporalType, Date value)
      Not equal.
      Specified by:
      notEqual in interface Expression
      Parameters:
      temporalType - The temporal type
      value - The value
      Returns:
      The condition
    • notEqual

      public final Condition notEqual(TemporalType temporalType, Calendar value)
      Not equal.
      Specified by:
      notEqual in interface Expression
      Parameters:
      temporalType - The temporal type
      value - The value
      Returns:
      The condition
    • notEqual

      public final Condition notEqual(Expression value)
      Not equal.
      Specified by:
      notEqual in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • lessThan

      public final Condition lessThan(long value)
      Less Then.
      Specified by:
      lessThan in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • lessThan

      public final Condition lessThan(double value)
      Less Then.
      Specified by:
      lessThan in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • lessThan

      public final Condition lessThan(BigDecimal value)
      Less Then.
      Specified by:
      lessThan in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • lessThan

      public final Condition lessThan(String value)
      Less Then.
      Specified by:
      lessThan in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • lessThan

      public final Condition lessThan(TemporalType temporalType, Date value)
      Less Then.
      Specified by:
      lessThan in interface Expression
      Parameters:
      temporalType - The temporal type
      value - The value
      Returns:
      The condition
    • lessThan

      public final Condition lessThan(TemporalType temporalType, Calendar value)
      Less Then.
      Specified by:
      lessThan in interface Expression
      Parameters:
      temporalType - The temporal type
      value - The value
      Returns:
      The condition
    • lessThan

      public final Condition lessThan(Expression value)
      Less Then.
      Specified by:
      lessThan in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • lessEqual

      public final Condition lessEqual(long value)
      Less equal.
      Specified by:
      lessEqual in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • lessEqual

      public final Condition lessEqual(double value)
      Less equal.
      Specified by:
      lessEqual in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • lessEqual

      public final Condition lessEqual(BigDecimal value)
      Less equal.
      Specified by:
      lessEqual in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • lessEqual

      public final Condition lessEqual(String value)
      Less equal.
      Specified by:
      lessEqual in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • lessEqual

      public final Condition lessEqual(TemporalType temporalType, Date value)
      Less equal.
      Specified by:
      lessEqual in interface Expression
      Parameters:
      temporalType - The temporal type
      value - The value
      Returns:
      The condition
    • lessEqual

      public final Condition lessEqual(TemporalType temporalType, Calendar value)
      Less equal.
      Specified by:
      lessEqual in interface Expression
      Parameters:
      temporalType - The temporal type
      value - The value
      Returns:
      The condition
    • lessEqual

      public final Condition lessEqual(Expression value)
      Less equal.
      Specified by:
      lessEqual in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • greaterEqual

      public final Condition greaterEqual(long value)
      Greater equal.
      Specified by:
      greaterEqual in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • greaterEqual

      public final Condition greaterEqual(double value)
      Greater equal.
      Specified by:
      greaterEqual in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • greaterEqual

      public final Condition greaterEqual(BigDecimal value)
      Greater equal.
      Specified by:
      greaterEqual in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • greaterEqual

      public final Condition greaterEqual(String value)
      Greater equal.
      Specified by:
      greaterEqual in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • greaterEqual

      public final Condition greaterEqual(TemporalType temporalType, Date value)
      Greater equal.
      Specified by:
      greaterEqual in interface Expression
      Parameters:
      temporalType - The temporal type
      value - The value
      Returns:
      The condition
    • greaterEqual

      public final Condition greaterEqual(TemporalType temporalType, Calendar value)
      Greater equal.
      Specified by:
      greaterEqual in interface Expression
      Parameters:
      temporalType - The temporal type
      value - The value
      Returns:
      The condition
    • greaterEqual

      public final Condition greaterEqual(Expression value)
      Greater equal.
      Specified by:
      greaterEqual in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • greaterThan

      public final Condition greaterThan(long value)
      Greater Then.
      Specified by:
      greaterThan in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • greaterThan

      public final Condition greaterThan(double value)
      Greater Then.
      Specified by:
      greaterThan in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • greaterThan

      public final Condition greaterThan(BigDecimal value)
      Greater Then.
      Specified by:
      greaterThan in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • greaterThan

      public final Condition greaterThan(String value)
      Greater Then.
      Specified by:
      greaterThan in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • greaterThan

      public final Condition greaterThan(TemporalType temporalType, Date value)
      Greater Then.
      Specified by:
      greaterThan in interface Expression
      Parameters:
      temporalType - The temporal type
      value - The value
      Returns:
      The condition
    • greaterThan

      public final Condition greaterThan(TemporalType temporalType, Calendar value)
      Greater Then.
      Specified by:
      greaterThan in interface Expression
      Parameters:
      temporalType - The temporal type
      value - The value
      Returns:
      The condition
    • greaterThan

      public final Condition greaterThan(Expression value)
      Greater Then.
      Specified by:
      greaterThan in interface Expression
      Parameters:
      value - The value
      Returns:
      The condition
    • like

      public final Condition like(String pattern)
      Like.
      Specified by:
      like in interface Expression
      Parameters:
      pattern - The pattern
      Returns:
      The condition
    • like

      public final Condition like(Parameter pattern)
      Like.
      Specified by:
      like in interface Expression
      Parameters:
      pattern - The pattern
      Returns:
      The condition
    • like

      public final Condition like(String pattern, char escape)
      Like.
      Specified by:
      like in interface Expression
      Parameters:
      pattern - The pattern
      escape - The escape
      Returns:
      The condition
    • like

      public final Condition like(String pattern, Parameter escape)
      Like.
      Specified by:
      like in interface Expression
      Parameters:
      pattern - The pattern
      escape - The escape
      Returns:
      The condition
    • like

      public final Condition like(Parameter pattern, char escape)
      Like.
      Specified by:
      like in interface Expression
      Parameters:
      pattern - The pattern
      escape - The escape
      Returns:
      The condition
    • like

      public final Condition like(Parameter pattern, Parameter escape)
      Like.
      Specified by:
      like in interface Expression
      Parameters:
      pattern - The pattern
      escape - The escape
      Returns:
      The condition
    • notLike

      public final Condition notLike(String pattern)
      Not like.
      Specified by:
      notLike in interface Expression
      Parameters:
      pattern - The pattern
      Returns:
      The condition
    • notLike

      public final Condition notLike(String pattern, char escape)
      Not like.
      Specified by:
      notLike in interface Expression
      Parameters:
      pattern - The pattern
      escape - The escape
      Returns:
      The condition
    • notLike

      public final Condition notLike(String pattern, Parameter escape)
      Not like.
      Specified by:
      notLike in interface Expression
      Parameters:
      pattern - The pattern
      escape - The escape
      Returns:
      The condition
    • notLike

      public final Condition notLike(Parameter pattern)
      Not like.
      Specified by:
      notLike in interface Expression
      Parameters:
      pattern - The pattern
      Returns:
      The condition
    • notLike

      public final Condition notLike(Parameter pattern, char escape)
      Not like.
      Specified by:
      notLike in interface Expression
      Parameters:
      pattern - The pattern
      escape - The escape
      Returns:
      The condition
    • notLike

      public final Condition notLike(Parameter pattern, Parameter escape)
      Not like.
      Specified by:
      notLike in interface Expression
      Parameters:
      pattern - The pattern
      escape - The escape
      Returns:
      The condition
    • between

      public final Condition between(long low, long high)
      Between.
      Specified by:
      between in interface Expression
      Parameters:
      low - The low
      high - The high
      Returns:
      The condition
    • between

      public final Condition between(double low, double high)
      Between.
      Specified by:
      between in interface Expression
      Parameters:
      low - The low
      high - The high
      Returns:
      The condition
    • between

      public final Condition between(BigDecimal low, BigDecimal high)
      Between.
      Specified by:
      between in interface Expression
      Parameters:
      low - The low
      high - The high
      Returns:
      The condition
    • between

      public final Condition between(String low, String high)
      Between.
      Specified by:
      between in interface Expression
      Parameters:
      low - The low
      high - The high
      Returns:
      The condition
    • between

      public final Condition between(TemporalType temporalType, Date low, Date high)
      Between.
      Specified by:
      between in interface Expression
      Parameters:
      temporalType - The temporal type
      low - The low
      high - The high
      Returns:
      The condition
    • between

      public final Condition between(TemporalType temporalType, Calendar low, Calendar high)
      Between.
      Specified by:
      between in interface Expression
      Parameters:
      temporalType - The temporal type
      low - The low
      high - The high
      Returns:
      The condition
    • between

      public final Condition between(Expression low, Expression high)
      Between.
      Specified by:
      between in interface Expression
      Parameters:
      low - The low
      high - The high
      Returns:
      The condition
    • notBetween

      public final Condition notBetween(long low, long high)
      Not between.
      Specified by:
      notBetween in interface Expression
      Parameters:
      low - The low
      high - The high
      Returns:
      The condition
    • notBetween

      public final Condition notBetween(double low, double high)
      Not between.
      Specified by:
      notBetween in interface Expression
      Parameters:
      low - The low
      high - The high
      Returns:
      The condition
    • notBetween

      public final Condition notBetween(BigDecimal low, BigDecimal high)
      Not between.
      Specified by:
      notBetween in interface Expression
      Parameters:
      low - The low
      high - The high
      Returns:
      The condition
    • notBetween

      public final Condition notBetween(String low, String high)
      Not between.
      Specified by:
      notBetween in interface Expression
      Parameters:
      low - The low
      high - The high
      Returns:
      The condition
    • notBetween

      public final Condition notBetween(TemporalType temporalType, Date low, Date high)
      Not between.
      Specified by:
      notBetween in interface Expression
      Parameters:
      temporalType - The temporal type
      low - The low
      high - The high
      Returns:
      The condition
    • notBetween

      public final Condition notBetween(TemporalType temporalType, Calendar low, Calendar high)
      Not between.
      Specified by:
      notBetween in interface Expression
      Parameters:
      temporalType - The temporal type
      low - The low
      high - The high
      Returns:
      The condition
    • notBetween

      public final Condition notBetween(Expression low, Expression high)
      Not between.
      Specified by:
      notBetween in interface Expression
      Parameters:
      low - The low
      high - The high
      Returns:
      The condition