org.teiid.query.processor.proc
Class WhileInstruction

java.lang.Object
  extended by org.teiid.query.processor.proc.ProgramInstruction
      extended by org.teiid.query.processor.proc.WhileInstruction
All Implemented Interfaces:
Cloneable, RepeatedInstruction, Statement.Labeled

public class WhileInstruction
extends ProgramInstruction
implements RepeatedInstruction


Constructor Summary
WhileInstruction(Program program, Criteria condition, String label)
           
 
Method Summary
 WhileInstruction clone()
          Returns a deep clone
 void getChildPlans(List<ProcessorPlan> plans)
          Finds all nested plans and returns them.
 PlanNode getDescriptionProperties()
           
 String getLabel()
           
 Program getNestedProgram()
           
 Program getWhileProgram()
           
 void postInstruction(ProcedurePlan procEnv)
           
 void process(ProcedurePlan env)
          Allow this instruction to do whatever processing it needs, and to in turn manipulate the running program.
 void setLabel(String label)
           
 boolean testCondition(ProcedurePlan procEnv)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WhileInstruction

public WhileInstruction(Program program,
                        Criteria condition,
                        String label)
Method Detail

getLabel

public String getLabel()
Specified by:
getLabel in interface Statement.Labeled

setLabel

public void setLabel(String label)
Specified by:
setLabel in interface Statement.Labeled

process

public void process(ProcedurePlan env)
             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 simply increment 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.)

Specified by:
process in class ProgramInstruction
Throws:
TeiidComponentException

getWhileProgram

public Program getWhileProgram()

clone

public WhileInstruction clone()
Returns a deep clone

Overrides:
clone in class ProgramInstruction
Returns:
shallow clone

toString

public String toString()
Overrides:
toString in class Object

getDescriptionProperties

public PlanNode getDescriptionProperties()
Specified by:
getDescriptionProperties in class ProgramInstruction

testCondition

public boolean testCondition(ProcedurePlan procEnv)
                      throws TeiidComponentException,
                             TeiidProcessingException
Specified by:
testCondition in interface RepeatedInstruction
Throws:
TeiidProcessingException
TeiidComponentException

getNestedProgram

public Program getNestedProgram()
Specified by:
getNestedProgram in interface RepeatedInstruction
See Also:
RepeatedInstruction.getNestedProgram()

postInstruction

public void postInstruction(ProcedurePlan procEnv)
                     throws TeiidComponentException
Specified by:
postInstruction in interface RepeatedInstruction
Throws:
TeiidComponentException

getChildPlans

public void getChildPlans(List<ProcessorPlan> plans)
Description copied from class: ProgramInstruction
Finds all nested plans and returns them.

Overrides:
getChildPlans in class ProgramInstruction


Copyright © 2011. All Rights Reserved.