Package org.teiid.query.sql.lang
Class ExistsCriteria
- java.lang.Object
-
- org.teiid.query.sql.lang.Criteria
-
- org.teiid.query.sql.lang.PredicateCriteria
-
- org.teiid.query.sql.lang.ExistsCriteria
-
- All Implemented Interfaces:
Cloneable
,PredicateCriteria.Negatable
,SubqueryContainer<QueryCommand>
,SubqueryContainer.Evaluatable<QueryCommand>
,LanguageObject
,ContextReference
,Expression
public class ExistsCriteria extends PredicateCriteria implements SubqueryContainer.Evaluatable<QueryCommand>, ContextReference, PredicateCriteria.Negatable
This predicate criteria implements the "exists" predicate, which has a subquery in it. For example, "EXISTS (Select EmployeeID FROM Employees WHERE EmployeeName = 'Smith')".
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExistsCriteria.SubqueryHint
-
Nested classes/interfaces inherited from class org.teiid.query.sql.lang.PredicateCriteria
PredicateCriteria.Negatable
-
Nested classes/interfaces inherited from interface org.teiid.query.sql.LanguageObject
LanguageObject.Util
-
Nested classes/interfaces inherited from interface org.teiid.query.sql.lang.SubqueryContainer
SubqueryContainer.Evaluatable<T extends Command>
-
-
Constructor Summary
Constructors Constructor Description ExistsCriteria()
Default constructorExistsCriteria(QueryCommand subqueryCommand)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor.Object
clone()
Deep copy of object.boolean
equals(Object obj)
Override equals() method.QueryCommand
getCommand()
Returns the subquery Command objectString
getContextSymbol()
ExistsCriteria.SubqueryHint
getSubqueryHint()
int
hashCode()
Get hash code.boolean
isNegated()
void
negate()
void
setCommand(QueryCommand subqueryCommand)
Sets the subquery Command objectvoid
setNegated(boolean negated)
void
setShouldEvaluate(boolean shouldEvaluate)
void
setSubqueryHint(ExistsCriteria.SubqueryHint subqueryHint)
boolean
shouldEvaluate()
-
Methods inherited from class org.teiid.query.sql.lang.Criteria
applyDemorgan, combineCriteria, combineCriteria, combineCriteria, getType, separateCriteriaByAnd, toString
-
-
-
-
Constructor Detail
-
ExistsCriteria
public ExistsCriteria()
Default constructor
-
ExistsCriteria
public ExistsCriteria(QueryCommand subqueryCommand)
-
-
Method Detail
-
shouldEvaluate
public boolean shouldEvaluate()
- Specified by:
shouldEvaluate
in interfaceSubqueryContainer.Evaluatable<QueryCommand>
-
setShouldEvaluate
public void setShouldEvaluate(boolean shouldEvaluate)
- Specified by:
setShouldEvaluate
in interfaceSubqueryContainer.Evaluatable<QueryCommand>
-
getContextSymbol
public String getContextSymbol()
- Specified by:
getContextSymbol
in interfaceContextReference
-
getCommand
public QueryCommand getCommand()
Description copied from interface:SubqueryContainer
Returns the subquery Command object- Specified by:
getCommand
in interfaceSubqueryContainer<QueryCommand>
- Returns:
- the subquery Command object
-
setCommand
public void setCommand(QueryCommand subqueryCommand)
Description copied from interface:SubqueryContainer
Sets the subquery Command object- Specified by:
setCommand
in interfaceSubqueryContainer<QueryCommand>
- Parameters:
subqueryCommand
- the subquery Command object
-
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.- Specified by:
acceptVisitor
in interfaceLanguageObject
- Parameters:
visitor
- Visitor being used
-
hashCode
public int hashCode()
Get hash code. WARNING: The hash code is based on data in the criteria. If data values are changed, the hash code will change - don't hash this object and change values.
-
equals
public boolean equals(Object obj)
Override equals() method.
-
getSubqueryHint
public ExistsCriteria.SubqueryHint getSubqueryHint()
-
setSubqueryHint
public void setSubqueryHint(ExistsCriteria.SubqueryHint subqueryHint)
-
clone
public Object clone()
Deep copy of object. The values Iterator of this object will not be cloned - it will be null in the new object (see #setValueIterator setValueIterator}).- Specified by:
clone
in interfaceLanguageObject
- Specified by:
clone
in classPredicateCriteria
- Returns:
- Deep copy of object
- See Also:
Object.clone()
-
isNegated
public boolean isNegated()
-
setNegated
public void setNegated(boolean negated)
-
negate
public void negate()
- Specified by:
negate
in interfacePredicateCriteria.Negatable
-
-