com.onewebsql.query
Class LExp

java.lang.Object
  extended by com.onewebsql.query.Exp
      extended by com.onewebsql.query.LExp
All Implemented Interfaces:
Expression

public class LExp
extends Exp

Represents a logical expression i.e., the one which has a logical value, true or false.

It is convenient to distinguished to types of logical expressions used in this component

expression type description
terminal expressions Expression which has a logical value. It may be created by comparison of two arithmetic expressions AExp.
nonterminal expressions Expression which is composed of other logical expression joined with logical operations: AND, OR, negation etc.


Field Summary
static LExp FALSE
          Constant representing a logical expression which is always false
static LExp TRUE
          Constant representing a logical expression which is always true
 
Fields inherited from class com.onewebsql.query.Exp
brackets, left, operator, right
 
Fields inherited from interface com.onewebsql.query.Expression
COMMA, DOT, LB, QUESTION_MARK, RB, SPACE
 
Method Summary
 LExp alias(String tableName, String columnName)
          Returns an expression which represents a reference to the expression using the specified table/column alias.
 LExp and(LExp exp)
          Creates the logical expression representing the conjunction ('AND') of this expression and a specified expression.
static LExp and(LExp left, LExp right)
          Creates the logical conjunction ('AND') of the specified expressions.
static LExp and(List<LExp> l)
          Creates the logical expression representing the conjunction ('AND') of the specified list of logical expressions.
static LExp between(AExp mostLeft, AExp left, AExp right)
          Creates a logical expression using the operator BETWEEN (as in (a BETWEEN b AND c) or equivalently: (a >= b AND a <= c)).
static LExp br(LExp exp)
          Puts parentheses around the specifed logical expression.
static LExp buildAndEq(List<? extends AExp> aexps1, List<Object> aexps2)
          Builds a logical expression LExp of the form: <exp1_1> = <exp2_1> and <exp1_2> = <exp2_2> and ...
static LExp eq(AExp left, AExp right)
          Creates a logical expression using the equality operator ('=').
static LExp eq(BigDecimal left, BigDecimal right)
          Creates a logical expression using the equality operator ('=').
static LExp eq(boolean left, boolean right)
          Creates a logical expression using the equality operator ('=').
static LExp eq(Boolean left, Boolean right)
          Creates a logical expression using the equality operator ('=').
static LExp eq(Date left, Date right)
          Creates a logical expression using the equality operator ('=').
static LExp eq(Date left, Date right)
          Creates a logical expression using the equality operator ('=').
static LExp eq(double left, double right)
          Creates a logical expression using the equality operator ('=').
static LExp eq(Double left, Double right)
          Creates a logical expression using the equality operator ('=').
static LExp eq(Float left, Float right)
          Creates a logical expression using the equality operator ('=').
static LExp eq(Integer left, Integer right)
          Creates a logical expression using the equality operator ('=').
static LExp eq(long left, long right)
          Creates a logical expression using the equality operator ('=').
static LExp eq(Long left, Long right)
          Creates a logical expression using the equality operator ('=').
static LExp eq(String left, String right)
          Creates a logical expression using the equality operator ('=').
static LExp eq(Timestamp left, Timestamp right)
          Creates a logical expression using the equality operator ('=').
static LExp eq(Time left, Time right)
          Creates a logical expression using the equality operator ('=').
static LExp exists(SelectQuery query)
          Creates a logical expression representing 'EXISTS' condition, as in '...
static LExp ge(AExp left, AExp right)
          Creates a logical expression using the greater than or equal to operator ('>=').
static LExp ge(BigDecimal left, BigDecimal right)
          Creates a logical expression using the greater than or equal to operator ('>=').
static LExp ge(Date left, Date right)
          Creates a logical expression using the greater than or equal to operator ('>=').
static LExp ge(Date left, Date right)
          Creates a logical expression using the greater than or equal to operator ('>=').
static LExp ge(double left, double right)
          Creates a logical expression using the greater than or equal to operator ('>=').
static LExp ge(Double left, Double right)
          Creates a logical expression using the greater than or equal to operator ('>=').
static LExp ge(Float left, Float right)
          Creates a logical expression using the greater than or equal to operator ('>=').
static LExp ge(Integer left, Integer right)
          Creates a logical expression using the greater than or equal to operator ('>=').
static LExp ge(long left, long right)
          Creates a logical expression using the greater than or equal to operator ('>=').
static LExp ge(Long left, Long right)
          Creates a logical expression using the greater than or equal to operator ('>=').
static LExp ge(Timestamp left, Timestamp right)
          Creates a logical expression using the greater than or equal to operator ('>=').
static LExp ge(Time left, Time right)
          Creates a logical expression using the greater than or equal to operator ('>=').
static LExp gt(AExp left, AExp right)
          Creates a logical expression using the greater than operator ('>').
static LExp gt(BigDecimal left, BigDecimal right)
          Creates a logical expression using the greater than operator ('>').
static LExp gt(Date left, Date right)
          Creates a logical expression using the greater than operator ('>').
static LExp gt(Date left, Date right)
          Creates a logical expression using the greater than operator ('>').
static LExp gt(double left, double right)
          Creates a logical expression using the greater than operator ('>').
static LExp gt(Double left, Double right)
          Creates a logical expression using the greater than operator ('>').
static LExp gt(Float left, Float right)
          Creates a logical expression using the greater than operator ('>').
static LExp gt(Integer left, Integer right)
          Creates a logical expression using the greater than operator ('>').
static LExp gt(long left, long right)
          Creates a logical expression using the greater than operator ('>').
static LExp gt(Long left, Long right)
          Creates a logical expression using the greater than operator ('>').
static LExp gt(Timestamp left, Timestamp right)
          Creates a logical expression using the greater than operator ('>').
static LExp gt(Time left, Time right)
          Creates a logical expression using the greater than operator ('>').
static LExp ilike(AExp exp, String substring)
          Creates a logical expression composed of two operands and the 'ILIKE' operator (case-insensitive 'LIKE').
static LExp ilike(AExp exp, String substring, Locale locale)
          Creates a logical expression composed of two operands and the 'ILIKE' operator (case-insensitive 'LIKE').
static LExp isNotNull(AExp exp)
          Creates a logical expression testing whether the specifies arithmetic expression is not null ('IS NOT NULL' condition).
static LExp isNull(AExp exp)
          Creates a logical expression testing whether the specifies arithmetic expression is null ('IS NULL' condition).
static LExp le(AExp left, AExp right)
          Creates a logical expression using the less than or equal to operator ('<=').
static LExp le(BigDecimal left, BigDecimal right)
          Creates a logical expression using the less than or equal to operator ('<=').
static LExp le(Date left, Date right)
          Creates a logical expression using the less than or equal to operator ('<=').
static LExp le(Date left, Date right)
          Creates a logical expression using the less than or equal to operator ('<=').
static LExp le(double left, double right)
          Creates a logical expression using the less than or equal to operator ('<=').
static LExp le(Double left, Double right)
          Creates a logical expression using the less than or equal to operator ('<=').
static LExp le(Float left, Float right)
          Creates a logical expression using the less than or equal to operator ('<=').
static LExp le(Integer left, Integer right)
          Creates a logical expression using the less than or equal to operator ('<=').
static LExp le(long left, long right)
          Creates a logical expression using the less than or equal to operator ('<=').
static LExp le(Long left, Long right)
          Creates a logical expression using the less than or equal to operator ('<=').
static LExp le(Timestamp left, Timestamp right)
          Creates a logical expression using the less than or equal to operator ('<=').
static LExp le(Time left, Time right)
          Creates a logical expression using the less than or equal to operator ('<=').
static LExp like(AExp left, AExp right)
          Creates a logical expression composed of two operands and the 'LIKE' operator.
static LExp lt(AExp left, AExp right)
          Creates a logical expression using the less than operator ('<').
static LExp lt(BigDecimal left, BigDecimal right)
          Creates a logical expression using the less than operator ('<').
static LExp lt(Date left, Date right)
          Creates a logical expression using the less than operator ('<').
static LExp lt(Date left, Date right)
          Creates a logical expression using the less than operator ('<').
static LExp lt(double left, double right)
          Creates a logical expression using the less than operator ('<').
static LExp lt(Double left, Double right)
          Creates a logical expression using the less than operator ('<').
static LExp lt(Float left, Float right)
          Creates a logical expression using the less than operator ('<').
static LExp lt(Integer left, Integer right)
          Creates a logical expression using the less than operator ('<').
static LExp lt(long left, long right)
          Creates a logical expression using the less than operator ('<').
static LExp lt(Long left, Long right)
          Creates a logical expression using the less than operator ('<').
static LExp lt(Timestamp left, Timestamp right)
          Creates a logical expression using the less than operator ('<').
static LExp lt(Time left, Time right)
          Creates a logical expression using the less than operator ('<').
static LExp ne(AExp left, AExp right)
          Creates a logical expression using the inequality operator ('<>').
static LExp ne(BigDecimal left, BigDecimal right)
          Creates a logical expression using the inequality operator ('<>').
static LExp ne(boolean left, boolean right)
          Creates a logical expression using the inequality operator ('<>').
static LExp ne(Boolean left, Boolean right)
          Creates a logical expression using the inequality operator ('<>').
static LExp ne(Date left, Date right)
          Creates a logical expression using the inequality operator ('<>').
static LExp ne(Date left, Date right)
          Creates a logical expression using the inequality operator ('<>').
static LExp ne(double left, double right)
          Creates a logical expression using the inequality operator ('<>').
static LExp ne(Double left, Double right)
          Creates a logical expression using the inequality operator ('<>').
static LExp ne(Float left, Float right)
          Creates a logical expression using the inequality operator ('<>').
static LExp ne(Integer left, Integer right)
          Creates a logical expression using the inequality operator ('<>').
static LExp ne(long left, long right)
          Creates a logical expression using the inequality operator ('<>').
static LExp ne(Long left, Long right)
          Creates a logical expression using the inequality operator ('<>').
static LExp ne(String left, String right)
          Creates a logical expression using the inequality operator ('<>').
static LExp ne(Timestamp left, Timestamp right)
          Creates a logical expression using the inequality operator ('<>').
static LExp ne(Time left, Time right)
          Creates a logical expression using the inequality operator ('<>').
static LExp not(LExp exp)
          Creates the logical negation ('NOT') of the specified expression.
 LExp or(LExp exp)
          Creates the logical expression representing the alternative ('OR') of this expression and a specified expression.
static LExp or(LExp left, LExp right)
          Creates the logical alternative ('OR') of the specified expressions.
static LExp or(List<LExp> l)
          Creates the logical expression representing the alternative ('OR') of the specified list of logical expressions.
static LExp unique(SelectQuery query)
          Creates a logical expression representing 'UNIQUE' condition, as in '...
 
Methods inherited from class com.onewebsql.query.Exp
aliasColumn, aliasTable, build, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TRUE

public static final LExp TRUE
Constant representing a logical expression which is always true


FALSE

public static final LExp FALSE
Constant representing a logical expression which is always false

Method Detail

br

public static LExp br(LExp exp)
Puts parentheses around the specifed logical expression.

Parameters:
exp - logical expression
Returns:
an logical expression exp with parentheses around it

like

public static LExp like(AExp left,
                        AExp right)
Creates a logical expression composed of two operands and the 'LIKE' operator.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ilike

public static LExp ilike(AExp exp,
                         String substring)
Creates a logical expression composed of two operands and the 'ILIKE' operator (case-insensitive 'LIKE'). The special search characters ('%' and '_') are escaped.

Parameters:
exp - left operand
substring - right operand
Returns:
the created logical expression

ilike

public static LExp ilike(AExp exp,
                         String substring,
                         Locale locale)
Creates a logical expression composed of two operands and the 'ILIKE' operator (case-insensitive 'LIKE'). The letter case is taked from the specified locale. The special search characters ('%' and '_') are escaped.

Parameters:
exp - left operand
substring - right operand
locale - locale
Returns:
the created logical expression

between

public static LExp between(AExp mostLeft,
                           AExp left,
                           AExp right)
Creates a logical expression using the operator BETWEEN (as in (a BETWEEN b AND c) or equivalently: (a >= b AND a <= c)). Puts the expression in parentheses.

Parameters:
mostLeft - mostleft operand ('a' in the example)
left - left operand ('b' in the example)
right - right operand ('c' in the example)
Returns:
the created logical expression

eq

public static LExp eq(AExp left,
                      AExp right)
Creates a logical expression using the equality operator ('='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

eq

public static LExp eq(boolean left,
                      boolean right)
Creates a logical expression using the equality operator ('='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

eq

public static LExp eq(long left,
                      long right)
Creates a logical expression using the equality operator ('='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

eq

public static LExp eq(double left,
                      double right)
Creates a logical expression using the equality operator ('='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

eq

public static LExp eq(Boolean left,
                      Boolean right)
Creates a logical expression using the equality operator ('='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

eq

public static LExp eq(Integer left,
                      Integer right)
Creates a logical expression using the equality operator ('='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

eq

public static LExp eq(Long left,
                      Long right)
Creates a logical expression using the equality operator ('='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

eq

public static LExp eq(Float left,
                      Float right)
Creates a logical expression using the equality operator ('='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

eq

public static LExp eq(Double left,
                      Double right)
Creates a logical expression using the equality operator ('='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

eq

public static LExp eq(BigDecimal left,
                      BigDecimal right)
Creates a logical expression using the equality operator ('='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

eq

public static LExp eq(String left,
                      String right)
Creates a logical expression using the equality operator ('='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

eq

public static LExp eq(Date left,
                      Date right)
Creates a logical expression using the equality operator ('='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

eq

public static LExp eq(Date left,
                      Date right)
Creates a logical expression using the equality operator ('='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

eq

public static LExp eq(Time left,
                      Time right)
Creates a logical expression using the equality operator ('='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

eq

public static LExp eq(Timestamp left,
                      Timestamp right)
Creates a logical expression using the equality operator ('='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ne

public static LExp ne(AExp left,
                      AExp right)
Creates a logical expression using the inequality operator ('<>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ne

public static LExp ne(boolean left,
                      boolean right)
Creates a logical expression using the inequality operator ('<>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ne

public static LExp ne(long left,
                      long right)
Creates a logical expression using the inequality operator ('<>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ne

public static LExp ne(double left,
                      double right)
Creates a logical expression using the inequality operator ('<>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ne

public static LExp ne(Boolean left,
                      Boolean right)
Creates a logical expression using the inequality operator ('<>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ne

public static LExp ne(Integer left,
                      Integer right)
Creates a logical expression using the inequality operator ('<>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ne

public static LExp ne(Long left,
                      Long right)
Creates a logical expression using the inequality operator ('<>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ne

public static LExp ne(Float left,
                      Float right)
Creates a logical expression using the inequality operator ('<>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ne

public static LExp ne(Double left,
                      Double right)
Creates a logical expression using the inequality operator ('<>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ne

public static LExp ne(BigDecimal left,
                      BigDecimal right)
Creates a logical expression using the inequality operator ('<>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ne

public static LExp ne(String left,
                      String right)
Creates a logical expression using the inequality operator ('<>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ne

public static LExp ne(Date left,
                      Date right)
Creates a logical expression using the inequality operator ('<>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ne

public static LExp ne(Date left,
                      Date right)
Creates a logical expression using the inequality operator ('<>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ne

public static LExp ne(Time left,
                      Time right)
Creates a logical expression using the inequality operator ('<>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ne

public static LExp ne(Timestamp left,
                      Timestamp right)
Creates a logical expression using the inequality operator ('<>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

gt

public static LExp gt(AExp left,
                      AExp right)
Creates a logical expression using the greater than operator ('>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

gt

public static LExp gt(long left,
                      long right)
Creates a logical expression using the greater than operator ('>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

gt

public static LExp gt(double left,
                      double right)
Creates a logical expression using the greater than operator ('>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

gt

public static LExp gt(Integer left,
                      Integer right)
Creates a logical expression using the greater than operator ('>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

gt

public static LExp gt(Long left,
                      Long right)
Creates a logical expression using the greater than operator ('>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

gt

public static LExp gt(Float left,
                      Float right)
Creates a logical expression using the greater than operator ('>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

gt

public static LExp gt(Double left,
                      Double right)
Creates a logical expression using the greater than operator ('>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

gt

public static LExp gt(BigDecimal left,
                      BigDecimal right)
Creates a logical expression using the greater than operator ('>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

gt

public static LExp gt(Date left,
                      Date right)
Creates a logical expression using the greater than operator ('>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

gt

public static LExp gt(Date left,
                      Date right)
Creates a logical expression using the greater than operator ('>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

gt

public static LExp gt(Time left,
                      Time right)
Creates a logical expression using the greater than operator ('>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

gt

public static LExp gt(Timestamp left,
                      Timestamp right)
Creates a logical expression using the greater than operator ('>'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ge

public static LExp ge(AExp left,
                      AExp right)
Creates a logical expression using the greater than or equal to operator ('>='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ge

public static LExp ge(long left,
                      long right)
Creates a logical expression using the greater than or equal to operator ('>='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ge

public static LExp ge(double left,
                      double right)
Creates a logical expression using the greater than or equal to operator ('>='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ge

public static LExp ge(Integer left,
                      Integer right)
Creates a logical expression using the greater than or equal to operator ('>='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ge

public static LExp ge(Long left,
                      Long right)
Creates a logical expression using the greater than or equal to operator ('>='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ge

public static LExp ge(Float left,
                      Float right)
Creates a logical expression using the greater than or equal to operator ('>='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ge

public static LExp ge(Double left,
                      Double right)
Creates a logical expression using the greater than or equal to operator ('>='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ge

public static LExp ge(BigDecimal left,
                      BigDecimal right)
Creates a logical expression using the greater than or equal to operator ('>='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ge

public static LExp ge(Date left,
                      Date right)
Creates a logical expression using the greater than or equal to operator ('>='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ge

public static LExp ge(Date left,
                      Date right)
Creates a logical expression using the greater than or equal to operator ('>='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ge

public static LExp ge(Time left,
                      Time right)
Creates a logical expression using the greater than or equal to operator ('>='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

ge

public static LExp ge(Timestamp left,
                      Timestamp right)
Creates a logical expression using the greater than or equal to operator ('>='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

lt

public static LExp lt(AExp left,
                      AExp right)
Creates a logical expression using the less than operator ('<'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

lt

public static LExp lt(long left,
                      long right)
Creates a logical expression using the less than operator ('<'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

lt

public static LExp lt(double left,
                      double right)
Creates a logical expression using the less than operator ('<'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

lt

public static LExp lt(Integer left,
                      Integer right)
Creates a logical expression using the less than operator ('<'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

lt

public static LExp lt(Long left,
                      Long right)
Creates a logical expression using the less than operator ('<'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

lt

public static LExp lt(Float left,
                      Float right)
Creates a logical expression using the less than operator ('<'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

lt

public static LExp lt(Double left,
                      Double right)
Creates a logical expression using the less than operator ('<'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

lt

public static LExp lt(BigDecimal left,
                      BigDecimal right)
Creates a logical expression using the less than operator ('<'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

lt

public static LExp lt(Date left,
                      Date right)
Creates a logical expression using the less than operator ('<'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

lt

public static LExp lt(Date left,
                      Date right)
Creates a logical expression using the less than operator ('<'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

lt

public static LExp lt(Time left,
                      Time right)
Creates a logical expression using the less than operator ('<'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

lt

public static LExp lt(Timestamp left,
                      Timestamp right)
Creates a logical expression using the less than operator ('<'). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

le

public static LExp le(AExp left,
                      AExp right)
Creates a logical expression using the less than or equal to operator ('<='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

le

public static LExp le(long left,
                      long right)
Creates a logical expression using the less than or equal to operator ('<='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

le

public static LExp le(double left,
                      double right)
Creates a logical expression using the less than or equal to operator ('<='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

le

public static LExp le(Integer left,
                      Integer right)
Creates a logical expression using the less than or equal to operator ('<='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

le

public static LExp le(Long left,
                      Long right)
Creates a logical expression using the less than or equal to operator ('<='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

le

public static LExp le(Float left,
                      Float right)
Creates a logical expression using the less than or equal to operator ('<='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

le

public static LExp le(Double left,
                      Double right)
Creates a logical expression using the less than or equal to operator ('<='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

le

public static LExp le(BigDecimal left,
                      BigDecimal right)
Creates a logical expression using the less than or equal to operator ('<='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

le

public static LExp le(Date left,
                      Date right)
Creates a logical expression using the less than or equal to operator ('<='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

le

public static LExp le(Date left,
                      Date right)
Creates a logical expression using the less than or equal to operator ('<='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

le

public static LExp le(Time left,
                      Time right)
Creates a logical expression using the less than or equal to operator ('<='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

le

public static LExp le(Timestamp left,
                      Timestamp right)
Creates a logical expression using the less than or equal to operator ('<='). Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

and

public static LExp and(LExp left,
                       LExp right)
Creates the logical conjunction ('AND') of the specified expressions. Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

or

public static LExp or(LExp left,
                      LExp right)
Creates the logical alternative ('OR') of the specified expressions. Puts the expression in parentheses.

Parameters:
left - left operand
right - right operand
Returns:
the created logical expression

not

public static LExp not(LExp exp)
Creates the logical negation ('NOT') of the specified expression. Puts the expression in parentheses.

Parameters:
exp - expression to negate.
Returns:
the created logical expression

exists

public static LExp exists(SelectQuery query)
Creates a logical expression representing 'EXISTS' condition, as in '... WHERE EXISTS SELECT ...'.

Parameters:
query - SELECT query
Returns:
the created logical expression

unique

public static LExp unique(SelectQuery query)
Creates a logical expression representing 'UNIQUE' condition, as in '... WHERE UNIQUE SELECT ...'.

Parameters:
query - SELECT query
Returns:
the created logical expression

isNull

public static LExp isNull(AExp exp)
Creates a logical expression testing whether the specifies arithmetic expression is null ('IS NULL' condition).

Parameters:
exp - expression to test for nullability.
Returns:
the created logical expression

isNotNull

public static LExp isNotNull(AExp exp)
Creates a logical expression testing whether the specifies arithmetic expression is not null ('IS NOT NULL' condition).

Parameters:
exp - expression to test for nullability.
Returns:
the created logical expression

and

public LExp and(LExp exp)
Creates the logical expression representing the conjunction ('AND') of this expression and a specified expression. It does not put the expression in parentheses.

Parameters:
exp - right operand
Returns:
the created logical expression

and

public static LExp and(List<LExp> l)
Creates the logical expression representing the conjunction ('AND') of the specified list of logical expressions. If the list is empty, it returns TRUE.

Parameters:
l - list of logical expressions
Returns:
the conjunction of the specified list of expressions or TRUE if the list is empty

or

public LExp or(LExp exp)
Creates the logical expression representing the alternative ('OR') of this expression and a specified expression. It does not put the expression in parentheses.

Parameters:
exp - right operand
Returns:
the created logical expression

or

public static LExp or(List<LExp> l)
Creates the logical expression representing the alternative ('OR') of the specified list of logical expressions. If the list is empty, it returns FALSE.

Parameters:
l - list of logical expressions
Returns:
the conjunction of the specified list of expressions or FALSE if the list is empty

alias

public LExp alias(String tableName,
                  String columnName)
Description copied from class: Exp
Returns an expression which represents a reference to the expression using the specified table/column alias.

Specified by:
alias in class Exp
Parameters:
tableName - table alias
columnName - column alias
Returns:
aliased expression

buildAndEq

public static LExp buildAndEq(List<? extends AExp> aexps1,
                              List<Object> aexps2)
Builds a logical expression LExp of the form:
    <exp1_1> = <exp2_1> and
    <exp1_2> = <exp2_2> and
    ...
    <exp1_n> = <exp2_n>
 
The expressions exp_1_1 ... exp_1_n are taken from the first list, the expressions exp_2_1 ... exp_2_n from the other.

Parameters:
aexps1 - list of left expressions
aexps2 - list of right expressions
Returns:
a logical expression representing a conjunction of equalities between the respective elements of both lists
Throws:
IllegalArgumentException - if the lists have different length


Copyright © 2011-2013 e-point SA. All Rights Reserved.