Package org.teiid.query.processor.proc
Class LoopInstruction
- java.lang.Object
-
- org.teiid.query.processor.proc.ProgramInstruction
-
- org.teiid.query.processor.proc.CreateCursorResultSetInstruction
-
- org.teiid.query.processor.proc.LoopInstruction
-
- All Implemented Interfaces:
Cloneable
,RepeatedInstruction
,Statement.Labeled
public class LoopInstruction extends CreateCursorResultSetInstruction implements RepeatedInstruction
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.teiid.query.processor.proc.CreateCursorResultSetInstruction
CreateCursorResultSetInstruction.Mode
-
-
Field Summary
-
Fields inherited from class org.teiid.query.processor.proc.CreateCursorResultSetInstruction
plan, rsName
-
-
Constructor Summary
Constructors Constructor Description LoopInstruction(Program loopProgram, String rsName, ProcessorPlan plan, String label)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LoopInstruction
clone()
Returns a deep clonePlanNode
getDescriptionProperties()
String
getLabel()
Program
getNestedProgram()
void
postInstruction(ProcedurePlan procEnv)
void
process(ProcedurePlan procEnv)
Allow this instruction to do whatever processing it needs, and to in turn manipulate the running program.Boolean
requiresTransaction(boolean transactionalReads)
void
setLabel(String label)
boolean
testCondition(ProcedurePlan procEnv)
String
toString()
-
Methods inherited from class org.teiid.query.processor.proc.CreateCursorResultSetInstruction
getCommand, getMode, setProcAssignments, setUsesLocalTemp
-
-
-
-
Constructor Detail
-
LoopInstruction
public LoopInstruction(Program loopProgram, String rsName, ProcessorPlan plan, String label)
-
-
Method Detail
-
getLabel
public String getLabel()
- Specified by:
getLabel
in interfaceStatement.Labeled
-
setLabel
public void setLabel(String label)
- Specified by:
setLabel
in interfaceStatement.Labeled
-
process
public void process(ProcedurePlan procEnv) throws TeiidComponentException
Description copied from class:ProgramInstruction
Allow this instruction to do whatever processing it needs, and to in turn manipulate the running program. A typical instruction should simplyincrement
the program counter of the current program, but specialized instructions may add sub programs to the stack or not increment the counter (so that they are executed again.)- Overrides:
process
in classCreateCursorResultSetInstruction
- Throws:
TeiidComponentException
-
clone
public LoopInstruction clone()
Returns a deep clone- Overrides:
clone
in classCreateCursorResultSetInstruction
- Returns:
- shallow clone
-
toString
public String toString()
- Overrides:
toString
in classCreateCursorResultSetInstruction
-
getDescriptionProperties
public PlanNode getDescriptionProperties()
- Overrides:
getDescriptionProperties
in classCreateCursorResultSetInstruction
-
testCondition
public boolean testCondition(ProcedurePlan procEnv) throws TeiidComponentException, TeiidProcessingException
- Specified by:
testCondition
in interfaceRepeatedInstruction
- Throws:
TeiidComponentException
TeiidProcessingException
-
getNestedProgram
public Program getNestedProgram()
- Specified by:
getNestedProgram
in interfaceRepeatedInstruction
- See Also:
RepeatedInstruction.getNestedProgram()
-
postInstruction
public void postInstruction(ProcedurePlan procEnv) throws TeiidComponentException
- Specified by:
postInstruction
in interfaceRepeatedInstruction
- Throws:
TeiidComponentException
-
requiresTransaction
public Boolean requiresTransaction(boolean transactionalReads)
- Overrides:
requiresTransaction
in classCreateCursorResultSetInstruction
-
-