isql.expression
Class When
java.lang.Object
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
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 |
When
public When(IComparison operator,
IConstant against)
- Constructor
- Parameters:
operator
- the operator used in the whenagainst
- the constant that is compared with the values of the column
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