|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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 variable
public DeclareStatement(ElementSymbol variable,
java.lang.String varType,
LanguageObject value)
variable - The ElementSymbol object that is the variablevalueType - The type of this variable| Method 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 AssignmentStatementpublic void acceptVisitor(LanguageVisitor visitor)
LanguageObject
acceptVisitor in interface LanguageObjectacceptVisitor in class AssignmentStatementvisitor - Visitor being usedpublic java.lang.Object clone()
clone in interface LanguageObjectclone in class AssignmentStatementpublic boolean equals(java.lang.Object obj)
equals in class AssignmentStatementobj - Other object
public int hashCode()
hashCode in class AssignmentStatementpublic java.lang.String toString()
toString in class AssignmentStatement
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||