net.sf.farrago.query
Class FarragoExecutableFennelStmt

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

 class FarragoExecutableFennelStmt
extends FarragoExecutableStmtImpl

FarragoExecutableFennelStmt implements FarragoSessionExecutableStmt by executing a pure Fennel statement that requires no compiled Java classes.

NOTE: be sure to read superclass warnings before modifying this class.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/query/FarragoExecutableFennelStmt.java#13 $
Author:
Zelaine Fong

Field Summary
private  Map<String,String> referencedObjectTimestampMap
           
private  Map<String,RelDataType> resultSetTypeMap
           
protected  RelDataType rowType
           
private  String streamName
           
protected  String xmiFennelPlan
           
 
Fields inherited from class net.sf.farrago.query.FarragoExecutableStmtImpl
tracer
 
Fields inherited from class org.eigenbase.util.CompoundClosableAllocation
allocations
 
Constructor Summary
FarragoExecutableFennelStmt(RelDataType preparedRowType, RelDataType dynamicParamRowType, String xmiFennelPlan, String streamName, boolean isDml, TableModificationRelBase.Operation tableModOp, Map<String,String> referencedObjectTimestampMap, TableAccessMap tableAccessMap, Map<String,RelDataType> typeMap)
           
 
Method Summary
 ResultSet execute(FarragoSessionRuntimeContext runtimeContext)
          Executes this statement.
 long getMemoryUsage()
           
 Set<String> getReferencedObjectIds()
           
 String getReferencedObjectModTime(String mofid)
           
 Map<String,RelDataType> getResultSetTypeMap()
          Map from result set name to row type.
 RelDataType getRowType()
           
 
Methods inherited from class net.sf.farrago.query.FarragoExecutableStmtImpl
getDynamicParamRowType, getIterCalcTypeMap, getTableAccessMap, getTableModOp, 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 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

rowType

protected final RelDataType rowType

xmiFennelPlan

protected final String xmiFennelPlan

referencedObjectTimestampMap

private final Map<String,String> referencedObjectTimestampMap

streamName

private final String streamName

resultSetTypeMap

private final Map<String,RelDataType> resultSetTypeMap
Constructor Detail

FarragoExecutableFennelStmt

FarragoExecutableFennelStmt(RelDataType preparedRowType,
                            RelDataType dynamicParamRowType,
                            String xmiFennelPlan,
                            String streamName,
                            boolean isDml,
                            TableModificationRelBase.Operation tableModOp,
                            Map<String,String> referencedObjectTimestampMap,
                            TableAccessMap tableAccessMap,
                            Map<String,RelDataType> typeMap)
Method Detail

getRowType

public RelDataType getRowType()
Returns:
type descriptor for rows produced by this stmt

getReferencedObjectIds

public Set<String> getReferencedObjectIds()
Specified by:
getReferencedObjectIds in interface FarragoSessionExecutableStmt
Overrides:
getReferencedObjectIds in class FarragoExecutableStmtImpl
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
Overrides:
getReferencedObjectModTime in class FarragoExecutableStmtImpl
Returns:
the modification time of an object accessed by this statement, or null if the modification time is not available

execute

public ResultSet execute(FarragoSessionRuntimeContext runtimeContext)
Description copied from interface: FarragoSessionExecutableStmt
Executes this statement.

Parameters:
runtimeContext - context in which to execute
Returns:
ResultSet produced by statement

getMemoryUsage

public long getMemoryUsage()
Returns:
approximate total number of bytes used by this statement's in-memory representation

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
Overrides:
getResultSetTypeMap in class FarragoExecutableStmtImpl