Package org.teiid.query.sql.proc
Class CommandStatement
- java.lang.Object
-
- org.teiid.query.sql.proc.Statement
-
- org.teiid.query.sql.proc.CommandStatement
-
- All Implemented Interfaces:
Cloneable,SubqueryContainer,LanguageObject
public class CommandStatement extends Statement implements SubqueryContainer
This class represents a variable assignment statement in the storedprocedure language. It extends the
Statementthat could part of a block. This statement has a command that should be executed as part of the procedure.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.teiid.query.sql.proc.Statement
Statement.Labeled
-
Nested classes/interfaces inherited from interface org.teiid.query.sql.LanguageObject
LanguageObject.Util
-
Nested classes/interfaces inherited from interface org.teiid.query.sql.lang.SubqueryContainer
SubqueryContainer.Evaluatable<T extends Command>
-
-
Field Summary
-
Fields inherited from class org.teiid.query.sql.proc.Statement
TYPE_ASSIGNMENT, TYPE_BREAK, TYPE_COMMAND, TYPE_COMPOUND, TYPE_CONTINUE, TYPE_DECLARE, TYPE_ERROR, TYPE_IF, TYPE_LEAVE, TYPE_LOOP, TYPE_RETURN, TYPE_UNKNOWN, TYPE_UPDATE, TYPE_WHILE
-
-
Constructor Summary
Constructors Constructor Description CommandStatement()Constructor for CommandStatement.CommandStatement(Command value)Constructor for CommandStatement.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacceptVisitor(LanguageVisitor visitor)Method for accepting a visitor.Objectclone()Deep clone statement to produce a new identical statement.booleanequals(Object obj)Compare two CommandStatements for equality.CommandgetCommand()Get the command on this statement.intgetType()Return the type for this statement, this is one of the types defined on the statement object.inthashCode()Get hashcode for CommandStatement.booleanisReturnable()voidsetCommand(Command command)Sets the subquery Command objectvoidsetReturnable(boolean returnable)
-
-
-
Constructor Detail
-
CommandStatement
public CommandStatement()
Constructor for CommandStatement.
-
CommandStatement
public CommandStatement(Command value)
Constructor for CommandStatement.- Parameters:
value- TheCommandon this statement
-
-
Method Detail
-
getCommand
public Command getCommand()
Get the command on this statement.- Specified by:
getCommandin interfaceSubqueryContainer- Returns:
- The
Commandon this statement
-
setCommand
public void setCommand(Command command)
Description copied from interface:SubqueryContainerSets the subquery Command object- Specified by:
setCommandin interfaceSubqueryContainer- Parameters:
command- the subquery Command object
-
getType
public int getType()
Return the type for this statement, this is one of the types defined on the statement object.
-
acceptVisitor
public void acceptVisitor(LanguageVisitor visitor)
Description copied from interface:LanguageObjectMethod for accepting a visitor. It is the responsibility of the language object to call back on the visitor.- Specified by:
acceptVisitorin interfaceLanguageObject- Parameters:
visitor- Visitor being used
-
clone
public Object clone()
Deep clone statement to produce a new identical statement.- Specified by:
clonein interfaceLanguageObject- Specified by:
clonein classStatement- Returns:
- Deep clone
-
equals
public boolean equals(Object obj)
Compare two CommandStatements for equality. They will only evaluate to equal if they are IDENTICAL: the command objects are equal.
-
hashCode
public int hashCode()
Get hashcode for CommandStatement. WARNING: This hash code relies on the hash code of the command on this statement.
-
isReturnable
public boolean isReturnable()
-
setReturnable
public void setReturnable(boolean returnable)
-
-