net.sf.farrago.query
Class FarragoExecutableStmtImpl

java.lang.Object
  extended by org.eigenbase.util.CompoundClosableAllocation
      extended by net.sf.farrago.util.FarragoCompoundAllocation
          extended by net.sf.farrago.query.FarragoExecutableStmtImpl
All Implemented Interfaces:
FarragoSessionExecutableStmt, FarragoAllocation, FarragoAllocationOwner, ClosableAllocation, ClosableAllocationOwner
Direct Known Subclasses:
FarragoExecutableExplainStmt, FarragoExecutableFennelStmt

abstract class FarragoExecutableStmtImpl
extends FarragoCompoundAllocation
implements FarragoSessionExecutableStmt

FarragoExecutableStmtImpl is an abstract base for implementations of FarragoSessionExecutableStmt.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/query/FarragoExecutableStmtImpl.java#20 $
Author:
John V. Sichi

Field Summary
private  RelDataType dynamicParamRowType
           
private  boolean isDml
           
private  TableAccessMap tableAccessMap
           
private  TableModificationRelBase.Operation tableModOp
           
protected static Logger tracer
           
 
Fields inherited from class org.eigenbase.util.CompoundClosableAllocation
allocations
 
Constructor Summary
protected FarragoExecutableStmtImpl(RelDataType dynamicParamRowType, boolean isDml, TableModificationRelBase.Operation tableModOp, TableAccessMap tableAccessMap)
           
 
Method Summary
 RelDataType getDynamicParamRowType()
           
 Map<String,RelDataType> getIterCalcTypeMap()
          Map from IterCalcRel tag to row type.
 Set<String> getReferencedObjectIds()
           
 String getReferencedObjectModTime(String mofid)
           
 Map<String,RelDataType> getResultSetTypeMap()
          Map from result set name to row type.
 TableAccessMap getTableAccessMap()
           
 TableModificationRelBase.Operation getTableModOp()
           
 boolean isDml()
           
 
Methods inherited from class org.eigenbase.util.CompoundClosableAllocation
addAllocation, closeAllocation, forgetAllocation, hasAllocations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.farrago.session.FarragoSessionExecutableStmt
execute, getMemoryUsage, getRowType
 
Methods inherited from interface org.eigenbase.util.ClosableAllocationOwner
addAllocation
 
Methods inherited from interface org.eigenbase.util.ClosableAllocation
closeAllocation
 
Methods inherited from interface org.eigenbase.util.ClosableAllocation
closeAllocation
 

Field Detail

tracer

protected static final Logger tracer

isDml

private final boolean isDml

tableModOp

private final TableModificationRelBase.Operation tableModOp

dynamicParamRowType

private final RelDataType dynamicParamRowType

tableAccessMap

private final TableAccessMap tableAccessMap
Constructor Detail

FarragoExecutableStmtImpl

protected FarragoExecutableStmtImpl(RelDataType dynamicParamRowType,
                                    boolean isDml,
                                    TableModificationRelBase.Operation tableModOp,
                                    TableAccessMap tableAccessMap)
Method Detail

isDml

public boolean isDml()
Specified by:
isDml in interface FarragoSessionExecutableStmt
Returns:
true if this statement is DML; false if a query

getTableModOp

public TableModificationRelBase.Operation getTableModOp()
Specified by:
getTableModOp in interface FarragoSessionExecutableStmt
Returns:
the table modification operation type if this is a table modification statement; otherwise null

getDynamicParamRowType

public RelDataType getDynamicParamRowType()
Specified by:
getDynamicParamRowType in interface FarragoSessionExecutableStmt
Returns:
type descriptor for row of dynamic parameters expected by this stmt

getReferencedObjectIds

public Set<String> getReferencedObjectIds()
Specified by:
getReferencedObjectIds in interface FarragoSessionExecutableStmt
Returns:
Set of MOFID's of objects accessed when this stmt is executed

getReferencedObjectModTime

public String getReferencedObjectModTime(String mofid)
Specified by:
getReferencedObjectModTime in interface FarragoSessionExecutableStmt
Returns:
the modification time of an object accessed by this statement, or null if the modification time is not available

getTableAccessMap

public TableAccessMap getTableAccessMap()
Specified by:
getTableAccessMap in interface FarragoSessionExecutableStmt
Returns:
map of access modes for all tables referenced

getResultSetTypeMap

public Map<String,RelDataType> getResultSetTypeMap()
Description copied from interface: FarragoSessionExecutableStmt
Map from result set name to row type.

Specified by:
getResultSetTypeMap in interface FarragoSessionExecutableStmt

getIterCalcTypeMap

public Map<String,RelDataType> getIterCalcTypeMap()
Description copied from interface: FarragoSessionExecutableStmt
Map from IterCalcRel tag to row type.

Specified by:
getIterCalcTypeMap in interface FarragoSessionExecutableStmt