Package org.teiid.query.processor.proc
Class ForEachRowPlan
- java.lang.Object
-
- org.teiid.query.processor.ProcessorPlan
-
- org.teiid.query.processor.proc.ForEachRowPlan
-
- All Implemented Interfaces:
Cloneable,BatchCollector.BatchProducer
public class ForEachRowPlan extends ProcessorPlan
-
-
Constructor Summary
Constructors Constructor Description ForEachRowPlan()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcessorPlanclone()Return a safe clone of the ProcessorPlan.voidclose()Close the plan after processing.List<Expression>getOutputElements()Get list of resolved elements describing output columns for this plan.voidinitialize(CommandContext context, ProcessorDataManager dataMgr, BufferManager bufferMgr)Initialize the plan with some required pieces of data for making queries.TupleBatchnextBatch()Get a batch of results or possibly an Exception.voidopen()Open the plan for processing.BooleanrequiresTransaction(boolean transactionalReads)voidreset()Reset a plan so that it can be processed again.voidsetLookupMap(Map<Expression,Integer> symbolMap)voidsetParams(Map<ElementSymbol,Expression> params)voidsetQueryPlan(ProcessorPlan queryPlan)voidsetRowProcedure(ProcedurePlan rowProcedure)voidsetSingleRow(boolean singleRow)voidsetTupleSource(TupleSource tupleSource)StringtoString()-
Methods inherited from class org.teiid.query.processor.ProcessorPlan
addWarning, getBuffer, getContext, getDescriptionProperties, hasBuffer, setContext
-
-
-
-
Method Detail
-
clone
public ProcessorPlan clone()
Description copied from class:ProcessorPlanReturn 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 isopenedor after it isclosed.- Specified by:
clonein classProcessorPlan- Returns:
- safe clone of this ProcessorPlan, as long as it is not open for processing
-
close
public void close() throws TeiidComponentExceptionDescription copied from class:ProcessorPlanClose the plan after processing.- Specified by:
closein interfaceBatchCollector.BatchProducer- Specified by:
closein classProcessorPlan- Throws:
TeiidComponentException
-
getOutputElements
public List<Expression> getOutputElements()
Description copied from class:ProcessorPlanGet list of resolved elements describing output columns for this plan.- Specified by:
getOutputElementsin interfaceBatchCollector.BatchProducer- Specified by:
getOutputElementsin classProcessorPlan- Returns:
- List of SingleElementSymbol
-
initialize
public void initialize(CommandContext context, ProcessorDataManager dataMgr, BufferManager bufferMgr)
Description copied from class:ProcessorPlanInitialize 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.- Overrides:
initializein classProcessorPlan- Parameters:
context- Process execution contextdataMgr- Data manager referencebufferMgr- Buffer manager reference
-
nextBatch
public TupleBatch nextBatch() throws BlockedException, TeiidComponentException, TeiidProcessingException
Description copied from class:ProcessorPlanGet a batch of results or possibly an Exception.- Specified by:
nextBatchin interfaceBatchCollector.BatchProducer- Specified by:
nextBatchin classProcessorPlan- Returns:
- Batch of results
- Throws:
BlockedException- indicating next batch is not available yetTeiidComponentException- for non-business rule exceptionTeiidProcessingException- for business rule exception, related to user input or modeling
-
open
public void open() throws TeiidComponentException, TeiidProcessingExceptionDescription copied from class:ProcessorPlanOpen the plan for processing.- Specified by:
openin classProcessorPlan- Throws:
TeiidComponentExceptionTeiidProcessingException
-
setQueryPlan
public void setQueryPlan(ProcessorPlan queryPlan)
-
setRowProcedure
public void setRowProcedure(ProcedurePlan rowProcedure)
-
setParams
public void setParams(Map<ElementSymbol,Expression> params)
-
setLookupMap
public void setLookupMap(Map<Expression,Integer> symbolMap)
-
reset
public void reset()
Description copied from class:ProcessorPlanReset a plan so that it can be processed again.- Overrides:
resetin classProcessorPlan
-
requiresTransaction
public Boolean requiresTransaction(boolean transactionalReads)
- Overrides:
requiresTransactionin classProcessorPlan
-
setTupleSource
public void setTupleSource(TupleSource tupleSource)
-
setSingleRow
public void setSingleRow(boolean singleRow)
-
-