|
||||||||||
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 com.metamatrix.query.sql.proc.DeclareStatement
public class DeclareStatement
This class represents a statement used to declare variables in the
storedprocedure language. It extends the Statement
that
could part of a Block
. This this object holds variable and
it's type.
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 | |
---|---|
DeclareStatement()
Constructor for DeclareStatement. |
|
DeclareStatement(ElementSymbol variable,
java.lang.String varType)
Constructor for DeclareStatement. |
|
DeclareStatement(ElementSymbol variable,
java.lang.String varType,
LanguageObject value)
Constructor for DeclareStatement. |
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 DeclareStatements for equality. |
int |
getType()
Return the type for this statement, this is one of the types defined on the statement object. |
java.lang.String |
getVariableType()
Get the type of this variable declared in this statement. |
int |
hashCode()
Get hashcode for TableAssignmentStatement. |
void |
setVariableType(java.lang.String varType)
Set the type of this variable declared in this statement. |
java.lang.String |
toString()
Returns a string representation of an instance of this class. |
Methods inherited from class com.metamatrix.query.sql.proc.AssignmentStatement |
---|
getCommand, getExpression, getValue, getVariable, hasCommand, hasExpression, setCommand, setExpression, setValue, setVariable |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DeclareStatement()
public DeclareStatement(ElementSymbol variable, java.lang.String varType)
variable
- The ElementSymbol
object that is the variablevalueType
- The type of this variablepublic DeclareStatement(ElementSymbol variable, java.lang.String varType, LanguageObject value)
variable
- The ElementSymbol
object that is the variablevalueType
- The type of this variableMethod Detail |
---|
public java.lang.String getVariableType()
public void setVariableType(java.lang.String varType)
varType
- A string giving the variable typepublic int getType()
getType
in class AssignmentStatement
public void acceptVisitor(LanguageVisitor visitor)
LanguageObject
acceptVisitor
in interface LanguageObject
acceptVisitor
in class AssignmentStatement
visitor
- Visitor being usedpublic java.lang.Object clone()
clone
in interface LanguageObject
clone
in class AssignmentStatement
public boolean equals(java.lang.Object obj)
equals
in class AssignmentStatement
obj
- Other object
public int hashCode()
hashCode
in class AssignmentStatement
public java.lang.String toString()
toString
in class AssignmentStatement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |