org.josql.expressions
Class IsNullExpression

java.lang.Object
  extended by org.josql.expressions.Expression
      extended by org.josql.expressions.BinaryExpression
          extended by org.josql.expressions.IsNullExpression

public class IsNullExpression
extends BinaryExpression

Represents an "IS NULL" (or "IS NOT NULL") expression.


Field Summary
 
Fields inherited from class org.josql.expressions.BinaryExpression
left, right
 
Constructor Summary
IsNullExpression()
           
 
Method Summary
 boolean isNot()
           
 boolean isTrue(Object o, Query q)
          Determine whether the LHS of this expression is or is not null.
 void setNot(boolean v)
           
 String toString()
          Return a string representation of this expression.
 
Methods inherited from class org.josql.expressions.BinaryExpression
getExpectedReturnType, getLeft, getRight, getValue, hasFixedResult, init, setLeft, setRight
 
Methods inherited from class org.josql.expressions.Expression
isBracketed, setBracketed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IsNullExpression

public IsNullExpression()
Method Detail

isNot

public boolean isNot()

setNot

public void setNot(boolean v)

toString

public String toString()
Return a string representation of this expression. In the form: Expression.toString() IS [ NOT ] NULL

Specified by:
toString in class Expression
Returns:
A string representation of this expression.

isTrue

public boolean isTrue(Object o,
                      Query q)
               throws QueryExecutionException
Determine whether the LHS of this expression is or is not null. Note that this is equivalent to: LHS = null or: LHS != null.

Specified by:
isTrue in class Expression
Parameters:
o - The current object to perform the expression on.
q - The Query object.
Returns:
true if the LHS is null (or not null is specified).
Throws:
QueryExecutionException - If the expression cannot be evaluated.


  Copyright © 2008 Gary Bentley. All Rights Reserved.