Dependable, Activation, Dependentpublic final class GenericActivationHolder extends java.lang.Object implements Activation
| Modifier and Type | Field | Description |
|---|---|---|
BaseActivation |
ac |
|
(package private) GeneratedClass |
gc |
|
private LanguageConnectionContext |
lcc |
|
(package private) DataTypeDescriptor[] |
paramTypes |
|
(package private) ExecPreparedStatement |
ps |
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| Constructor | Description |
|---|---|
GenericActivationHolder(LanguageConnectionContext lcc,
GeneratedClass gc,
ExecPreparedStatement ps,
boolean scrollable) |
Constructor for an ActivationHolder
|
| 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.
|
java.lang.String |
getClassType() |
Get the unique class id for the Dependable.
|
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.
|
DependableFinder |
getDependableFinder() |
Get an object which can be written to disk and which,
when read from disk, will find or reconstruct this in-memory
Dependable.
|
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.
|
UUID |
getObjectID() |
Get the UUID of this Dependable OBJECT.
|
java.lang.String |
getObjectName() |
Get the name of this Dependable OBJECT.
|
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 |
isPersistent() |
Return whether or not this Dependable is persistent.
|
boolean |
isSingleExecution() |
Is the activation set up for a single execution.
|
boolean |
isValid() |
Check that all of the dependent's dependencies are valid.
|
void |
makeInvalid(int action,
LanguageConnectionContext lcc) |
Mark the dependent as invalid (due to at least one of
its dependencies being invalid).
|
void |
markUnused() |
Mark the activation as unused.
|
ConstantAction |
popConstantAction() |
Pop the ConstantAction stack, returning the element which was just popped
off the stack.
|
void |
prepareToInvalidate(Provider p,
int action,
LanguageConnectionContext lcc) |
Prepare to mark the dependent as invalid (due to at least one of
its dependencies being invalid).
|
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 the 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).
|
public BaseActivation ac
ExecPreparedStatement ps
GeneratedClass gc
DataTypeDescriptor[] paramTypes
private final LanguageConnectionContext lcc
GenericActivationHolder(LanguageConnectionContext lcc, GeneratedClass gc, ExecPreparedStatement ps, boolean scrollable) throws StandardException
gc - The GeneratedClass of the Activationps - The PreparedStatement this ActivationHolder is associated
withStandardException - Thrown on errorpublic void reset()
throws StandardException
Activationreset in interface ActivationStandardException - thrown on failureActivation.reset()public boolean checkIfThisActivationHasHoldCursor(java.lang.String tableName)
checkIfThisActivationHasHoldCursor in interface Activationpublic void setCursorName(java.lang.String cursorName)
ActivationThere 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.
setCursorName in interface ActivationcursorName - The cursor name to use.Activation.setCursorName(java.lang.String)public java.lang.String getCursorName()
ActivationStatements that do not support cursors will return a null.
getCursorName in interface ActivationActivation.getCursorName()public void setResultSetHoldability(boolean resultSetHoldability)
ActivationsetResultSetHoldability in interface ActivationresultSetHoldability - The new resultset holdability.Activation.setResultSetHoldability(boolean)public boolean getResultSetHoldability()
ActivationgetResultSetHoldability in interface ActivationActivation.getResultSetHoldability()public void setAutoGeneratedKeysResultsetInfo(int[] columnIndexes,
java.lang.String[] columnNames)
ActivationsetAutoGeneratedKeysResultsetInfo in interface ActivationcolumnIndexes - 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 positionActivation.setAutoGeneratedKeysResultsetInfo(int[], java.lang.String[])public boolean getAutoGeneratedKeysResultsetMode()
ActivationgetAutoGeneratedKeysResultsetMode in interface ActivationActivation.getAutoGeneratedKeysResultsetMode()public int[] getAutoGeneratedKeysColumnIndexes()
ActivationgetAutoGeneratedKeysColumnIndexes in interface ActivationActivation.getAutoGeneratedKeysColumnIndexes()public java.lang.String[] getAutoGeneratedKeysColumnNames()
ActivationgetAutoGeneratedKeysColumnNames in interface ActivationActivation.getAutoGeneratedKeysColumnNames()public LanguageConnectionContext getLanguageConnectionContext()
ActivationgetLanguageConnectionContext in interface ActivationActivation.getLanguageConnectionContext()public TransactionController getTransactionController()
ActivationgetTransactionController in interface Activationpublic ExecutionFactory getExecutionFactory()
ActivationgetExecutionFactory in interface ActivationActivation.getExecutionFactory()public ParameterValueSet getParameterValueSet()
ActivationgetParameterValueSet in interface ActivationActivation.getParameterValueSet()public void setParameters(ParameterValueSet parameterValues, DataTypeDescriptor[] parameterTypes) throws StandardException
ActivationHas 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.
setParameters in interface ActivationparameterValues - The values of the parameters.StandardExceptionActivation.setParameters(org.apache.derby.iapi.sql.ParameterValueSet, org.apache.derby.iapi.types.DataTypeDescriptor[])public ResultSet execute() throws StandardException
Activationexecute in interface ActivationStandardException - Thrown on failureActivation.execute()public ResultSet getResultSet()
ActivationgetResultSet in interface ActivationActivation.getResultSet()public void setCurrentRow(ExecRow currentRow, int resultSetNumber)
ActivationWhen 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.
setCurrentRow in interface ActivationcurrentRow - The row to be operated upon.resultSetNumber - The resultSetNumber for the current ResultSetActivation.setCurrentRow(org.apache.derby.iapi.sql.execute.ExecRow, int)public Row getCurrentRow(int resultSetNumber)
ActivationgetCurrentRow in interface ActivationActivation.getCurrentRow(int)public void clearCurrentRow(int resultSetNumber)
ActivationWhen 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.
clearCurrentRow in interface ActivationresultSetNumber - The resultSetNumber for the current ResultSetActivation.clearCurrentRow(int)public ExecPreparedStatement getPreparedStatement()
ActivationgetPreparedStatement in interface ActivationActivation.getPreparedStatement()public void checkStatementValidity()
throws StandardException
ActivationcheckStatementValidity in interface ActivationStandardExceptionpublic ResultDescription getResultDescription()
ActivationgetResultDescription in interface ActivationActivation.getResultDescription()public DataValueFactory getDataValueFactory()
ActivationgetDataValueFactory in interface ActivationActivation.getDataValueFactory()public RowLocation getRowLocationTemplate(int itemNumber)
ActivationgetRowLocationTemplate in interface ActivationitemNumber - The saved item number.Activation.getRowLocationTemplate(int)public ConglomerateController getHeapConglomerateController()
ActivationgetHeapConglomerateController in interface ActivationActivation.getHeapConglomerateController()public void setHeapConglomerateController(ConglomerateController updateHeapCC)
ActivationsetHeapConglomerateController in interface ActivationupdateHeapCC - The ConglomerateController to reuse for the update or delete.Activation.setHeapConglomerateController(org.apache.derby.iapi.store.access.ConglomerateController)public void clearHeapConglomerateController()
ActivationclearHeapConglomerateController in interface ActivationActivation.clearHeapConglomerateController()public ScanController getIndexScanController()
ActivationgetIndexScanController in interface ActivationActivation.getIndexScanController()public void setIndexScanController(ScanController indexSC)
ActivationsetIndexScanController in interface ActivationindexSC - The ScanController to reuse for the update or delete.Activation.setIndexScanController(org.apache.derby.iapi.store.access.ScanController)public long getIndexConglomerateNumber()
ActivationgetIndexConglomerateNumber in interface ActivationActivation.getIndexConglomerateNumber()public void setIndexConglomerateNumber(long indexConglomerateNumber)
ActivationsetIndexConglomerateNumber in interface ActivationindexConglomerateNumber - The conglomerate number of the index to reuse for the update or delete.Activation.setIndexConglomerateNumber(long)public void clearIndexScanInfo()
ActivationclearIndexScanInfo in interface ActivationActivation.clearIndexScanInfo()public void close()
throws StandardException
ActivationAny class that implements this must be prepared to be executed from garbage collection, ie. there is no matching context stack.
close in interface ActivationStandardException - Thrown on errorActivation.close()public boolean isClosed()
ActivationisClosed in interface ActivationActivation.isClosed()public void setSingleExecution()
setSingleExecution in interface ActivationActivation.setSingleExecution()public boolean isSingleExecution()
isSingleExecution in interface ActivationActivation.isSingleExecution()public int getNumSubqueries()
getNumSubqueries in interface Activationpublic void setForCreateTable()
ActivationsetForCreateTable in interface ActivationActivation.setForCreateTable()public boolean getForCreateTable()
ActivationgetForCreateTable in interface ActivationActivation.getForCreateTable()public void setDDLTableDescriptor(TableDescriptor td)
ActivationsetDDLTableDescriptor in interface ActivationActivation.setDDLTableDescriptor(org.apache.derby.iapi.sql.dictionary.TableDescriptor)public TableDescriptor getDDLTableDescriptor()
ActivationgetDDLTableDescriptor in interface ActivationActivation.getDDLTableDescriptor()public void setMaxRows(long maxRows)
ActivationsetMaxRows in interface ActivationmaxRows - Maximum # of rows. (0 means no limit.)Activation.setMaxRows(long)public long getMaxRows()
ActivationgetMaxRows in interface ActivationActivation.getMaxRows()public void setTargetVTI(java.sql.ResultSet targetVTI)
ActivationsetTargetVTI in interface Activationpublic java.sql.ResultSet getTargetVTI()
ActivationgetTargetVTI in interface Activationpublic SQLSessionContext getSQLSessionContextForChildren()
ActivationgetSQLSessionContextForChildren in interface Activationpublic SQLSessionContext setupSQLSessionContextForChildren(boolean push)
ActivationsetupSQLSessionContextForChildren in interface Activationpush - true if used to push a new connection contextpublic void setParentActivation(Activation a)
ActivationsetParentActivation in interface Activationpublic Activation getParentActivation()
ActivationgetParentActivation in interface Activationpublic DependableFinder getDependableFinder()
DependablegetDependableFinder in interface DependableDependable.getDependableFinder()public java.lang.String getObjectName()
DependablegetObjectName in interface DependableDependable.getObjectName()public UUID getObjectID()
DependablegetObjectID in interface DependableDependable.getObjectID()public java.lang.String getClassType()
DependablegetClassType in interface DependableDependable.getClassType()public boolean isPersistent()
DependableisPersistent in interface DependableDependable.isPersistent()public boolean isValid()
DependentisValid in interface DependentDependent.isValid()public void makeInvalid(int action,
LanguageConnectionContext lcc)
throws StandardException
DependentmakeInvalid in interface Dependentaction - The action causing the invalidationlcc - The LanguageConnectionContextStandardException - thrown if unable to make it invalidDependent.makeInvalid(int, org.apache.derby.iapi.sql.conn.LanguageConnectionContext)public void prepareToInvalidate(Provider p, int action, LanguageConnectionContext lcc) throws StandardException
DependentprepareToInvalidate in interface Dependentp - the provideraction - The action causing the invalidationlcc - The LanguageConnectionContextStandardException - thrown if unable to make it invalidDependent.prepareToInvalidate(org.apache.derby.iapi.sql.depend.Provider, int, org.apache.derby.iapi.sql.conn.LanguageConnectionContext)public void markUnused()
markUnused in interface Activationpublic boolean isInUse()
isInUse in interface Activationpublic void addWarning(java.sql.SQLWarning w)
ActivationaddWarning in interface ActivationActivation.addWarning(java.sql.SQLWarning)public java.sql.SQLWarning getWarnings()
ActivationgetWarnings in interface ActivationActivation.getWarnings()public void clearWarnings()
ActivationclearWarnings in interface ActivationActivation.clearWarnings()public void informOfRowCount(NoPutResultSet resultSet, long rowCount) throws StandardException
ActivationinformOfRowCount in interface ActivationStandardException - Thrown on errorActivation.informOfRowCount(org.apache.derby.iapi.sql.execute.NoPutResultSet, long)public boolean isCursorActivation()
ActivationisCursorActivation in interface ActivationActivation.isCursorActivation()public ConstantAction pushConstantAction(ConstantAction newConstantAction)
ActivationpushConstantAction in interface Activationpublic ConstantAction popConstantAction()
ActivationpopConstantAction in interface Activationpublic ConstantAction getConstantAction()
ActivationgetConstantAction in interface Activationpublic void setParentResultSet(TemporaryRowHolder rs, java.lang.String resultSetId)
setParentResultSet in interface Activationpublic java.util.Vector<TemporaryRowHolder> getParentResultSet(java.lang.String resultSetId)
ActivationgetParentResultSet in interface Activationpublic void clearParentResultSets()
clearParentResultSets in interface Activationpublic java.util.Enumeration<java.lang.String> getParentResultSetKeys()
getParentResultSetKeys in interface Activationpublic void setForUpdateIndexScan(CursorResultSet forUpdateResultSet)
ActivationsetForUpdateIndexScan in interface Activationpublic CursorResultSet getForUpdateIndexScan()
getForUpdateIndexScan in interface Activationpublic java.sql.ResultSet[][] getDynamicResults()
ActivationgetDynamicResults in interface Activationpublic int getMaxDynamicResults()
ActivationgetMaxDynamicResults in interface Activationpublic NumberDataValue getCurrentValueAndAdvance(java.lang.String sequenceUUIDstring, int typeFormatID) throws StandardException
ActivationgetCurrentValueAndAdvance in interface ActivationsequenceUUIDstring - The string value of the sequence's UUIDtypeFormatID - The format id of the data type to be returned. E.g., StoredFormatIds.SQL_INTEGER_ID.StandardExceptionApache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.