org.teiid.query.processor.relational
Class RelationalPlan

java.lang.Object
  extended by org.teiid.query.processor.ProcessorPlan
      extended by org.teiid.query.processor.relational.RelationalPlan
All Implemented Interfaces:
java.lang.Cloneable, BatchCollector.BatchProducer

public class RelationalPlan
extends ProcessorPlan


Constructor Summary
RelationalPlan(RelationalNode node)
          Constructor for RelationalPlan.
 
Method Summary
 RelationalPlan clone()
          Return a safe clone of the ProcessorPlan.
 void close()
          Close the plan after processing.
 PlanNode getDescriptionProperties()
           
 TupleBuffer getFinalBuffer()
          return the final tuple buffer or null if not available
 java.util.List getOutputElements()
          Get list of resolved elements describing output columns for this plan.
 RelationalNode getRootNode()
           
 boolean hasFinalBuffer()
           
 void initialize(CommandContext context, ProcessorDataManager dataMgr, BufferManager bufferMgr)
          Initialize the plan with some required pieces of data for making queries.
 TupleBatch nextBatch()
          Get a batch of results or possibly an Exception.
 void open()
          Open the plan for processing.
 boolean requiresTransaction(boolean transactionalReads)
           
 void reset()
          Reset a plan so that it can be processed again.
 void setMultisourceUpdate(boolean multisourceUpdate)
           
 void setOutputElements(java.util.List outputCols)
           
 void setRootNode(RelationalNode root)
           
 void setWith(java.util.List<WithQueryCommand> with)
           
 java.lang.String toString()
           
 
Methods inherited from class org.teiid.query.processor.ProcessorPlan
addWarning, getAndClearWarnings, getContext, setContext
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RelationalPlan

public RelationalPlan(RelationalNode node)
Constructor for RelationalPlan.

Method Detail

getRootNode

public RelationalNode getRootNode()

setRootNode

public void setRootNode(RelationalNode root)

setWith

public void setWith(java.util.List<WithQueryCommand> with)

initialize

public void initialize(CommandContext context,
                       ProcessorDataManager dataMgr,
                       BufferManager bufferMgr)
Description copied from class: ProcessorPlan
Initialize the plan with some required pieces of data for making queries. The data manager is used to make queries and the processorID must be passed with the request so the data manager can find the processor again.

Specified by:
initialize in class ProcessorPlan
Parameters:
context - Process execution context
dataMgr - Data manager reference
bufferMgr - Buffer manager reference
See Also:
ProcessorPlan#connectDataManager(ProcessorDataManager)

getOutputElements

public java.util.List getOutputElements()
Get list of resolved elements describing output columns for this plan.

Specified by:
getOutputElements in interface BatchCollector.BatchProducer
Specified by:
getOutputElements in class ProcessorPlan
Returns:
List of SingleElementSymbol

open

public void open()
          throws TeiidComponentException,
                 TeiidProcessingException
Description copied from class: ProcessorPlan
Open the plan for processing.

Specified by:
open in class ProcessorPlan
Throws:
TeiidComponentException
TeiidProcessingException

nextBatch

public TupleBatch nextBatch()
                     throws BlockedException,
                            TeiidComponentException,
                            TeiidProcessingException
Description copied from class: ProcessorPlan
Get a batch of results or possibly an Exception.

Specified by:
nextBatch in interface BatchCollector.BatchProducer
Specified by:
nextBatch in class ProcessorPlan
Returns:
Batch of results
Throws:
BlockedException - indicating next batch is not available yet
TeiidComponentException - for non-business rule exception
TeiidProcessingException - for business rule exception, related to user input or modeling
See Also:
ProcessorPlan.nextBatch()

close

public void close()
           throws TeiidComponentException
Description copied from class: ProcessorPlan
Close the plan after processing.

Specified by:
close in class ProcessorPlan
Throws:
TeiidComponentException

reset

public void reset()
Description copied from class: ProcessorPlan
Reset a plan so that it can be processed again.

Overrides:
reset in class ProcessorPlan
See Also:
ProcessorPlan.reset()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clone

public RelationalPlan clone()
Description copied from class: ProcessorPlan
Return a safe clone of the ProcessorPlan. A ProcessorPlan may only be safely cloned in between processings. That is, it is only safe to clone a plan before it is opened or after it is closed.

Specified by:
clone in class ProcessorPlan
Returns:
safe clone of this ProcessorPlan, as long as it is not open for processing

getDescriptionProperties

public PlanNode getDescriptionProperties()
Overrides:
getDescriptionProperties in class ProcessorPlan

setOutputElements

public void setOutputElements(java.util.List outputCols)
Parameters:
outputCols - The outputCols to set.

setMultisourceUpdate

public void setMultisourceUpdate(boolean multisourceUpdate)

requiresTransaction

public boolean requiresTransaction(boolean transactionalReads)
Overrides:
requiresTransaction in class ProcessorPlan

getFinalBuffer

public TupleBuffer getFinalBuffer()
                           throws BlockedException,
                                  TeiidComponentException,
                                  TeiidProcessingException
Description copied from class: ProcessorPlan
return the final tuple buffer or null if not available

Specified by:
getFinalBuffer in interface BatchCollector.BatchProducer
Overrides:
getFinalBuffer in class ProcessorPlan
Returns:
Throws:
BlockedException
TeiidComponentException
TeiidProcessingException

hasFinalBuffer

public boolean hasFinalBuffer()
Specified by:
hasFinalBuffer in interface BatchCollector.BatchProducer
Overrides:
hasFinalBuffer in class ProcessorPlan


Copyright © 2011. All Rights Reserved.