Dependable
, Dependent
CursorActivation
BaseActivation
, ConstantActionActivation
, CursorActivation
, GenericActivationHolder
public interface Activation extends Dependent
The fixed implementations of Activation in the Execution impl package are used as skeletons for the classes generated for statements when they are compiled.
There are no fixed implementations of Activation for statements; a statement has an activation generated for it when it is compiled.
ACTIVATION, ALIAS, COLUMNS_IN_TABLE, COLUMNS_PERMISSION, CONGLOMERATE, CONSTRAINT, DEFAULT, FILE, HEAP, INDEX, PERM, PREPARED_STATEMENT, ROLE_GRANT, ROUTINE_PERMISSION, SCHEMA, SEQUENCE, STORED_PREPARED_STATEMENT, TABLE, TABLE_PERMISSION, TRIGGER, VIEW
Modifier and Type | Method | Description |
---|---|---|
void |
addWarning(java.sql.SQLWarning w) |
Add a warning to the activation
|
boolean |
checkIfThisActivationHasHoldCursor(java.lang.String tableName) |
Temporary tables can be declared with ON COMMIT DELETE ROWS.
|
void |
checkStatementValidity() |
Check the validity of the current executing statement.
|
void |
clearCurrentRow(int resultSetNumber) |
Generated plans have a current row field for ease in defining
the methods and finding them dynamically.
|
void |
clearHeapConglomerateController() |
Clear the ConglomerateController to be used for an update or delete.
|
void |
clearIndexScanInfo() |
Clear the info for the index to be re-used for update/delete.
|
void |
clearParentResultSets() |
|
void |
clearWarnings() |
Clear the activation's warnings.
|
void |
close() |
Closing an activation statement marks it as unusable.
|
ResultSet |
execute() |
When the prepared statement is executed, it passes
execution on to the activation execution was requested for.
|
int[] |
getAutoGeneratedKeysColumnIndexes() |
Returns the column positions array of columns requested in auto-generated
keys resultset for this avtivation.
|
java.lang.String[] |
getAutoGeneratedKeysColumnNames() |
Returns the column names array of columns requested in auto-generated
keys resultset for this avtivation.
|
boolean |
getAutoGeneratedKeysResultsetMode() |
Returns true if auto-generated keys resultset request was made for this
avtivation.
|
ConstantAction |
getConstantAction() |
Get the top ConstantAction on the stack without changing the stack.
|
Row |
getCurrentRow(int resultSetNumber) |
Get the current row at the given index.
|
NumberDataValue |
getCurrentValueAndAdvance(java.lang.String sequenceUUIDstring,
int typeFormatID) |
Called by generated code to get the next number in an ANSI/ISO sequence
and advance the sequence.
|
java.lang.String |
getCursorName() |
Return the cursor name of this activation.
|
DataValueFactory |
getDataValueFactory() |
Get the DataValueFactory
|
TableDescriptor |
getDDLTableDescriptor() |
Get the TableDescriptor for the target of
DDL.
|
java.sql.ResultSet[][] |
getDynamicResults() |
Return the set of dynamical created result sets, for procedures.
|
ExecutionFactory |
getExecutionFactory() |
Get the ExecutionFactory
|
boolean |
getForCreateTable() |
Get whether or not this activation is for
create table.
|
CursorResultSet |
getForUpdateIndexScan() |
|
ConglomerateController |
getHeapConglomerateController() |
Get the ConglomerateController, if any, that has already
been opened for the heap when scaning for an update or delete.
|
long |
getIndexConglomerateNumber() |
Get the conglomerate number of the index, if any, that has already
been opened for scaning for an update or delete.
|
ScanController |
getIndexScanController() |
Get the ScanController, if any, that has already
been opened for the index when scaning for an update or delete.
|
LanguageConnectionContext |
getLanguageConnectionContext() |
Get the language connection context associated with this activation
|
int |
getMaxDynamicResults() |
Return the maximum number of dynamical created result sets from the procedure definition.
|
long |
getMaxRows() |
Get the maximum # of rows. (# of rows that can
be returned by a ResultSet. 0 means no limit.)
|
int |
getNumSubqueries() |
Get the number of subqueries in the entire query.
|
ParameterValueSet |
getParameterValueSet() |
Gets the ParameterValueSet for this execution of the statement.
|
Activation |
getParentActivation() |
This activation is created in a dynamic call context, or substatement
execution context; get its caller's or superstatement's activation.
|
java.util.Vector<TemporaryRowHolder> |
getParentResultSet(java.lang.String resultSetId) |
get the reference to parent table ResultSets, that will be needed by the
referential action dependent table scans.
|
java.util.Enumeration<java.lang.String> |
getParentResultSetKeys() |
|
ExecPreparedStatement |
getPreparedStatement() |
Get the prepared statement that this activation is for.
|
ResultDescription |
getResultDescription() |
Get the result description for this activation, if it has one.
|
ResultSet |
getResultSet() |
Returns the current result set for this activation, i.e.
|
boolean |
getResultSetHoldability() |
Return the holdability of this activation.
|
RowLocation |
getRowLocationTemplate(int itemNumber) |
Get the saved RowLocation.
|
SQLSessionContext |
getSQLSessionContextForChildren() |
Get the current SQL session context if in a nested connection of a
stored routine or in a substatement.
|
java.sql.ResultSet |
getTargetVTI() |
Get the ResultSet for the target
of an update/delete to a VTI.
|
TransactionController |
getTransactionController() |
Get the Execution TransactionController associated with this
activation/lcc.
|
java.sql.SQLWarning |
getWarnings() |
Returns the chained list of warnings.
|
void |
informOfRowCount(NoPutResultSet resultSet,
long rowCount) |
Tell this activation that the given ResultSet was found to have
the given number of rows.
|
boolean |
isClosed() |
Find out if the activation is closed or not.
|
boolean |
isCursorActivation() |
Is this Activation for a cursor?
|
boolean |
isInUse() |
Is the activation in use?
|
boolean |
isSingleExecution() |
Returns true if this Activation is only going to be used for
one execution.
|
void |
markUnused() |
Mark the activation as unused.
|
ConstantAction |
popConstantAction() |
Pop the ConstantAction stack, returning the element which was just popped
off the stack.
|
ConstantAction |
pushConstantAction(ConstantAction newConstantAction) |
Push a ConstantAction to be returned by getConstantAction().
|
void |
reset() |
Resets the activation to the "pre-execution" state -
that is, the state where it can be used to begin a new execution.
|
void |
setAutoGeneratedKeysResultsetInfo(int[] columnIndexes,
java.lang.String[] columnNames) |
Set the auto-generated keys resultset mode to true for this activation.
|
void |
setCurrentRow(ExecRow currentRow,
int resultSetNumber) |
Generated plans have a current row field for ease in defining
the methods and finding them dynamically.
|
void |
setCursorName(java.lang.String cursorName) |
JDBC requires that all select statements be converted into cursors,
and that the cursor name be settable for each execution of a select
statement.
|
void |
setDDLTableDescriptor(TableDescriptor td) |
Save the TableDescriptor for the target of
DDL so that it can be passed between the
various ConstantActions during execution.
|
void |
setForCreateTable() |
Mark the Activation as being for create table.
|
void |
setForUpdateIndexScan(CursorResultSet forUpdateResultSet) |
beetle 3865: updateable cursor using index.
|
void |
setHeapConglomerateController(ConglomerateController updateHeapCC) |
Set the ConglomerateController to be used for an update or delete.
|
void |
setIndexConglomerateNumber(long indexConglomerateNumber) |
Set the conglomerate number of the index to be used for an update or delete,
when scanning an index that will also be updated
(Saves opening the ScanController twice.)
|
void |
setIndexScanController(ScanController indexSC) |
Set the ScanController to be used for an update or delete,
when scanning an index that will also be updated
(Saves opening the ScanController twice.)
|
void |
setMaxRows(long maxRows) |
Set the maximum # of rows. (# of rows that can
be returned by a ResultSet. 0 means no limit.)
|
void |
setParameters(ParameterValueSet parameterValues,
DataTypeDescriptor[] parameterTypes) |
Sets the parameter values for this execution of the statement.
|
void |
setParentActivation(Activation a) |
This activation is created in a dynamic call context or a substatement
execution context, chain its parent statements activation..
|
void |
setParentResultSet(TemporaryRowHolder rs,
java.lang.String resultSetId) |
|
void |
setResultSetHoldability(boolean resultSetHoldability) |
Set current resultset holdability.
|
void |
setSingleExecution() |
Set this Activation for a single execution.
|
void |
setTargetVTI(java.sql.ResultSet targetVTI) |
Save the ResultSet for the target
of an update/delete to a VTI.
|
SQLSessionContext |
setupSQLSessionContextForChildren(boolean push) |
Set up and return the current SQL session context for all immediately
nested connections stemming from the call or function invocation of the
statement corresponding to this activation (push=true) or for a
substatement, which shares the parents statement's session context
(push=false).
|
getClassType, getDependableFinder, getObjectID, getObjectName, isPersistent
isValid, makeInvalid, prepareToInvalidate
void reset() throws StandardException
StandardException
- thrown on failurevoid setCursorName(java.lang.String cursorName)
There will be a JSQL statement to disable the "cursorization" of all select statements. For non-cursorized select statements, this method will have no effect.
This has no effect if the activation has been closed.
cursorName
- The cursor name to use.boolean checkIfThisActivationHasHoldCursor(java.lang.String tableName)
ParameterValueSet getParameterValueSet()
void setParameters(ParameterValueSet parameterValues, DataTypeDescriptor[] parameterTypes) throws StandardException
Has no effect if the activation has been closed.
NOTE: The setParameters() method is currently unimplemented. A statement with parameters will generate its own ParameterValueSet, which can be gotten with the getParameterValueSet() method (above). The idea behind setParameters() is to improve performance when operating across a network by allowing all the parameters to be set in one call, as opposed to one call per parameter.
parameterValues
- The values of the parameters.StandardException
ResultSet execute() throws StandardException
StandardException
- Thrown on failurevoid close() throws StandardException
Any class that implements this must be prepared to be executed from garbage collection, ie. there is no matching context stack.
StandardException
- Thrown on failureboolean isClosed()
void setSingleExecution()
boolean isSingleExecution()
java.sql.SQLWarning getWarnings()
void addWarning(java.sql.SQLWarning w)
void clearWarnings()
LanguageConnectionContext getLanguageConnectionContext()
TransactionController getTransactionController()
ResultSet getResultSet()
void setCurrentRow(ExecRow currentRow, int resultSetNumber)
When all processing on the currentRow has been completed, callers should call activation.clearCurrentRow(resultSetNumber) to ensure that no unnecessary references are retained to rows. This will allow the rows no longer in use to be collected by the garbage collecter.
currentRow
- The row to be operated upon.resultSetNumber
- The resultSetNumber for the current ResultSetRow getCurrentRow(int resultSetNumber)
void clearCurrentRow(int resultSetNumber)
When all processing on the currentRow has been completed, callers should call activation.clearCurrentRow(resultSetNumber) to ensure that no unnecessary references are retained to rows. This will allow the rows no longer in use to be collected by the garbage collecter.
resultSetNumber
- The resultSetNumber for the current ResultSetExecPreparedStatement getPreparedStatement()
void checkStatementValidity() throws StandardException
StandardException
ResultDescription getResultDescription()
DataValueFactory getDataValueFactory()
ExecutionFactory getExecutionFactory()
RowLocation getRowLocationTemplate(int itemNumber)
itemNumber
- The saved item number.int getNumSubqueries()
java.lang.String getCursorName()
Statements that do not support cursors will return a null.
boolean getResultSetHoldability()
void setResultSetHoldability(boolean resultSetHoldability)
resultSetHoldability
- The new resultset holdability.void setAutoGeneratedKeysResultsetInfo(int[] columnIndexes, java.lang.String[] columnNames)
columnIndexes
- Request specific columns in auto-generated keys
resultset by passing column positions. null means no specific columns
requested by positioncolumnNames
- Request specific columns in auto-generated keys
resultset by passing column names. null means no specific columns
requested by positionboolean getAutoGeneratedKeysResultsetMode()
int[] getAutoGeneratedKeysColumnIndexes()
java.lang.String[] getAutoGeneratedKeysColumnNames()
void markUnused()
boolean isInUse()
void informOfRowCount(NoPutResultSet resultSet, long rowCount) throws StandardException
StandardException
- Thrown on errorConglomerateController getHeapConglomerateController()
void setHeapConglomerateController(ConglomerateController updateHeapCC)
updateHeapCC
- The ConglomerateController to reuse for the update or delete.void clearHeapConglomerateController()
ScanController getIndexScanController()
void setIndexScanController(ScanController indexSC)
indexSC
- The ScanController to reuse for the update or delete.long getIndexConglomerateNumber()
void setIndexConglomerateNumber(long indexConglomerateNumber)
indexConglomerateNumber
- The conglomerate number of the index to reuse for the update or delete.void clearIndexScanInfo()
void setForCreateTable()
boolean getForCreateTable()
void setDDLTableDescriptor(TableDescriptor td)
TableDescriptor getDDLTableDescriptor()
void setMaxRows(long maxRows)
maxRows
- Maximum # of rows. (0 means no limit.)long getMaxRows()
boolean isCursorActivation()
void setTargetVTI(java.sql.ResultSet targetVTI)
java.sql.ResultSet getTargetVTI()
ConstantAction pushConstantAction(ConstantAction newConstantAction)
ConstantAction popConstantAction()
ConstantAction getConstantAction()
void setParentResultSet(TemporaryRowHolder rs, java.lang.String resultSetId)
java.util.Vector<TemporaryRowHolder> getParentResultSet(java.lang.String resultSetId)
void clearParentResultSets()
java.util.Enumeration<java.lang.String> getParentResultSetKeys()
void setForUpdateIndexScan(CursorResultSet forUpdateResultSet)
CursorResultSet getForUpdateIndexScan()
java.sql.ResultSet[][] getDynamicResults()
int getMaxDynamicResults()
SQLSessionContext getSQLSessionContextForChildren()
SQLSessionContext setupSQLSessionContextForChildren(boolean push)
push
- true if used to push a new connection contextvoid setParentActivation(Activation a)
Activation getParentActivation()
NumberDataValue getCurrentValueAndAdvance(java.lang.String sequenceUUIDstring, int typeFormatID) throws StandardException
sequenceUUIDstring
- The string value of the sequence's UUIDtypeFormatID
- The format id of the data type to be returned. E.g., StoredFormatIds.SQL_INTEGER_ID.StandardException
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.