public class LoopStatement extends Statement implements SubqueryContainer, Statement.Labeled
This class represents a loop statement in the storedprocedure language
to cursor through a result set.
It extends the Statement
that could part of a block. This statement has
a block, a select statement and a cursor.
determines which block should be executed..
Statement.Labeled
SubqueryContainer.Evaluatable<T extends Command>
LanguageObject.Util
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 and Description |
---|
LoopStatement(Block block,
Command query,
String cursorName) |
Modifier and Type | Method and Description |
---|---|
void |
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor.
|
Object |
clone()
Deep clone statement to produce a new identical statement.
|
boolean |
equals(Object obj)
Compare two LoopStatements for equality.
|
Block |
getBlock() |
Command |
getCommand()
Returns the subquery Command object
|
String |
getCursorName() |
String |
getLabel() |
int |
getType()
Return the type for this statement, this is one of the types
defined on the statement object.
|
int |
hashCode()
Get hashcode for LoopStatement.
|
void |
setBlock(Block block) |
void |
setCommand(Command command)
Sets the command.
|
void |
setCommand(Query query) |
void |
setCursorName(String cursorName) |
void |
setLabel(String label) |
public String getLabel()
getLabel
in interface Statement.Labeled
public void setLabel(String label)
setLabel
in interface Statement.Labeled
public String getCursorName()
public Block getBlock()
public Command getCommand()
SubqueryContainer
getCommand
in interface SubqueryContainer
public void setCommand(Command command)
setCommand
in interface SubqueryContainer
command
- the subquery Command objectpublic void setCursorName(String cursorName)
public void setBlock(Block block)
block
- public void setCommand(Query query)
query
- public int getType()
public void acceptVisitor(LanguageVisitor visitor)
LanguageObject
acceptVisitor
in interface LanguageObject
visitor
- Visitor being usedpublic Object clone()
clone
in interface LanguageObject
clone
in class Statement
public boolean equals(Object obj)
Copyright © 2019. All rights reserved.