Top Description Methods
org.apache.derby.iapi.sql

public Interface Activation

extends Dependent
Known Direct Subinterfaces
org.apache.derby.iapi.sql.execute.CursorActivation
Known Direct Implementers
org.apache.derby.impl.sql.GenericActivationHolder
Imports
java.sql.SQLWarning, java.util.Enumeration, .Vector, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.sql.conn.LanguageConnectionContext, .SQLSessionContext, org.apache.derby.iapi.sql.depend.Dependent, org.apache.derby.iapi.sql.dictionary.TableDescriptor, org.apache.derby.iapi.sql.execute.ConstantAction, .CursorResultSet, .ExecPreparedStatement, .ExecRow, .ExecutionFactory, .NoPutResultSet, .TemporaryRowHolder, org.apache.derby.iapi.store.access.ConglomerateController, .ScanController, .TransactionController, org.apache.derby.iapi.types.DataTypeDescriptor, .DataValueFactory, .NumberDataValue, .RowLocation

An activation contains all the local state information necessary to execute a re-entrant PreparedStatement. The way it will actually work is that a PreparedStatement will have an executable plan, which will be a generated class. All of the local state will be variables in the class. Creating a new instance of the executable plan will create the local state variables. This means that an executable plan must implement this interface, and that the PreparedStatement.getActivation() method will do a "new" operation on the executable plan.

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.

Method Summary

Modifier and TypeMethod and Description
public void
addWarning(SQLWarning
The next warning to chain to the end of the list
w
)

Add a warning to the activation

public boolean

Returns:

true if this activation has held cursor and if it references the passed temp table name
checkIfThisActivationHasHoldCursor
(String
A table name
tableName
)

Temporary tables can be declared with ON COMMIT DELETE ROWS.

public void
checkStatementValidity()

Check the validity of the current executing statement.

public void
clearCurrentRow(int
The resultSetNumber for the current ResultSet
resultSetNumber
)

Generated plans have a current row field for ease in defining the methods and finding them dynamically.

public void
clearHeapConglomerateController()

Clear the ConglomerateController to be used for an update or delete.

public void
clearIndexScanInfo()

Clear the info for the index to be re-used for update/delete.

public void
public void
clearWarnings()

Clear the activation's warnings.

public void
close()

Closing an activation statement marks it as unusable.

public ResultSet

Returns:

the ResultSet for further manipulation, if any.
execute
()

When the prepared statement is executed, it passes execution on to the activation execution was requested for.

public int[]

Returns:

column positions array of columns requested.
getAutoGeneratedKeysColumnIndexes
()

Returns the column positions array of columns requested in auto-generated keys resultset for this avtivation.

public String[]

Returns:

column names array of columns requested.
getAutoGeneratedKeysColumnNames
()

Returns the column names array of columns requested in auto-generated keys resultset for this avtivation.

public boolean

Returns:

auto-generated keys resultset mode for this activation.
getAutoGeneratedKeysResultsetMode
()

Returns true if auto-generated keys resultset request was made for this avtivation.

public ConstantAction

Returns:

the top of the stack
getConstantAction
()

Get the top ConstantAction on the stack without changing the stack.

public Row

Returns:

the current row in that result set
getCurrentRow
(int
Index into list of result sets
resultSetNumber
)

Get the current row at the given index.

public NumberDataValue

Returns:

The next number in the sequence
getCurrentValueAndAdvance
(String
The string value of the sequence's UUID
sequenceUUIDstring
,
int
The format id of the data type to be returned. E.g., StoredFormatIds.SQL_INTEGER_ID.
typeFormatID
)

Called by generated code to get the next number in an ANSI/ISO sequence and advance the sequence.

public String

Returns:

The cursor name.
getCursorName
()

Return the cursor name of this activation.

public DataValueFactory

Returns:

DataValueFactory
getDataValueFactory
()

Get the DataValueFactory

public TableDescriptor

Returns:

The TableDescriptor for the target of DDL.
getDDLTableDescriptor
()

Get the TableDescriptor for the target of DDL.

public ResultSet[][]

Returns:

null if no dynamic results exists. Otherwise an array of ResultSet arrays, each of length one containing null or a reference to a ResultSet.
getDynamicResults
()

Return the set of dynamical created result sets, for procedures.

public ExecutionFactory

Returns:

ExecutionFactory
getExecutionFactory
()

Get the ExecutionFactory

public boolean

Returns:

Whether or not this activation is for create table.
getForCreateTable
()

Get whether or not this activation is for create table.

public CursorResultSet
public ConglomerateController

Returns:

The ConglomerateController, if available, to use for the update.
getHeapConglomerateController
()

Get the ConglomerateController, if any, that has already been opened for the heap when scaning for an update or delete.

public long

Returns:

The conglomerate number, if available, to use for the update.
getIndexConglomerateNumber
()

Get the conglomerate number of the index, if any, that has already been opened for scaning for an update or delete.

public ScanController

Returns:

The ScanController, if available, to use for the update.
getIndexScanController
()

Get the ScanController, if any, that has already been opened for the index when scaning for an update or delete.

public LanguageConnectionContext

Returns:

the LCC
getLanguageConnectionContext
()

Get the language connection context associated with this activation

public int

Returns:

the maximum number of dynamical created result sets from the procedure definition
getMaxDynamicResults
()

Return the maximum number of dynamical created result sets from the procedure definition.

public long

Returns:

Maximum # of rows. (0 means no limit.)
getMaxRows
()

Get the maximum # of rows.

public int

Returns:

int The number of subqueries in the entire query.
getNumSubqueries
()

Get the number of subqueries in the entire query.

public ParameterValueSet

Returns:

The ParameterValueSet for this execution of the statement. Returns NULL if there are no parameters.
getParameterValueSet
()

Gets the ParameterValueSet for this execution of the statement.

public Activation

Returns:

The caller's activation
getParentActivation
()

This activation is created in a dynamic call context, or substatement execution context; get its caller's or superstatement's activation.

public Vector<TemporaryRowHolder>

Returns:

the parent result sets
getParentResultSet
(String
An handle on the result set
resultSetId
)

get the reference to parent table ResultSets, that will be needed by the referential action dependent table scans.

public Enumeration<String>
public ExecPreparedStatement

Returns:

the prepared statement this activation is for.
getPreparedStatement
()

Get the prepared statement that this activation is for.

public ResultDescription

Returns:

result description for this activation, if it has one; otherwise, null.
getResultDescription
()

Get the result description for this activation, if it has one.

public ResultSet

Returns:

the current ResultSet of this activation.
getResultSet
()

Returns the current result set for this activation, i.e. the one returned by the last execute() call.

public boolean

Returns:

The holdability of this activation.
getResultSetHoldability
()

Return the holdability of this activation.

public RowLocation

Returns:

A RowLocation template for the conglomerate
getRowLocationTemplate
(int
The saved item number.
itemNumber
)

Get the saved RowLocation.

public SQLSessionContext

Returns:

the sql session context
getSQLSessionContextForChildren
()

Get the current SQL session context if in a nested connection of a stored routine or in a substatement.

public ResultSet

Returns:

The ResultSet for the target of an update/delete to a VTI.
getTargetVTI
()

Get the ResultSet for the target of an update/delete to a VTI.

public TransactionController

Returns:

the transaction controller
getTransactionController
()

Get the Execution TransactionController associated with this activation/lcc.

public SQLWarning

Returns:

the chain of sql warnings
getWarnings
()

Returns the chained list of warnings.

public void
informOfRowCount(NoPutResultSet
The result set to inform on
resultSet
,
long
The number of rows found in that result set
rowCount
)

Tell this activation that the given ResultSet was found to have the given number of rows.

public boolean

Returns:

true if the Activation has been closed.
isClosed
()

Find out if the activation is closed or not.

public boolean

Returns:

Whether or not this Activation is for a cursor.
isCursorActivation
()

Is this Activation for a cursor?

public boolean

Returns:

true/false
isInUse
()

Is the activation in use?

public boolean

Returns:

true if this Activation is single-use
isSingleExecution
()

Returns true if this Activation is only going to be used for one execution.

public void
markUnused()

Mark the activation as unused.

public ConstantAction

Returns:

the constant action just popped off the stack
popConstantAction
()

Pop the ConstantAction stack, returning the element which was just popped off the stack.

public ConstantAction

Returns:

that constant action
pushConstantAction
(ConstantAction
The new constant action to push
newConstantAction
)

Push a ConstantAction to be returned by getConstantAction().

public void
reset()

Resets the activation to the "pre-execution" state - that is, the state where it can be used to begin a new execution.

public void
setAutoGeneratedKeysResultsetInfo(int[]
Request specific columns in auto-generated keys resultset by passing column positions. null means no specific columns requested by position
columnIndexes
,
String[]
Request specific columns in auto-generated keys resultset by passing column names. null means no specific columns requested by position
columnNames
)

Set the auto-generated keys resultset mode to true for this activation.

public void
setCurrentRow(ExecRow
The row to be operated upon.
currentRow
,
int
The resultSetNumber for the current ResultSet
resultSetNumber
)

Generated plans have a current row field for ease in defining the methods and finding them dynamically.

public void
setCursorName(String
The cursor name to use.
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.

public void
setDDLTableDescriptor(TableDescriptor
The table descriptor for the target of the DDL
td
)

Save the TableDescriptor for the target of DDL so that it can be passed between the various ConstantActions during execution.

public void
setForCreateTable()

Mark the Activation as being for create table.

public void
setForUpdateIndexScan(CursorResultSet
An updatable result set
forUpdateResultSet
)

beetle 3865: updateable cursor using index.

public void
setHeapConglomerateController(ConglomerateController
The ConglomerateController to reuse for the update or delete.
updateHeapCC
)

Set the ConglomerateController to be used for an update or delete.

public void
setIndexConglomerateNumber(long
The conglomerate number of the index to reuse for the update or delete.
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.)

public void
setIndexScanController(ScanController
The ScanController to reuse for the update or delete.
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.)

public void
setMaxRows(long
Maximum # of rows. (0 means no limit.)
maxRows
)

Set the maximum # of rows.

public void
setParameters(ParameterValueSet
The values of the parameters.
parameterValues
,
DataTypeDescriptor[]
Their types
parameterTypes
)

Sets the parameter values for this execution of the statement.

public void
setParentActivation(Activation
The parent activation
a
)

This activation is created in a dynamic call context or a substatement execution context, chain its parent statements activation.

public void
public void
setResultSetHoldability(boolean
The new resultset holdability.
resultSetHoldability
)

Set current resultset holdability.

public void
setSingleExecution()

Set this Activation for a single execution.

public void
setTargetVTI(ResultSet
The result set which is the target of an updatable VTI
targetVTI
)

Save the ResultSet for the target of an update/delete to a VTI.

public SQLSessionContext

Returns:

current SQL session context
setupSQLSessionContextForChildren
(boolean
true if used to push a new connection context
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).

Inherited from org.apache.derby.iapi.sql.depend.Dependent:
isValidmakeInvalidprepareToInvalidate

Method Detail

addWarningback to summary
public void addWarning(SQLWarning w)

Add a warning to the activation

Parameters
w:SQLWarning

The next warning to chain to the end of the list

checkIfThisActivationHasHoldCursorback to summary
public boolean checkIfThisActivationHasHoldCursor(String tableName)

Temporary tables can be declared with ON COMMIT DELETE ROWS. But if the table has a held curosr open at commit time, data should not be deleted from the table. This method, (gets called at commit time) checks if this activation held cursor and if so, does that cursor reference the passed temp table name.

Parameters
tableName:String

A table name

Returns:boolean

true if this activation has held cursor and if it references the passed temp table name

checkStatementValidityback to summary
public void checkStatementValidity() throws StandardException

Check the validity of the current executing statement. Needs to be called after a statement has obtained the relevant table locks on

Exceptions
StandardException:
on error
clearCurrentRowback to summary
public void clearCurrentRow(int resultSetNumber)

Generated plans have a current row field for ease in defining the methods and finding them dynamically. The interface is used to set the row before a dynamic method that uses it is invoked.

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.

Parameters
resultSetNumber:int

The resultSetNumber for the current ResultSet

clearHeapConglomerateControllerback to summary
public void clearHeapConglomerateController()

Clear the ConglomerateController to be used for an update or delete. (Saves opening the ConglomerateController twice.)

clearIndexScanInfoback to summary
public void clearIndexScanInfo()

Clear the info for the index to be re-used for update/delete. (ScanController and conglomerate number.)

clearParentResultSetsback to summary
public void clearParentResultSets()
clearWarningsback to summary
public void clearWarnings()

Clear the activation's warnings.

closeback to summary
public void close() throws StandardException

Closing an activation statement marks it as unusable. Any other requests made on it will fail. An activation should be marked closed when it is expected to not be used any longer, i.e. when the connection for it is closed, or it has suffered some sort of severe error. This will also close its result set and release any resources it holds e.g. for parameters.

Any class that implements this must be prepared to be executed from garbage collection, ie. there is no matching context stack.

Exceptions
StandardException:
Thrown on failure
executeback to summary
public ResultSet execute() throws StandardException

When the prepared statement is executed, it passes execution on to the activation execution was requested for.

Returns:ResultSet

the ResultSet for further manipulation, if any.

Exceptions
StandardException:
Thrown on failure
getAutoGeneratedKeysColumnIndexesback to summary
public int[] getAutoGeneratedKeysColumnIndexes()

Returns the column positions array of columns requested in auto-generated keys resultset for this avtivation. Returns null if no specific column requested by positions

Returns:int[]

column positions array of columns requested.

getAutoGeneratedKeysColumnNamesback to summary
public String[] getAutoGeneratedKeysColumnNames()

Returns the column names array of columns requested in auto-generated keys resultset for this avtivation. Returns null if no specific column requested by names

Returns:String[]

column names array of columns requested.

getAutoGeneratedKeysResultsetModeback to summary
public boolean getAutoGeneratedKeysResultsetMode()

Returns true if auto-generated keys resultset request was made for this avtivation.

Returns:boolean

auto-generated keys resultset mode for this activation.

getConstantActionback to summary
public ConstantAction getConstantAction()

Get the top ConstantAction on the stack without changing the stack.

Returns:ConstantAction

the top of the stack

getCurrentRowback to summary
public Row getCurrentRow(int resultSetNumber)

Get the current row at the given index.

Parameters
resultSetNumber:int

Index into list of result sets

Returns:Row

the current row in that result set

getCurrentValueAndAdvanceback to summary
public NumberDataValue getCurrentValueAndAdvance(String sequenceUUIDstring, int typeFormatID) throws StandardException

Called by generated code to get the next number in an ANSI/ISO sequence and advance the sequence. Raises an exception if the sequence was declared NO CYCLE and its range is exhausted.

Parameters
sequenceUUIDstring:String

The string value of the sequence's UUID

typeFormatID:int

The format id of the data type to be returned. E.g., StoredFormatIds.SQL_INTEGER_ID.

Returns:NumberDataValue

The next number in the sequence

Exceptions
StandardException:
on error
getCursorNameback to summary
public String getCursorName()

Return the cursor name of this activation. This will differ from its ResultSet's cursor name if it has been altered with setCursorName. Thus this always returns the cursor name of the next execution of this activation. The cursor name of the current execution must be obtained from the ResultSet. or this.getResultSet.getCursorName() [with null checking].

Statements that do not support cursors will return a null.

Returns:String

The cursor name.

getDataValueFactoryback to summary
public DataValueFactory getDataValueFactory()

Get the DataValueFactory

Returns:DataValueFactory

DataValueFactory

getDDLTableDescriptorback to summary
public TableDescriptor getDDLTableDescriptor()

Get the TableDescriptor for the target of DDL.

Returns:TableDescriptor

The TableDescriptor for the target of DDL.

getDynamicResultsback to summary
public ResultSet[][] getDynamicResults()

Return the set of dynamical created result sets, for procedures. Base implementation returns null, a generated class for a procedure overwrites this with a real implementation.

Returns:ResultSet[][]

null if no dynamic results exists. Otherwise an array of ResultSet arrays, each of length one containing null or a reference to a ResultSet.

getExecutionFactoryback to summary
public ExecutionFactory getExecutionFactory()

Get the ExecutionFactory

Returns:ExecutionFactory

ExecutionFactory

getForCreateTableback to summary
public boolean getForCreateTable()

Get whether or not this activation is for create table. (NOTE: We can do certain optimizations for create table that we can't do for other DDL.)

Returns:boolean

Whether or not this activation is for create table.

getForUpdateIndexScanback to summary
public CursorResultSet getForUpdateIndexScan()
getHeapConglomerateControllerback to summary
public ConglomerateController getHeapConglomerateController()

Get the ConglomerateController, if any, that has already been opened for the heap when scaning for an update or delete. (Saves opening the ConglomerateController twice.)

Returns:ConglomerateController

The ConglomerateController, if available, to use for the update.

getIndexConglomerateNumberback to summary
public long getIndexConglomerateNumber()

Get the conglomerate number of the index, if any, that has already been opened for scaning for an update or delete. (Saves opening the ScanController twice.)

Returns:long

The conglomerate number, if available, to use for the update.

getIndexScanControllerback to summary
public ScanController getIndexScanController()

Get the ScanController, if any, that has already been opened for the index when scaning for an update or delete. (Saves opening the ScanController twice.)

Returns:ScanController

The ScanController, if available, to use for the update.

getLanguageConnectionContextback to summary
public LanguageConnectionContext getLanguageConnectionContext()

Get the language connection context associated with this activation

Returns:LanguageConnectionContext

the LCC

getMaxDynamicResultsback to summary
public int getMaxDynamicResults()

Return the maximum number of dynamical created result sets from the procedure definition. Base implementation returns 0, a generated class for a procedure overwrites this with a real implementation.

Returns:int

the maximum number of dynamical created result sets from the procedure definition

getMaxRowsback to summary
public long getMaxRows()

Get the maximum # of rows. (# of rows that can be returned by a ResultSet. 0 means no limit.)

Returns:long

Maximum # of rows. (0 means no limit.)

getNumSubqueriesback to summary
public int getNumSubqueries()

Get the number of subqueries in the entire query.

Returns:int

int The number of subqueries in the entire query.

getParameterValueSetback to summary
public ParameterValueSet getParameterValueSet()

Gets the ParameterValueSet for this execution of the statement.

Returns:ParameterValueSet

The ParameterValueSet for this execution of the statement. Returns NULL if there are no parameters.

getParentActivationback to summary
public Activation getParentActivation()

This activation is created in a dynamic call context, or substatement execution context; get its caller's or superstatement's activation.

Returns:Activation

The caller's activation

getParentResultSetback to summary
public Vector<TemporaryRowHolder> getParentResultSet(String resultSetId)

get the reference to parent table ResultSets, that will be needed by the referential action dependent table scans.

Parameters
resultSetId:String

An handle on the result set

Returns:Vector<TemporaryRowHolder>

the parent result sets

Annotations
@SuppressWarnings:UseOfObsoleteCollectionType
getParentResultSetKeysback to summary
public Enumeration<String> getParentResultSetKeys()
getPreparedStatementback to summary
public ExecPreparedStatement getPreparedStatement()

Get the prepared statement that this activation is for.

Returns:ExecPreparedStatement

the prepared statement this activation is for.

getResultDescriptionback to summary
public ResultDescription getResultDescription()

Get the result description for this activation, if it has one.

Returns:ResultDescription

result description for this activation, if it has one; otherwise, null.

getResultSetback to summary
public ResultSet getResultSet()

Returns the current result set for this activation, i.e. the one returned by the last execute() call. If there has been no execute call or the activation has been reset or closed, a null is returned.

Returns:ResultSet

the current ResultSet of this activation.

getResultSetHoldabilityback to summary
public boolean getResultSetHoldability()

Return the holdability of this activation.

Returns:boolean

The holdability of this activation.

getRowLocationTemplateback to summary
public RowLocation getRowLocationTemplate(int itemNumber)

Get the saved RowLocation.

Parameters
itemNumber:int

The saved item number.

Returns:RowLocation

A RowLocation template for the conglomerate

getSQLSessionContextForChildrenback to summary
public SQLSessionContext getSQLSessionContextForChildren()

Get the current SQL session context if in a nested connection of a stored routine or in a substatement.

Returns:SQLSessionContext

the sql session context

getTargetVTIback to summary
public ResultSet getTargetVTI()

Get the ResultSet for the target of an update/delete to a VTI.

Returns:ResultSet

The ResultSet for the target of an update/delete to a VTI.

getTransactionControllerback to summary
public TransactionController getTransactionController()

Get the Execution TransactionController associated with this activation/lcc.

Returns:TransactionController

the transaction controller

getWarningsback to summary
public SQLWarning getWarnings()

Returns the chained list of warnings. Returns null if there are no warnings.

Returns:SQLWarning

the chain of sql warnings

informOfRowCountback to summary
public void informOfRowCount(NoPutResultSet resultSet, long rowCount) throws StandardException

Tell this activation that the given ResultSet was found to have the given number of rows. This is used during execution to determine whether a table has grown or shrunk. If a table's size changes significantly, the activation may invalidate its PreparedStatement to force recompilation. Note that the association of row counts with ResultSets is kept in the activation class, not in the activation itself. This means that this method must be synchronized. This method is not required to check the number of rows on each call. Because of synchronization, this check is likely to be expensive, so it may only check every hundred calls or so.

Parameters
resultSet:NoPutResultSet

The result set to inform on

rowCount:long

The number of rows found in that result set

Exceptions
StandardException:
Thrown on error
isClosedback to summary
public boolean isClosed()

Find out if the activation is closed or not.

Returns:boolean

true if the Activation has been closed.

isCursorActivationback to summary
public boolean isCursorActivation()

Is this Activation for a cursor?

Returns:boolean

Whether or not this Activation is for a cursor.

isInUseback to summary
public boolean isInUse()

Is the activation in use?

Returns:boolean

true/false

isSingleExecutionback to summary
public boolean isSingleExecution()

Returns true if this Activation is only going to be used for one execution.

Returns:boolean

true if this Activation is single-use

markUnusedback to summary
public void markUnused()

Mark the activation as unused.

popConstantActionback to summary
public ConstantAction popConstantAction()

Pop the ConstantAction stack, returning the element which was just popped off the stack.

Returns:ConstantAction

the constant action just popped off the stack

pushConstantActionback to summary
public ConstantAction pushConstantAction(ConstantAction newConstantAction)

Push a ConstantAction to be returned by getConstantAction(). Returns the newConstantAction.

Parameters
newConstantAction:ConstantAction

The new constant action to push

Returns:ConstantAction

that constant action

resetback to summary
public void reset() throws StandardException

Resets the activation to the "pre-execution" state - that is, the state where it can be used to begin a new execution. Frees local buffers, stops scans, resets counters to zero, sets current date and time to an unitialized state, etc.

Exceptions
StandardException:
thrown on failure
setAutoGeneratedKeysResultsetInfoback to summary
public void setAutoGeneratedKeysResultsetInfo(int[] columnIndexes, String[] columnNames)

Set the auto-generated keys resultset mode to true for this activation. The specific columns for auto-generated keys resultset can be requested by passing column positions array The specific columns for auto-generated keys resultset can be requested by passing column names array Both the parameters would be null if user didn't request specific keys. Otherwise, the user could request specific columns by passing column positions or names array but not both.

Parameters
columnIndexes:int[]

Request specific columns in auto-generated keys resultset by passing column positions. null means no specific columns requested by position

columnNames:String[]

Request specific columns in auto-generated keys resultset by passing column names. null means no specific columns requested by position

setCurrentRowback to summary
public void setCurrentRow(ExecRow currentRow, int resultSetNumber)

Generated plans have a current row field for ease in defining the methods and finding them dynamically. The interface is used to set the row before a dynamic method that uses it is invoked.

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.

Parameters
currentRow:ExecRow

The row to be operated upon.

resultSetNumber:int

The resultSetNumber for the current ResultSet

setCursorNameback to summary
public void setCursorName(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. The Language Module will support this, so that the JDBC driver will not have to parse JSQL text. This method will have no effect when called on non-select statements.

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.

Parameters
cursorName:String

The cursor name to use.

setDDLTableDescriptorback to summary
public void setDDLTableDescriptor(TableDescriptor td)

Save the TableDescriptor for the target of DDL so that it can be passed between the various ConstantActions during execution.

Parameters
td:TableDescriptor

The table descriptor for the target of the DDL

setForCreateTableback to summary
public void setForCreateTable()

Mark the Activation as being for create table. (NOTE: We can do certain optimizations for create table that we can't do for other DDL.)

setForUpdateIndexScanback to summary
public void setForUpdateIndexScan(CursorResultSet forUpdateResultSet)

beetle 3865: updateable cursor using index. A way of communication between cursor activation and update activation.

Parameters
forUpdateResultSet:CursorResultSet

An updatable result set

setHeapConglomerateControllerback to summary
public void setHeapConglomerateController(ConglomerateController updateHeapCC)

Set the ConglomerateController to be used for an update or delete. (Saves opening the ConglomerateController twice.)

Parameters
updateHeapCC:ConglomerateController

The ConglomerateController to reuse for the update or delete.

setIndexConglomerateNumberback to summary
public 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.)

Parameters
indexConglomerateNumber:long

The conglomerate number of the index to reuse for the update or delete.

setIndexScanControllerback to summary
public 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.)

Parameters
indexSC:ScanController

The ScanController to reuse for the update or delete.

setMaxRowsback to summary
public void setMaxRows(long maxRows)

Set the maximum # of rows. (# of rows that can be returned by a ResultSet. 0 means no limit.)

Parameters
maxRows:long

Maximum # of rows. (0 means no limit.)

setParametersback to summary
public void setParameters(ParameterValueSet parameterValues, DataTypeDescriptor[] parameterTypes) throws StandardException

Sets the parameter values for this execution of the statement.

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.

Parameters
parameterValues:ParameterValueSet

The values of the parameters.

parameterTypes:DataTypeDescriptor[]

Their types

Exceptions
StandardException:
on error
setParentActivationback to summary
public void setParentActivation(Activation a)

This activation is created in a dynamic call context or a substatement execution context, chain its parent statements activation.

Parameters
a:Activation

The parent activation

setParentResultSetback to summary
public void setParentResultSet(TemporaryRowHolder rs, String resultSetId)
setResultSetHoldabilityback to summary
public void setResultSetHoldability(boolean resultSetHoldability)

Set current resultset holdability.

Parameters
resultSetHoldability:boolean

The new resultset holdability.

setSingleExecutionback to summary
public void setSingleExecution()

Set this Activation for a single execution. E.g. a java.sql.Statement execution.

setTargetVTIback to summary
public void setTargetVTI(ResultSet targetVTI)

Save the ResultSet for the target of an update/delete to a VTI.

Parameters
targetVTI:ResultSet

The result set which is the target of an updatable VTI

setupSQLSessionContextForChildrenback to summary
public 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).

Parameters
push:boolean

true if used to push a new connection context

Returns:SQLSessionContext

current SQL session context