isql.expression
Class When

java.lang.Object
  extended by isql.expression.When

public class When
extends java.lang.Object

In a case clause, it is the WHEN part of one of the WHEN...THEN clauses. it is in the form: WHEN , e.g. WHEN = 10

Author:
SHZ Oct 24, 2007

Constructor Summary
When(IComparison operator, IConstant against)
          Constructor
 
Method Summary
 boolean[] apply(Column test)
          Compares the column values with the given constant using the given operator,
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

When

public When(IComparison operator,
            IConstant against)
Constructor

Parameters:
operator - the operator used in the when
against - the constant that is compared with the values of the column
Method Detail

apply

public boolean[] apply(Column test)
                throws ISQLException
Compares the column values with the given constant using the given operator,

Parameters:
test - the column to compare
Returns:
a boolean array with one item for each item of the column, that tells if that item satisfied the when condition.
Throws:
ISQLException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object