com.metamatrix.query.sql.lang
Class ExistsCriteria

java.lang.Object
  extended by com.metamatrix.query.sql.lang.Criteria
      extended by com.metamatrix.query.sql.lang.PredicateCriteria
          extended by com.metamatrix.query.sql.lang.ExistsCriteria
All Implemented Interfaces:
SubqueryContainer, LanguageObject, ContextReference, java.io.Serializable, java.lang.Cloneable

public class ExistsCriteria
extends PredicateCriteria
implements SubqueryContainer, ContextReference

This predicate criteria implements the "exists" predicate, which has a subquery in it. For example, "EXISTS (Select EmployeeID FROM Employees WHERE EmployeeName = 'Smith')".

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.metamatrix.query.sql.lang.PredicateCriteria
PredicateCriteria.Negatable
 
Constructor Summary
ExistsCriteria()
          Default constructor
ExistsCriteria(Command subqueryCommand)
           
 
Method Summary
 void acceptVisitor(LanguageVisitor visitor)
          Method for accepting a visitor.
 java.lang.Object clone()
          Deep copy of object.
 boolean equals(java.lang.Object obj)
          Override equals() method.
 Command getCommand()
          Returns the subquery Command object
 java.lang.String getContextSymbol()
           
 Expression getValueExpression()
           
 int hashCode()
          Get hash code.
 void setCommand(Command subqueryCommand)
          Sets the subquery Command object
 
Methods inherited from class com.metamatrix.query.sql.lang.Criteria
combineCriteria, combineCriteria, combineCriteria, separateCriteriaByAnd, toConjunctiveNormalForm, toDisjunctiveNormalForm, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExistsCriteria

public ExistsCriteria()
Default constructor


ExistsCriteria

public ExistsCriteria(Command subqueryCommand)
Method Detail

getContextSymbol

public java.lang.String getContextSymbol()
Specified by:
getContextSymbol in interface ContextReference

getValueExpression

public Expression getValueExpression()
Specified by:
getValueExpression in interface ContextReference

getCommand

public Command getCommand()
Description copied from interface: SubqueryContainer
Returns the subquery Command object

Specified by:
getCommand in interface SubqueryContainer
Returns:
the subquery Command object
See Also:
com.metamatrix.query.sql.lang.SubqueryCriteria#getCommand()

setCommand

public void setCommand(Command subqueryCommand)
Description copied from interface: SubqueryContainer
Sets the subquery Command object

Specified by:
setCommand in interface SubqueryContainer
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 interface LanguageObject
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.

Overrides:
hashCode in class java.lang.Object
Returns:
Hash code

equals

public boolean equals(java.lang.Object obj)
Override equals() method.

Overrides:
equals in class java.lang.Object
Parameters:
obj - Other object
Returns:
True if equal

clone

public java.lang.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 interface LanguageObject
Specified by:
clone in class PredicateCriteria
Returns:
Deep copy of object
See Also:
Object.clone()


Copyright © 2009. All Rights Reserved.