Package org.teiid.query.sql.symbol
Class SearchedCaseExpression
- java.lang.Object
-
- org.teiid.query.sql.symbol.AbstractCaseExpression
-
- org.teiid.query.sql.symbol.SearchedCaseExpression
-
- All Implemented Interfaces:
Cloneable
,LanguageObject
,Expression
public class SearchedCaseExpression extends AbstractCaseExpression
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.teiid.query.sql.LanguageObject
LanguageObject.Util
-
-
Constructor Summary
Constructors Constructor Description SearchedCaseExpression(List when, List then)
Constructor for SearchedCaseExpression objects
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor.Object
clone()
Implement clone to make objects cloneable.boolean
equals(Object obj)
List
getWhen()
Gets the List of Criteria in the WHEN parts of this expression.int
getWhenCount()
Gets the number of WHEN and THEN parts this case expression contains.Criteria
getWhenCriteria(int index)
Gets the WHEN criteria at the given 0-based index.void
setWhen(List when, List then)
Sets the WHEN and THEN parts of this CASE expression.-
Methods inherited from class org.teiid.query.sql.symbol.AbstractCaseExpression
getElseExpression, getThen, getThenExpression, getType, hashCode, setElseExpression, setThen, setType, toString
-
-
-
-
Method Detail
-
getWhenCount
public int getWhenCount()
Description copied from class:AbstractCaseExpression
Gets the number of WHEN and THEN parts this case expression contains. This number is always >= 1.- Specified by:
getWhenCount
in classAbstractCaseExpression
- Returns:
- See Also:
AbstractCaseExpression.getWhenCount()
-
getWhen
public List getWhen()
Gets the List of Criteria in the WHEN parts of this expression. Never null.- Returns:
-
getWhenCriteria
public Criteria getWhenCriteria(int index)
Gets the WHEN criteria at the given 0-based index.- Parameters:
index
-- Returns:
-
setWhen
public void setWhen(List when, List then)
Sets the WHEN and THEN parts of this CASE expression. Both lists should have the same number of items.- Specified by:
setWhen
in classAbstractCaseExpression
- Parameters:
when
- a non-null List of at least one Criteriathen
- a non-null List of at least one Expression
-
acceptVisitor
public void acceptVisitor(LanguageVisitor visitor)
Description copied from interface:LanguageObject
Method for accepting a visitor. It is the responsibility of the language object to call back on the visitor.- Parameters:
visitor
- Visitor being used
-
clone
public Object clone()
Description copied from interface:LanguageObject
Implement clone to make objects cloneable.- Specified by:
clone
in interfaceLanguageObject
- Specified by:
clone
in classAbstractCaseExpression
- Returns:
- Deep clone of this object
- See Also:
Object.clone()
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classAbstractCaseExpression
-
-