org.teiid.query.processor.program
Class ProgramInstruction

java.lang.Object
  extended by org.teiid.query.processor.program.ProgramInstruction
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
AssignmentInstruction, ContinueInstruction, CreateCursorResultSetInstruction, ErrorInstruction, ExecDynamicSqlInstruction, IfInstruction, WhileInstruction

public abstract class ProgramInstruction
extends java.lang.Object
implements java.lang.Cloneable

Abstract superclass of all program instructions.

All processor instructions need to be cloneable, but it most cases the default Object.clone operation will suffice, since in most cases the processing instructions will be stateless, or the state will be immutable. The exception to this are instructions that have sub programs in them - those sub programs need to be cloned.


Constructor Summary
ProgramInstruction()
           
 
Method Summary
 ProgramInstruction clone()
          Override Object.clone() to make the method public.
 java.util.List<ProcessorPlan> getChildPlans()
          Finds all nested plans and returns them.
abstract  PlanNode getDescriptionProperties()
           
abstract  void process(ProcedurePlan env)
          Allow this instruction to do whatever processing it needs, and to in turn manipulate the running program.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgramInstruction

public ProgramInstruction()
Method Detail

process

public abstract void process(ProcedurePlan env)
                      throws TeiidComponentException,
                             TeiidProcessingException
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.)

Throws:
TeiidComponentException
TeiidProcessingException

getChildPlans

public java.util.List<ProcessorPlan> getChildPlans()
Finds all nested plans and returns them.

Returns:
List of ProcessorPlan
Since:
4.2

clone

public ProgramInstruction clone()
Override Object.clone() to make the method public. This method simply calls super.clone(), deferring to the default shallow cloning. Some ProcessorInstruction subclasses may need to override with custom safe or deep cloning.

Overrides:
clone in class java.lang.Object
Returns:
shallow clone

getDescriptionProperties

public abstract PlanNode getDescriptionProperties()


Copyright © 2010. All Rights Reserved.