net.sf.farrago.query
Class FarragoExecutableJavaStmt

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
                  extended by net.sf.farrago.query.FarragoExecutableJavaStmt
All Implemented Interfaces:
FarragoSessionExecutableStmt, FarragoAllocation, FarragoAllocationOwner, ClosableAllocation, ClosableAllocationOwner

 class FarragoExecutableJavaStmt
extends FarragoExecutableFennelStmt

FarragoExecutableJavaStmt implements FarragoSessionExecutableStmt via a compiled Java class. It extends upon FarragoExecutableFennelStmt, which implements the Fennel portion of a statement.

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

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

Field Summary
private  Map<String,RelDataType> iterCalcTypeMap
           
private  File packageDir
           
private  Map<String,RelDataType> resultSetTypeMap
           
private  Class rowClass
           
private  ClassLoader stmtClassLoader
           
private  Method stmtMethod
           
private  int totalByteCodeSize
           
private  List<FarragoTransformDef> transformDefs
           
 
Fields inherited from class net.sf.farrago.query.FarragoExecutableFennelStmt
rowType, xmiFennelPlan
 
Fields inherited from class net.sf.farrago.query.FarragoExecutableStmtImpl
tracer
 
Fields inherited from class org.eigenbase.util.CompoundClosableAllocation
allocations
 
Constructor Summary
FarragoExecutableJavaStmt(File packageDir, Class rowClass, ClassLoader stmtClassLoader, RelDataType preparedRowType, RelDataType dynamicParamRowType, Method stmtMethod, List<FarragoTransformDef> transformDefs, String xmiFennelPlan, boolean isDml, TableModificationRelBase.Operation tableModOp, Map<String,String> referencedObjectTimestampMap, TableAccessMap tableAccessMap, Map<String,RelDataType> resultSetTypeMap, Map<String,RelDataType> iterCalcTypeMap, int totalByteCodeSize)
           
 
Method Summary
 ResultSet execute(FarragoSessionRuntimeContext runtimeContext)
          Executes this statement.
 Map<String,RelDataType> getIterCalcTypeMap()
          Map from IterCalcRel tag to row type.
 long getMemoryUsage()
           
 Map<String,RelDataType> getResultSetTypeMap()
          Map from result set name to row type.
 
Methods inherited from class net.sf.farrago.query.FarragoExecutableFennelStmt
getReferencedObjectIds, getReferencedObjectModTime, getRowType
 
Methods inherited from class net.sf.farrago.query.FarragoExecutableStmtImpl
getDynamicParamRowType, 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

packageDir

private final File packageDir

rowClass

private final Class rowClass

stmtClassLoader

private final ClassLoader stmtClassLoader

stmtMethod

private final Method stmtMethod

transformDefs

private final List<FarragoTransformDef> transformDefs

resultSetTypeMap

private final Map<String,RelDataType> resultSetTypeMap

iterCalcTypeMap

private final Map<String,RelDataType> iterCalcTypeMap

totalByteCodeSize

private final int totalByteCodeSize
Constructor Detail

FarragoExecutableJavaStmt

FarragoExecutableJavaStmt(File packageDir,
                          Class rowClass,
                          ClassLoader stmtClassLoader,
                          RelDataType preparedRowType,
                          RelDataType dynamicParamRowType,
                          Method stmtMethod,
                          List<FarragoTransformDef> transformDefs,
                          String xmiFennelPlan,
                          boolean isDml,
                          TableModificationRelBase.Operation tableModOp,
                          Map<String,String> referencedObjectTimestampMap,
                          TableAccessMap tableAccessMap,
                          Map<String,RelDataType> resultSetTypeMap,
                          Map<String,RelDataType> iterCalcTypeMap,
                          int totalByteCodeSize)
Method Detail

execute

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

Specified by:
execute in interface FarragoSessionExecutableStmt
Overrides:
execute in class FarragoExecutableFennelStmt
Parameters:
runtimeContext - context in which to execute
Returns:
ResultSet produced by statement

getMemoryUsage

public long getMemoryUsage()
Specified by:
getMemoryUsage in interface FarragoSessionExecutableStmt
Overrides:
getMemoryUsage in class FarragoExecutableFennelStmt
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 FarragoExecutableFennelStmt

getIterCalcTypeMap

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

Specified by:
getIterCalcTypeMap in interface FarragoSessionExecutableStmt
Overrides:
getIterCalcTypeMap in class FarragoExecutableStmtImpl