com.metamatrix.query.optimizer.proc
Class ProcedurePlanner

java.lang.Object
  extended by com.metamatrix.query.optimizer.proc.ProcedurePlanner
All Implemented Interfaces:
CommandPlanner

public final class ProcedurePlanner
extends java.lang.Object
implements CommandPlanner

This prepares an ProcedurePlan from a CreateUpdateProcedureCommand CreateUpdateProcedureCommand.


Constructor Summary
ProcedurePlanner()
           
 
Method Summary
 void generateCanonical(CommandTreeNode rootNode, QueryMetadataInterface metadata, AnalysisRecord analysisRecord, CommandContext context)
          This method does nothing as the method call to optimize(com.metamatrix.query.optimizer.CommandTreeNode, com.metamatrix.core.id.IDGenerator, com.metamatrix.query.metadata.QueryMetadataInterface, com.metamatrix.query.optimizer.capabilities.CapabilitiesFinder, com.metamatrix.query.analysis.AnalysisRecord, com.metamatrix.query.util.CommandContext) directly produces the ProcessorPlan for the given procedure.
 ProcessorPlan optimize(CommandTreeNode node, IDGenerator idGenerator, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, AnalysisRecord analysisRecord, CommandContext context)
          Produce a ProcessorPlan for the CreateUpdateProcedureCommand on the current node of the CommandTreeNode, the procedure plan construction involves using the child processor plans.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcedurePlanner

public ProcedurePlanner()
Method Detail

generateCanonical

public void generateCanonical(CommandTreeNode rootNode,
                              QueryMetadataInterface metadata,
                              AnalysisRecord analysisRecord,
                              CommandContext context)
                       throws QueryPlannerException,
                              MetaMatrixComponentException

This method does nothing as the method call to optimize(com.metamatrix.query.optimizer.CommandTreeNode, com.metamatrix.core.id.IDGenerator, com.metamatrix.query.metadata.QueryMetadataInterface, com.metamatrix.query.optimizer.capabilities.CapabilitiesFinder, com.metamatrix.query.analysis.AnalysisRecord, com.metamatrix.query.util.CommandContext) directly produces the ProcessorPlan for the given procedure.

Specified by:
generateCanonical in interface CommandPlanner
Parameters:
rootNode - tree of CommandTreeNode object(s) rooted at rootNode
debug - whether or not to generate verbose debug output during planning
Throws:
QueryPlannerException - indicating a problem in planning
MetaMatrixComponentException - indicating an unexpected exception

optimize

public ProcessorPlan optimize(CommandTreeNode node,
                              IDGenerator idGenerator,
                              QueryMetadataInterface metadata,
                              CapabilitiesFinder capFinder,
                              AnalysisRecord analysisRecord,
                              CommandContext context)
                       throws QueryPlannerException,
                              QueryMetadataException,
                              MetaMatrixComponentException

Produce a ProcessorPlan for the CreateUpdateProcedureCommand on the current node of the CommandTreeNode, the procedure plan construction involves using the child processor plans.

Specified by:
optimize in interface CommandPlanner
Parameters:
node - root of a tree (or subtree) of CommandTreeNode objects, each of which should have its canonical plan
metadata - source of metadata
debug - whether or not to generate verbose debug output during planning
Returns:
ProcessorPlan This processorPlan is a ProcedurePlan
Throws:
QueryPlannerException - indicating a problem in planning
QueryMetadataException - indicating an exception in accessing the metadata
MetaMatrixComponentException - indicating an unexpected exception


Copyright © 2009. All Rights Reserved.