public class BatchDbSqlSession extends DbSqlSession
ExecutorType.BATCH
connectionMetadataDefaultCatalog, connectionMetadataDefaultSchema, dbSqlSessionFactory, JDBC_METADATA_TABLE_TYPES, LOG, sqlSession
listeners
Constructor and Description |
---|
BatchDbSqlSession(DbSqlSessionFactory dbSqlSessionFactory) |
BatchDbSqlSession(DbSqlSessionFactory dbSqlSessionFactory,
Connection connection,
String catalog,
String schema) |
Modifier and Type | Method and Description |
---|---|
protected void |
deleteBulk(DbBulkOperation operation) |
protected void |
deleteEntity(DbEntityOperation operation) |
FlushResult |
executeDbOperations(List<DbOperation> operations)
Attempts to perform the operations in order and returns a flush result.
|
protected void |
executeSelectForUpdate(String statement,
Object parameter) |
protected FlushResult |
postProcessBatchFailure(List<DbOperation> operations,
RuntimeException e) |
protected FlushResult |
postProcessBatchSuccess(List<DbOperation> operations,
List<org.apache.ibatis.executor.BatchResult> batchResults) |
protected void |
postProcessJdbcBatchResult(Iterator<DbOperation> operationsIt,
int[] statementResults,
Exception failure,
List<DbOperation> failedOperations)
This method can be called with three cases:
Case 1: Success.
|
protected void |
postProcessOperationPerformed(DbOperation operation,
int rowsAffected,
Exception failure) |
protected void |
updateBulk(DbBulkOperation operation) |
protected void |
updateEntity(DbEntityOperation operation) |
addSqlStatementPiece, bulkDeletePerformed, bulkOperationPerformed, bulkUpdatePerformed, close, commit, dbSchemaCheckVersion, dbSchemaCreateCmmn, dbSchemaCreateCmmnHistory, dbSchemaCreateDmn, dbSchemaCreateDmnHistory, dbSchemaCreateEngine, dbSchemaCreateHistory, dbSchemaCreateIdentity, dbSchemaDropCmmn, dbSchemaDropCmmnHistory, dbSchemaDropDmn, dbSchemaDropDmnHistory, dbSchemaDropEngine, dbSchemaDropHistory, dbSchemaDropIdentity, entityDeletePerformed, entityInsertPerformed, entityUpdatePerformed, executeDelete, executeInsertEntity, executeMandatorySchemaResource, executeNonEmptyUpdateStmt, executeSchemaResource, executeSchemaResource, executeUpdate, flush, flushBatchOperations, flushOperations, getDbSqlSessionFactory, getDbVersion, getResourceForDbOperation, getSqlSession, getTableNamesPresent, getTablesPresentInOracleDatabase, insertEntity, isCmmnHistoryTablePresent, isCmmnTablePresent, isConcurrentModificationException, isDmnHistoryTablePresent, isDmnTablePresent, isEngineTablePresent, isHistoryTablePresent, isIdentityTablePresent, isMissingTablesException, isTablePresent, lock, prependDatabaseTablePrefix, readNextTrimmedLine, rollback, selectById, selectList, selectOne
addEntityLoadListener, dbSchemaCreate, dbSchemaDrop, dbSchemaPrune, dbSchemaUpdate, executeDbOperation, fireEntityLoaded
public BatchDbSqlSession(DbSqlSessionFactory dbSqlSessionFactory)
public BatchDbSqlSession(DbSqlSessionFactory dbSqlSessionFactory, Connection connection, String catalog, String schema)
public FlushResult executeDbOperations(List<DbOperation> operations)
PersistenceSession
Attempts to perform the operations in order and returns a flush result.
The result indicates if there are operations that were not successful (via FlushResult.getFailedOperations()
and if some operations were not executed (via FlushResult.getRemainingOperations()
.
The remaining operations must be a suffix of the parameter (e.g. for operations [a, b, c, d],
[c, d] is a valid list of remaining operations, [b, c] is not).
This method modifies the operation's state, i.e. DbOperation.getState()
will
be updated by calling this method:
DbOperation.State.APPLIED
DbOperation.State.FAILED_ERROR
or DbOperation.State.FAILED_CONCURRENT_MODIFICATION
.
DbOperation.State.NOT_APPLIED
protected FlushResult postProcessBatchSuccess(List<DbOperation> operations, List<org.apache.ibatis.executor.BatchResult> batchResults)
protected FlushResult postProcessBatchFailure(List<DbOperation> operations, RuntimeException e)
protected void postProcessJdbcBatchResult(Iterator<DbOperation> operationsIt, int[] statementResults, Exception failure, List<DbOperation> failedOperations)
This method can be called with three cases:
See BatchUpdateException.getUpdateCounts()
for the specification
of cases 2 and 3.
protected void postProcessOperationPerformed(DbOperation operation, int rowsAffected, Exception failure)
protected void updateEntity(DbEntityOperation operation)
updateEntity
in class AbstractPersistenceSession
protected void updateBulk(DbBulkOperation operation)
updateBulk
in class AbstractPersistenceSession
protected void deleteBulk(DbBulkOperation operation)
deleteBulk
in class AbstractPersistenceSession
protected void deleteEntity(DbEntityOperation operation)
deleteEntity
in class AbstractPersistenceSession
protected void executeSelectForUpdate(String statement, Object parameter)
executeSelectForUpdate
in class DbSqlSession
Copyright © 2020. All rights reserved.