org.teiid.query.sql.proc
Class CommandStatement

java.lang.Object
  extended by org.teiid.query.sql.proc.Statement
      extended by org.teiid.query.sql.proc.CommandStatement
All Implemented Interfaces:
java.lang.Cloneable, SubqueryContainer, LanguageObject

public class CommandStatement
extends Statement
implements SubqueryContainer

This class represents a variable assignment statement in the storedprocedure language. It extends the Statement that 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 interface org.teiid.query.sql.LanguageObject
LanguageObject.Util
 
Field Summary
 
Fields inherited from class org.teiid.query.sql.proc.Statement
TYPE_ASSIGNMENT, TYPE_BREAK, TYPE_COMMAND, TYPE_CONTINUE, TYPE_DECLARE, TYPE_ERROR, TYPE_IF, TYPE_LOOP, TYPE_UNKNOWN, TYPE_UPDATE, TYPE_WHILE
 
Constructor Summary
CommandStatement()
          Constructor for CommandStatement.
CommandStatement(Command value)
          Constructor for CommandStatement.
 
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 CommandStatements for equality.
 Command getCommand()
          Get the command on this statement.
 int getType()
          Return the type for this statement, this is one of the types defined on the statement object.
 int hashCode()
          Get hashcode for CommandStatement.
 void setCommand(Command command)
          Sets the subquery Command object
 
Methods inherited from class org.teiid.query.sql.proc.Statement
toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommandStatement

public CommandStatement()
Constructor for CommandStatement.


CommandStatement

public CommandStatement(Command value)
Constructor for CommandStatement.

Parameters:
value - The Command on this statement
Method Detail

getCommand

public Command getCommand()
Get the command on this statement.

Specified by:
getCommand in interface SubqueryContainer
Returns:
The Command on this statement

setCommand

public void setCommand(Command command)
Description copied from interface: SubqueryContainer
Sets the subquery Command object

Specified by:
setCommand in interface SubqueryContainer
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.

Specified by:
getType in class Statement
Returns:
The type of this statement

acceptVisitor

public void acceptVisitor(LanguageVisitor visitor)
Description copied from interface: LanguageObject
Method for accepting a visitor. It is the responsibility of the language object to call back on the visitor.

Specified by:
acceptVisitor in interface LanguageObject
Parameters:
visitor - Visitor being used

clone

public java.lang.Object clone()
Deep clone statement to produce a new identical statement.

Specified by:
clone in interface LanguageObject
Specified by:
clone in class Statement
Returns:
Deep clone

equals

public boolean equals(java.lang.Object obj)
Compare two CommandStatements for equality. They will only evaluate to equal if they are IDENTICAL: the command objects are equal.

Overrides:
equals in class java.lang.Object
Parameters:
obj - Other object
Returns:
True if equal

hashCode

public int hashCode()
Get hashcode for CommandStatement. WARNING: This hash code relies on the hash code of the command on this statement.

Overrides:
hashCode in class java.lang.Object
Returns:
Hash code


Copyright © 2011. All Rights Reserved.