ExpressionClassBuilderInterface
class ActivationClassBuilder extends ExpressionClassBuilder
An activation class is defined for each statement. It has the following basic layout: TBD See the document \\Jeeves\Unversioned Repository 1\Internal Technical Documents\Other\GenAndExec.doc for details.
We could also verify methods as they are added, to have 0 parameters, ...
Modifier and Type | Field | Description |
---|---|---|
private MethodBuilder |
closeActivationMethod |
|
private LocalField |
cursorResultSetField |
|
private LocalField |
targetResultSetField |
cb, cdtField, constructor, currentDatetimeFieldName, executeMethod, gc, myCompCtx, nextExprNum, nextFieldNum, nextNonFastExpr
Constructor | Description |
---|---|
ActivationClassBuilder(java.lang.String superClass,
CompilerContext cc) |
By the time this is done, it has constructed the following class:
|
Modifier and Type | Method | Description |
---|---|---|
(package private) void |
addCursorPositionCode() |
Updatable cursors
need to add a getter method for use in BaseActivation to access
the result set that identifies target rows for a positioned
update or delete.
|
(package private) void |
finishExecuteMethod() |
An execute method always ends in a return statement, returning
the result set that has been constructed.
|
(package private) java.lang.String |
getBaseClassName() |
The base class for activations is BaseActivation
|
(package private) MethodBuilder |
getCloseActivationMethod() |
|
protected LocalField |
getCurrentSetup() |
|
java.lang.String |
getPackageName() |
Get the package name that this generated class lives in
|
int |
getRowCount() |
Get the number of ExecRows to allocate
|
(package private) void |
rememberCursor(MethodBuilder mb) |
Updatable cursors
need to add a field and its initialization
for use in BaseActivation to access the result set that
identifies cursor result rows for a positioned update or delete.
|
(package private) void |
rememberCursorTarget(MethodBuilder mb) |
Updatable cursors
need to add a field and its initialization
for use in BaseActivation to access the result set that
identifies target rows for a positioned update or delete.
|
void |
setNumSubqueries() |
Generate the assignment for numSubqueries = x
|
(package private) MethodBuilder |
startResetMethod() |
addColumnToOrdering, addItem, finishConstructor, generateDataValue, generateNull, generateNullWithExpress, getClassBuilder, getColumnOrdering, getColumnOrdering, getConstructor, getCurrentDateExpression, getCurrentTimeExpression, getCurrentTimestampExpression, getExecuteMethod, getGeneratedClass, getRowLocationScanResultSetName, getTypeCompiler, newExprFun, newFieldDeclaration, newFieldDeclaration, newGeneratedFun, newGeneratedFun, newRowLocationScanResultSetName, newUserExprFun, pushColumnReference, pushDataValueFactory, pushGetExecutionFactoryExpression, pushGetResultSetFactoryExpression, pushMethodReference, pushPVSReference, pushThisAsActivation
private LocalField targetResultSetField
private LocalField cursorResultSetField
private MethodBuilder closeActivationMethod
ActivationClassBuilder(java.lang.String superClass, CompilerContext cc) throws StandardException
final public class #className extends #superClass { // public void reset() { return; } protected ResultSet doExecute() throws StandardException { // statements must be added here } public #className() { super(); } }
StandardException
- thrown on failurepublic java.lang.String getPackageName()
getPackageName
in class ExpressionClassBuilder
java.lang.String getBaseClassName()
getBaseClassName
in class ExpressionClassBuilder
public int getRowCount() throws StandardException
getRowCount
in class ExpressionClassBuilder
StandardException
- thrown on failurepublic void setNumSubqueries()
setNumSubqueries
in class ExpressionClassBuilder
StandardException
- thrown on failureMethodBuilder startResetMethod()
void finishExecuteMethod()
void addCursorPositionCode()
The code that is generated is:
public CursorResultSet getTargetResultSet() { return targetResultSet; } public CursorResultSet getCursorResultSet() { return cursorResultSet; }
void rememberCursorTarget(MethodBuilder mb)
The code that is generated is:
The expression that is generated is:private CursorResultSet targetResultSet;
(ResultSet) (targetResultSet = (CursorResultSet) #expression#)
void rememberCursor(MethodBuilder mb)
The code that is generated is:
The expression that is generated is:private CursorResultSet cursorResultSet;
The expression must be the top stack word when this method is called.(ResultSet) (cursorResultSet = (CursorResultSet) #expression#)
protected LocalField getCurrentSetup()
getCurrentSetup
in class ExpressionClassBuilder
MethodBuilder getCloseActivationMethod()
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.