org.apache.derby.impl.sql.compile
Class AccessPathImpl

java.lang.Object
  extended by org.apache.derby.impl.sql.compile.AccessPathImpl
All Implemented Interfaces:
AccessPath

 class AccessPathImpl
extends java.lang.Object
implements AccessPath


Field Summary
private  java.lang.String accessPathName
           
(package private)  ConglomerateDescriptor cd
           
private  CostEstimate costEstimate
           
(package private)  boolean coveringIndexScan
           
(package private)  JoinStrategy joinStrategy
           
(package private)  int lockMode
           
(package private)  boolean nonMatchingIndexScan
           
(package private)  Optimizer optimizer
           
 
Constructor Summary
AccessPathImpl(Optimizer optimizer)
           
 
Method Summary
 void copy(AccessPath copyFrom)
          Copy all information from the given AccessPath to this one.
 ConglomerateDescriptor getConglomerateDescriptor()
          Get whatever was last set as the conglomerate descriptor.
 CostEstimate getCostEstimate()
          Get the cost estimate for this AccessPath.
 boolean getCoveringIndexScan()
          Return whether or not the optimizer is considering a covering index scan on this AccessPath.
 JoinStrategy getJoinStrategy()
          Get the join strategy, as set by setJoinStrategy().
 int getLockMode()
          Get the lock mode, as last set in setLockMode().
 boolean getNonMatchingIndexScan()
          Return whether or not the optimizer is considering a non-matching index scan on this AccessPath.
 Optimizer getOptimizer()
          Get the optimizer associated with this access path.
 void initializeAccessPathName(DataDictionary dd, TableDescriptor td)
          Sets the "name" of the access path. if the access path represents an index then set the name to the name of the index. if it is an index created for a constraint, use the constraint name.
 void setConglomerateDescriptor(ConglomerateDescriptor cd)
          Set the conglomerate descriptor for this access path.
 void setCostEstimate(CostEstimate costEstimate)
          Set the given cost estimate in this AccessPath.
 void setCoveringIndexScan(boolean coveringIndexScan)
          Set whether or not to consider a covering index scan on the optimizable.
 void setJoinStrategy(JoinStrategy joinStrategy)
          Remember the given join strategy
 void setLockMode(int lockMode)
          Set the lock mode
 void setNonMatchingIndexScan(boolean nonMatchingIndexScan)
          Set whether or not to consider a non-matching index scan on this AccessPath.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cd

ConglomerateDescriptor cd

costEstimate

private CostEstimate costEstimate

coveringIndexScan

boolean coveringIndexScan

nonMatchingIndexScan

boolean nonMatchingIndexScan

joinStrategy

JoinStrategy joinStrategy

lockMode

int lockMode

optimizer

Optimizer optimizer

accessPathName

private java.lang.String accessPathName
Constructor Detail

AccessPathImpl

AccessPathImpl(Optimizer optimizer)
Method Detail

setConglomerateDescriptor

public void setConglomerateDescriptor(ConglomerateDescriptor cd)
Description copied from interface: AccessPath
Set the conglomerate descriptor for this access path.

Specified by:
setConglomerateDescriptor in interface AccessPath
Parameters:
cd - A ConglomerateDescriptor
See Also:
AccessPath.setConglomerateDescriptor(org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor)

getConglomerateDescriptor

public ConglomerateDescriptor getConglomerateDescriptor()
Description copied from interface: AccessPath
Get whatever was last set as the conglomerate descriptor. Returns null if nothing was set since the last call to startOptimizing()

Specified by:
getConglomerateDescriptor in interface AccessPath
See Also:
AccessPath.getConglomerateDescriptor()

setCostEstimate

public void setCostEstimate(CostEstimate costEstimate)
Description copied from interface: AccessPath
Set the given cost estimate in this AccessPath. Generally, this will be the CostEstimate for the plan currently under consideration.

Specified by:
setCostEstimate in interface AccessPath
See Also:
AccessPath.setCostEstimate(org.apache.derby.iapi.sql.compile.CostEstimate)

getCostEstimate

public CostEstimate getCostEstimate()
Description copied from interface: AccessPath
Get the cost estimate for this AccessPath. This is the last one set by setCostEstimate.

Specified by:
getCostEstimate in interface AccessPath
See Also:
AccessPath.getCostEstimate()

setCoveringIndexScan

public void setCoveringIndexScan(boolean coveringIndexScan)
Description copied from interface: AccessPath
Set whether or not to consider a covering index scan on the optimizable.

Specified by:
setCoveringIndexScan in interface AccessPath
See Also:
AccessPath.setCoveringIndexScan(boolean)

getCoveringIndexScan

public boolean getCoveringIndexScan()
Description copied from interface: AccessPath
Return whether or not the optimizer is considering a covering index scan on this AccessPath.

Specified by:
getCoveringIndexScan in interface AccessPath
Returns:
boolean Whether or not the optimizer chose a covering index scan.
See Also:
AccessPath.getCoveringIndexScan()

setNonMatchingIndexScan

public void setNonMatchingIndexScan(boolean nonMatchingIndexScan)
Description copied from interface: AccessPath
Set whether or not to consider a non-matching index scan on this AccessPath.

Specified by:
setNonMatchingIndexScan in interface AccessPath
See Also:
AccessPath.setNonMatchingIndexScan(boolean)

getNonMatchingIndexScan

public boolean getNonMatchingIndexScan()
Description copied from interface: AccessPath
Return whether or not the optimizer is considering a non-matching index scan on this AccessPath. We expect to call this during generation, after access path selection is complete.

Specified by:
getNonMatchingIndexScan in interface AccessPath
Returns:
boolean Whether or not the optimizer is considering a non-matching index scan.
See Also:
AccessPath.getNonMatchingIndexScan()

setJoinStrategy

public void setJoinStrategy(JoinStrategy joinStrategy)
Description copied from interface: AccessPath
Remember the given join strategy

Specified by:
setJoinStrategy in interface AccessPath
Parameters:
joinStrategy - The best join strategy
See Also:
AccessPath.setJoinStrategy(org.apache.derby.iapi.sql.compile.JoinStrategy)

getJoinStrategy

public JoinStrategy getJoinStrategy()
Description copied from interface: AccessPath
Get the join strategy, as set by setJoinStrategy().

Specified by:
getJoinStrategy in interface AccessPath
See Also:
AccessPath.getJoinStrategy()

setLockMode

public void setLockMode(int lockMode)
Description copied from interface: AccessPath
Set the lock mode

Specified by:
setLockMode in interface AccessPath
See Also:
AccessPath.setLockMode(int)

getLockMode

public int getLockMode()
Description copied from interface: AccessPath
Get the lock mode, as last set in setLockMode().

Specified by:
getLockMode in interface AccessPath
See Also:
AccessPath.getLockMode()

copy

public void copy(AccessPath copyFrom)
Description copied from interface: AccessPath
Copy all information from the given AccessPath to this one.

Specified by:
copy in interface AccessPath
See Also:
AccessPath.copy(org.apache.derby.iapi.sql.compile.AccessPath)

getOptimizer

public Optimizer getOptimizer()
Description copied from interface: AccessPath
Get the optimizer associated with this access path.

Specified by:
getOptimizer in interface AccessPath
Returns:
The optimizer associated with this access path.
See Also:
AccessPath.getOptimizer()

toString

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

initializeAccessPathName

public void initializeAccessPathName(DataDictionary dd,
                                     TableDescriptor td)
                              throws StandardException
Description copied from interface: AccessPath
Sets the "name" of the access path. if the access path represents an index then set the name to the name of the index. if it is an index created for a constraint, use the constraint name. This is called only for base tables.

Specified by:
initializeAccessPathName in interface AccessPath
Parameters:
dd - Datadictionary.
td - TableDescriptor of the base table.
Throws:
StandardException - on error.
See Also:
AccessPath.initializeAccessPathName(org.apache.derby.iapi.sql.dictionary.DataDictionary, org.apache.derby.iapi.sql.dictionary.TableDescriptor)

Built on Thu 2012-03-29 21:53:33+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.