|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.metamatrix.query.sql.lang.Criteria com.metamatrix.query.sql.lang.PredicateCriteria com.metamatrix.query.sql.lang.AbstractCompareCriteria com.metamatrix.query.sql.lang.SubqueryCompareCriteria
public class SubqueryCompareCriteria
This class implements a quantified comparison predicate. This is a criteria which represents a simple operator relationship between an expression and either a scalar subquery or a table subquery preceded by one of the possible quantifiers.
The quantifiers are:
NO_QUANTIFIER
, meaning the subquery has no quantifier and therefore must be
a scalar subquerySOME
and ANY
, which are synonymous - the criteria is true if there is at
least one comparison between the left expression and the values of the subquery. The criteria
is false if the subquery returns no rows.ALL
Some examples are:
Field Summary | |
---|---|
static int |
ALL
"All" predicate quantifier |
static int |
ANY
"Any" predicate quantifier (equivalent to "Some") |
static int |
NO_QUANTIFIER
"All" predicate quantifier |
static int |
SOME
"Some" predicate quantifier (equivalent to "Any") |
Fields inherited from class com.metamatrix.query.sql.lang.AbstractCompareCriteria |
---|
EQ, GE, GT, LE, LT, NE |
Constructor Summary | |
---|---|
SubqueryCompareCriteria()
|
|
SubqueryCompareCriteria(Expression leftExpression,
Command subCommand,
int operator,
int predicateQuantifier)
|
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 |
int |
getPredicateQuantifier()
Get the predicate quantifier - returns one of the following: NO_QUANTIFIER
ANY
SOME
ALL |
java.lang.String |
getPredicateQuantifierAsString()
Returns the predicate quantifier as a string. |
Expression |
getRightExpression()
|
ValueIterator |
getValueIterator()
Returns always the same instance of a ValueIterator, but resets it each time this method is called |
int |
hashCode()
Get hash code. |
void |
setCommand(Command command)
Set the subquery command (either a SELECT or a procedure execution). |
void |
setPredicateQuantifier(int predicateQuantifier)
Set the predicate quantifier - use one of the following: NO_QUANTIFIER
ANY
SOME
ALL |
void |
setValueIterator(ValueIterator valueIterator)
Set the ValueIterator on this object (the ValueIterator will encapsulate the single-column results of the subquery processor plan). |
Methods inherited from class com.metamatrix.query.sql.lang.AbstractCompareCriteria |
---|
getLeftExpression, getOperator, getOperator, getOperatorAsString, setLeftExpression, setOperator |
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 |
Field Detail |
---|
public static final int NO_QUANTIFIER
public static final int SOME
public static final int ANY
public static final int ALL
Constructor Detail |
---|
public SubqueryCompareCriteria()
public SubqueryCompareCriteria(Expression leftExpression, Command subCommand, int operator, int predicateQuantifier)
Method Detail |
---|
public int getPredicateQuantifier()
public void setPredicateQuantifier(int predicateQuantifier)
predicateQuantifier
- the predicate quantifierpublic Command getCommand()
SubqueryContainer
getCommand
in interface SubqueryContainer
com.metamatrix.query.sql.lang.SubqueryCriteria#getCommand()
public void setCommand(Command command)
setCommand
in interface SubqueryContainer
command
- Command to execute to get the values for the criteriapublic ValueIterator getValueIterator()
resets
it each time this method is called
getValueIterator
in interface ValueIteratorProvider
MetaMatrixRuntimeException
- if the subquery for this set criteria
has not yet been processed and no value iterator is availablecom.metamatrix.query.sql.lang.SubqueryCriteria#getValueIterator()
public void setValueIterator(ValueIterator valueIterator)
setValueIterator
in interface ValueIteratorProvider
valueIterator
- encapsulating the results of the sub querypublic java.lang.String getPredicateQuantifierAsString()
public void acceptVisitor(LanguageVisitor visitor)
LanguageObject
acceptVisitor
in interface LanguageObject
visitor
- Visitor being usedpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Other object
public java.lang.Object clone()
clone
in interface LanguageObject
clone
in class PredicateCriteria
Object.clone()
public Expression getRightExpression()
getRightExpression
in class AbstractCompareCriteria
AbstractCompareCriteria.getRightExpression()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |