org.teiid.connector.language
Interface ISearchedCaseExpression

All Superinterfaces:
IExpression, ILanguageObject

public interface ISearchedCaseExpression
extends IExpression

Represents a non-searched CASE expression:
CASE WHEN criteria THEN expression ... END


Method Summary
 IExpression getElseExpression()
          Gets the ELSE expression, if defined.
 IExpression getThenExpression(int index)
          Gets the THEN expression at the specified index
 int getWhenCount()
          Gets the number of WHEN and THEN clauses in the CASE expression
 ICriteria getWhenCriteria(int index)
          Gets the WHEN criteria at the specified index
 void setElseExpression(IExpression expression)
          Sets the ELSE expression
 void setThenExpression(int index, IExpression expression)
          Sets the THEN expression at the specified index
 void setWhenCriteria(int index, ICriteria criteria)
          Sets the WHEN criteria at the specified index
 
Methods inherited from interface org.teiid.connector.language.IExpression
getType, setType
 
Methods inherited from interface org.teiid.connector.language.ILanguageObject
acceptVisitor
 

Method Detail

getWhenCount

int getWhenCount()
Gets the number of WHEN and THEN clauses in the CASE expression

Returns:
the number of WHEN ... THEN ... parts

getWhenCriteria

ICriteria getWhenCriteria(int index)
Gets the WHEN criteria at the specified index

Parameters:
index - the 0-based index
Returns:
the WHEN criteria at the index

setWhenCriteria

void setWhenCriteria(int index,
                     ICriteria criteria)
Sets the WHEN criteria at the specified index

Parameters:
index - the 0-based index
criteria - The new WHEN criteria at the index

getThenExpression

IExpression getThenExpression(int index)
Gets the THEN expression at the specified index

Parameters:
index - the 0-based index
Returns:
the THEN expression at the index

setThenExpression

void setThenExpression(int index,
                       IExpression expression)
Sets the THEN expression at the specified index

Parameters:
index - the 0-based index
expression - The new THEN expression at the index

getElseExpression

IExpression getElseExpression()
Gets the ELSE expression, if defined. Can be null.

Returns:
the ELSE expression.

setElseExpression

void setElseExpression(IExpression expression)
Sets the ELSE expression

Parameters:
expression - The new ELSE expression


Copyright © 2009. All Rights Reserved.