|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.metamatrix.query.sql.proc.Statement com.metamatrix.query.sql.proc.AssignmentStatement
public class AssignmentStatement
This class represents an assignment statement in the storedprocedure language.
It extends the Statement
that could part of a Block
. This
statement holds references to the variable and it's value which could be an
Expression
or a Command
.
Field Summary |
---|
Fields inherited from class com.metamatrix.query.sql.proc.Statement |
---|
TYPE_ASSIGNMENT, TYPE_BREAK, TYPE_COMMAND, TYPE_CONTINUE, TYPE_DECLARE, TYPE_ERROR, TYPE_IF, TYPE_LOOP, TYPE_UNKNOWN, TYPE_WHILE |
Constructor Summary | |
---|---|
AssignmentStatement()
Constructor for AssignmentStatement. |
|
AssignmentStatement(ElementSymbol variable,
LanguageObject value)
|
Method Summary | |
---|---|
void |
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor. |
java.lang.Object |
clone()
Deep clone statement to produce a new identical statement. |
boolean |
equals(java.lang.Object obj)
Compare two AssignmentStatements for equality. |
Command |
getCommand()
Returns the subquery Command object |
Expression |
getExpression()
|
int |
getType()
Return the type for this statement, this is one of the types defined on the statement object. |
LanguageObject |
getValue()
|
ElementSymbol |
getVariable()
Get the expression giving the value that is assigned to the variable. |
boolean |
hasCommand()
|
boolean |
hasExpression()
|
int |
hashCode()
Get hashcode for AssignmentStatement. |
void |
setCommand(Command command)
Sets the subquery Command object |
void |
setExpression(Expression expression)
|
void |
setValue(LanguageObject value)
|
void |
setVariable(ElementSymbol variable)
Set the variable that is assigned to the value |
java.lang.String |
toString()
Returns a string representation of an instance of this class. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AssignmentStatement()
public AssignmentStatement(ElementSymbol variable, LanguageObject value)
Method Detail |
---|
public boolean hasCommand()
public Command getCommand()
SubqueryContainer
getCommand
in interface SubqueryContainer
public void setCommand(Command command)
SubqueryContainer
setCommand
in interface SubqueryContainer
command
- the subquery Command objectpublic boolean hasExpression()
public Expression getExpression()
public void setExpression(Expression expression)
public LanguageObject getValue()
public void setValue(LanguageObject value)
public ElementSymbol getVariable()
Expression
with the valuepublic void setVariable(ElementSymbol variable)
public int getType()
getType
in class Statement
public void acceptVisitor(LanguageVisitor visitor)
LanguageObject
acceptVisitor
in interface LanguageObject
visitor
- Visitor being usedpublic java.lang.Object clone()
clone
in interface LanguageObject
clone
in class Statement
public 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.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |