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 and Description |
|---|---|
| private MethodBuilder | |
| private LocalField | |
| private LocalField |
| Access | Constructor and Description |
|---|---|
| pack-priv | ActivationClassBuilder(String superClass, CompilerContext cc)
By the time this is done, it has constructed the following class:
final public class #className extends #superClass {
// public void reset() { return; }
protected ResultSet doExecute() throws StandardException {
// statements must be added here
}
public #className() { super(); }
}
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv 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.</verbatim> |
| pack-priv void | finishExecuteMethod()
An execute method always ends in a return statement, returning the result set that has been constructed. |
| pack-priv String | getBaseClassName()
Implements abstract org. The base class for activations is BaseActivation |
| pack-priv MethodBuilder | |
| protected LocalField | |
| public String | Returns: package nameImplements abstract org. Get the package name that this generated class lives in |
| public int | Returns: package nameImplements abstract org. Get the number of ExecRows to allocate |
| pack-priv 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.</verbatim></verbatim> |
| pack-priv 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.</verbatim></verbatim> |
| public void | setNumSubqueries()
Implements abstract org. Generate the assignment for numSubqueries = x |
| pack-priv MethodBuilder |
| closeActivationMethod | back to summary |
|---|---|
| private MethodBuilder closeActivationMethod | |
| cursorResultSetField | back to summary |
|---|---|
| private LocalField cursorResultSetField | |
| targetResultSetField | back to summary |
|---|---|
| private LocalField targetResultSetField | |
| ActivationClassBuilder | back to summary |
|---|---|
| pack-priv ActivationClassBuilder(String superClass, CompilerContext cc) throws StandardException By the time this is done, it has constructed the following class:
final public class #className extends #superClass {
// public void reset() { return; }
protected ResultSet doExecute() throws StandardException {
// statements must be added here
}
public #className() { super(); }
}
| |
| addCursorPositionCode | back to summary |
|---|---|
| pack-priv 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. The code that is generated is:
| |
| finishExecuteMethod | back to summary |
|---|---|
| pack-priv void finishExecuteMethod() An execute method always ends in a return statement, returning the result set that has been constructed. We want to do some bookkeeping on that statement, so we generate the return given the result set. Upon entry the only word on the stack is the result set expression | |
| getBaseClassName | back to summary |
|---|---|
| pack-priv String getBaseClassName() Implements abstract org. The base class for activations is BaseActivation | |
| getCloseActivationMethod | back to summary |
|---|---|
| pack-priv MethodBuilder getCloseActivationMethod() | |
| getCurrentSetup | back to summary |
|---|---|
| protected LocalField getCurrentSetup() Overrides org.
| |
| getPackageName | back to summary |
|---|---|
| public String getPackageName() Implements abstract org. Get the package name that this generated class lives in
| |
| getRowCount | back to summary |
|---|---|
| public int getRowCount() throws StandardException Implements abstract org. Get the number of ExecRows to allocate
| |
| rememberCursor | back to summary |
|---|---|
| pack-priv 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. The code that is generated is: The expression that is generated is: The expression must be the top stack word when this method is called. | |
| rememberCursorTarget | back to summary |
|---|---|
| pack-priv 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. The code that is generated is: The expression that is generated is:
| |
| setNumSubqueries | back to summary |
|---|---|
| public void setNumSubqueries() Implements abstract org. Generate the assignment for numSubqueries = x
| |
| startResetMethod | back to summary |
|---|---|
| pack-priv MethodBuilder startResetMethod() | |