|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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.ALLSome 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 |
java.lang.String |
getContextSymbol()
|
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()
|
Expression |
getValueExpression()
|
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 |
| 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 java.lang.String getContextSymbol()
getContextSymbol in interface ContextReferencepublic Expression getValueExpression()
getValueExpression in interface ContextReferencepublic int getPredicateQuantifier()
public void setPredicateQuantifier(int predicateQuantifier)
predicateQuantifier - the predicate quantifierpublic Command getCommand()
SubqueryContainer
getCommand in interface SubqueryContainercom.metamatrix.query.sql.lang.SubqueryCriteria#getCommand()public void setCommand(Command command)
setCommand in interface SubqueryContainercommand - Command to execute to get the values for the criteriapublic java.lang.String getPredicateQuantifierAsString()
public void acceptVisitor(LanguageVisitor visitor)
LanguageObject
acceptVisitor in interface LanguageObjectvisitor - Visitor being usedpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - Other object
public java.lang.Object clone()
clone in interface LanguageObjectclone in class PredicateCriteriaObject.clone()public Expression getRightExpression()
getRightExpression in class AbstractCompareCriteriaAbstractCompareCriteria.getRightExpression()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||