|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.iplanet.jato.model.ModelExecutionContextBase | +--com.iplanet.jato.model.DatasetModelExecutionContextImpl | +--com.iplanet.jato.model.sql.DatasetSQLModelExecutionContext
An execution context used to execute dataset operations on QueryModels
(normally SQL SELECT operations). Developers can specify both the
dataset offset and size, as well as a JDBC connection or statement object,
to be used during execution of the model.
By providing a connection or statement object to the model via this context, developers can maintain control of the transaction state of the connection instead of relying on the default behavior (which is generally equivalent to auto-commit semantics). However, such use also introduces a measure of responsibilty on the developer--because providing these objects to the model manually causes the model to avoid any connection lifecycle management of its own, the developer is completely responsible for managing the lifecycle of the connection, as well as the lifecycle of any transactions that might be pending on that connection.
In general, if the developer supplies a connection object, he or she need not also supply a statement object. Conversely, if the developer supplies a statement object, he or she need not specify a connection object (though he will need to keep a reference to the connection object used to create the statement in order to close it after execution is complete). In both cases, the developer is ultimately responsible for releasing the connection manually when use of it is complete.
Fields inherited from interface com.iplanet.jato.model.ModelExecutionContext |
OPERATION_DELETE, OPERATION_EXECUTE, OPERATION_INSERT, OPERATION_RETRIEVE, OPERATION_UPDATE |
Fields inherited from interface com.iplanet.jato.model.DatasetModelExecutionContext |
DATASET_OFFSET_BEGINNING, DATASET_OFFSET_END, DATASET_SIZE_ALL_INCREMENTAL, DATASET_SIZE_ALL_PREFETCH |
Constructor Summary | |
DatasetSQLModelExecutionContext()
Default constructor The operation name is implicitly set to
ModelExecutionContext.OPERATION_RETRIEVE . |
|
DatasetSQLModelExecutionContext(java.sql.Connection connection)
Constructs an instance using the specified connection object The operation name is implicitly set to
ModelExecutionContext.OPERATION_RETRIEVE . |
|
DatasetSQLModelExecutionContext(java.sql.Connection connection,
int datasetOffset,
int datasetSize)
Constructs an instance using the specified connection object, dataset offset and size |
|
DatasetSQLModelExecutionContext(int datasetOffset,
int datasetSize)
Constructs an instance using the specified dataset offset and size |
|
DatasetSQLModelExecutionContext(java.sql.Statement statement)
Constructs an instance using the specified statement object The operation name is implicitly set to
ModelExecutionContext.OPERATION_RETRIEVE . |
|
DatasetSQLModelExecutionContext(java.sql.Statement statement,
int datasetOffset,
int datasetSize)
Constructs an instance using the specified statement object, dataset offset and size |
Method Summary | |
java.sql.Connection |
getConnection()
Returns the JDBC connection object that should be used for execution. |
java.sql.Statement |
getStatement()
Returns the JDBC statement object that should be used for execution. |
void |
setConnection(java.sql.Connection value)
Sets the connection object to be used during execution. |
void |
setStatement(java.sql.Statement value)
Sets the statement object to be used during execution. |
Methods inherited from class com.iplanet.jato.model.DatasetModelExecutionContextImpl |
getDatasetOffset, getDatasetSize, setDatasetOffset, setDatasetSize |
Methods inherited from class com.iplanet.jato.model.ModelExecutionContextBase |
getOperationName, setOperationName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.iplanet.jato.model.ModelExecutionContext |
getOperationName |
Constructor Detail |
public DatasetSQLModelExecutionContext()
ModelExecutionContext.OPERATION_RETRIEVE
.
The dataset offset is implicitly set to
DatasetModelExecutionContext.DATASET_OFFSET_BEGINNING
.
The dataset size is implicitly set to
DatasetModelExecutionContext.DATASET_SIZE_ALL_INCREMENTAL
.public DatasetSQLModelExecutionContext(int datasetOffset, int datasetSize)
public DatasetSQLModelExecutionContext(java.sql.Connection connection)
ModelExecutionContext.OPERATION_RETRIEVE
.
The dataset offset is implicitly set to
DatasetModelExecutionContext.DATASET_OFFSET_BEGINNING
.
The dataset size is implicitly set to
DatasetModelExecutionContext.DATASET_SIZE_ALL_INCREMENTAL
.public DatasetSQLModelExecutionContext(java.sql.Connection connection, int datasetOffset, int datasetSize)
public DatasetSQLModelExecutionContext(java.sql.Statement statement)
ModelExecutionContext.OPERATION_RETRIEVE
.
The dataset offset is implicitly set to
DatasetModelExecutionContext.DATASET_OFFSET_BEGINNING
.
The dataset size is implicitly set to
DatasetModelExecutionContext.DATASET_SIZE_ALL_INCREMENTAL
.public DatasetSQLModelExecutionContext(java.sql.Statement statement, int datasetOffset, int datasetSize)
Method Detail |
public java.sql.Connection getConnection()
SQLModelExecutionContext
getConnection
in interface SQLModelExecutionContext
public void setConnection(java.sql.Connection value)
public java.sql.Statement getStatement()
SQLModelExecutionContext
getStatement
in interface SQLModelExecutionContext
public void setStatement(java.sql.Statement value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |