|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.metamatrix.query.sql.symbol.ScalarSubquery
public class ScalarSubquery
This is an Expression implementation that can be used in a SELECT clause. It has a subquery Command which must only produce exactly one value (or an Exception will result during query processing). It's type will be the type of the one symbol to be produced. In theory an instance of this could be used wherever an Expression is legal, but it is specifically needed for the SELECT clause.
Constructor Summary | |
---|---|
ScalarSubquery(Command subqueryCommand)
|
Method Summary | |
---|---|
void |
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor. |
java.lang.Object |
clone()
Returns a safe clone |
boolean |
equals(java.lang.Object obj)
Compare this ScalarSubquery to another ScalarSubquery for equality. |
Command |
getCommand()
Returns the subquery Command object |
java.lang.Class |
getType()
Get the return type of this expression. |
ValueIterator |
getValueIterator()
Returns always the same instance of a ValueIterator, but resets it each time this method is called |
int |
hashCode()
Get hashcode for the object |
boolean |
isResolved()
Return true if expression has been fully resolved. |
void |
setCommand(Command command)
Sets the command. |
void |
setType(java.lang.Class type)
Set type of ScalarSubquery |
void |
setValueIterator(ValueIterator valueIterator)
Set the ValueIterator on this object (the ValueIterator will encapsulate the single-column results of the subquery processor plan). |
java.lang.String |
toString()
Returns string representation of this object. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ScalarSubquery(Command subqueryCommand)
Method Detail |
---|
public 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.SubqueryLanguageObject#getValueIterator()
public void setValueIterator(ValueIterator valueIterator)
setValueIterator
in interface ValueIteratorProvider
valueIterator
- encapsulating the results of the sub querypublic boolean isResolved()
Expression
isResolved
in interface Expression
Expression.isResolved()
public java.lang.Class getType()
Expression
Expression.isResolved()
returns true).
getType
in interface Expression
Expression.getType()
public void setType(java.lang.Class type)
type
- New typepublic Command getCommand()
SubqueryContainer
getCommand
in interface SubqueryContainer
com.metamatrix.query.sql.lang.SubqueryLanguageObject#getCommand()
public void setCommand(Command command)
setCommand
in interface SubqueryContainer
command
- the subquery Command objectcom.metamatrix.query.sql.lang.SubqueryLanguageObject#setCommand()
public void acceptVisitor(LanguageVisitor visitor)
LanguageObject
acceptVisitor
in interface LanguageObject
visitor
- Visitor being usedpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Other object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object clone()
clone
in interface LanguageObject
clone
in class java.lang.Object
Object.clone()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |