public abstract class DbSqlSession extends AbstractPersistenceSession
| Modifier and Type | Field and Description |
|---|---|
protected String |
connectionMetadataDefaultCatalog |
protected String |
connectionMetadataDefaultSchema |
protected DbSqlSessionFactory |
dbSqlSessionFactory |
static String[] |
JDBC_METADATA_TABLE_TYPES |
protected static EnginePersistenceLogger |
LOG |
static String[] |
PG_JDBC_METADATA_TABLE_TYPES |
protected org.apache.ibatis.session.SqlSession |
sqlSession |
listeners| Constructor and Description |
|---|
DbSqlSession(DbSqlSessionFactory dbSqlSessionFactory) |
DbSqlSession(DbSqlSessionFactory dbSqlSessionFactory,
Connection connection,
String catalog,
String schema) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
addSqlStatementPiece(String sqlStatement,
String line) |
protected void |
bulkDeletePerformed(DbBulkOperation operation,
int rowsAffected,
Exception failure) |
protected void |
bulkOperationPerformed(DbBulkOperation operation,
int rowsAffected,
Exception failure) |
protected void |
bulkUpdatePerformed(DbBulkOperation operation,
int rowsAffected,
Exception failure) |
void |
close() |
void |
commit() |
protected void |
configureFailedDbEntityOperation(DbEntityOperation operation,
Exception failure) |
void |
dbSchemaCheckVersion() |
protected void |
dbSchemaCreateCmmn() |
protected void |
dbSchemaCreateCmmnHistory() |
protected void |
dbSchemaCreateDmn() |
protected void |
dbSchemaCreateDmnHistory() |
protected void |
dbSchemaCreateEngine() |
protected void |
dbSchemaCreateHistory() |
protected void |
dbSchemaCreateIdentity() |
protected void |
dbSchemaDropCmmn() |
protected void |
dbSchemaDropCmmnHistory() |
protected void |
dbSchemaDropDmn() |
protected void |
dbSchemaDropDmnHistory() |
protected void |
dbSchemaDropEngine() |
protected void |
dbSchemaDropHistory() |
protected void |
dbSchemaDropIdentity() |
protected void |
entityDeletePerformed(DbEntityOperation operation,
int rowsAffected,
Exception failure) |
protected void |
entityInsertPerformed(DbEntityOperation operation,
int rowsAffected,
Exception failure) |
protected void |
entityUpdatePerformed(DbEntityOperation operation,
int rowsAffected,
Exception failure) |
protected int |
executeDelete(String deleteStatement,
Object parameter) |
protected void |
executeInsertEntity(String insertStatement,
Object parameter) |
void |
executeMandatorySchemaResource(String operation,
String component) |
int |
executeNonEmptyUpdateStmt(String updateStmt,
Object parameter) |
void |
executeSchemaResource(String schemaFileResourceName) |
void |
executeSchemaResource(String operation,
String component,
String resourceName,
boolean isOptional) |
protected abstract void |
executeSelectForUpdate(String statement,
Object parameter) |
List<Object> |
executeSelectList(String statement,
Object parameter) |
int |
executeUpdate(String updateStatement,
Object parameter) |
void |
flush() |
List<org.apache.ibatis.executor.BatchResult> |
flushBatchOperations() |
void |
flushOperations() |
DbSqlSessionFactory |
getDbSqlSessionFactory() |
protected String |
getDbVersion() |
String |
getResourceForDbOperation(String directory,
String operation,
String component) |
org.apache.ibatis.session.SqlSession |
getSqlSession() |
List<String> |
getTableNamesPresent() |
protected List<String> |
getTablesPresentInOracleDatabase() |
protected String[] |
getTableTypes() |
protected void |
insertEntity(DbEntityOperation operation) |
boolean |
isCmmnHistoryTablePresent() |
boolean |
isCmmnTablePresent() |
protected boolean |
isConcurrentModificationException(DbOperation failedOperation,
Exception cause) |
static boolean |
isCrdbConcurrencyConflict(Throwable cause)
In cases where CockroachDB is used, and a failed operation is detected,
the method checks if the exception was caused by a CockroachDB
TransactionRetryException. |
static boolean |
isCrdbConcurrencyConflictOnCommit(Throwable cause,
ProcessEngineConfigurationImpl configuration)
In cases where CockroachDB is used, and a failed operation is detected,
the method checks if the exception was caused by a CockroachDB
TransactionRetryException. |
boolean |
isDmnHistoryTablePresent() |
boolean |
isDmnTablePresent() |
boolean |
isEngineTablePresent() |
boolean |
isHistoryTablePresent() |
boolean |
isIdentityTablePresent() |
protected boolean |
isMissingTablesException(Exception e) |
boolean |
isTablePresent(String tableName) |
void |
lock(String statement,
Object parameter) |
String |
prependDatabaseTablePrefix(String tableName) |
protected String |
readNextTrimmedLine(BufferedReader reader) |
void |
rollback() |
<T extends DbEntity> |
selectById(Class<T> type,
String id) |
List<?> |
selectList(String statement,
Object parameter) |
Object |
selectOne(String statement,
Object parameter) |
int |
update(String updateStatement,
Object parameter) |
addEntityLoadListener, dbSchemaCreate, dbSchemaDrop, dbSchemaPrune, dbSchemaUpdate, deleteBulk, deleteEntity, executeDbOperation, fireEntityLoaded, updateBulk, updateEntityclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteDbOperationsprotected static final EnginePersistenceLogger LOG
public static final String[] JDBC_METADATA_TABLE_TYPES
public static final String[] PG_JDBC_METADATA_TABLE_TYPES
protected org.apache.ibatis.session.SqlSession sqlSession
protected DbSqlSessionFactory dbSqlSessionFactory
protected String connectionMetadataDefaultCatalog
protected String connectionMetadataDefaultSchema
public DbSqlSession(DbSqlSessionFactory dbSqlSessionFactory)
public DbSqlSession(DbSqlSessionFactory dbSqlSessionFactory, Connection connection, String catalog, String schema)
protected abstract void executeSelectForUpdate(String statement, Object parameter)
protected void entityUpdatePerformed(DbEntityOperation operation, int rowsAffected, Exception failure)
protected void bulkUpdatePerformed(DbBulkOperation operation, int rowsAffected, Exception failure)
protected void bulkDeletePerformed(DbBulkOperation operation, int rowsAffected, Exception failure)
protected void bulkOperationPerformed(DbBulkOperation operation, int rowsAffected, Exception failure)
protected void entityDeletePerformed(DbEntityOperation operation, int rowsAffected, Exception failure)
protected void configureFailedDbEntityOperation(DbEntityOperation operation, Exception failure)
protected boolean isConcurrentModificationException(DbOperation failedOperation, Exception cause)
public static boolean isCrdbConcurrencyConflict(Throwable cause)
TransactionRetryException.cause - for which an operation failedTransactionRetryException.
Otherwise, it's false.public static boolean isCrdbConcurrencyConflictOnCommit(Throwable cause, ProcessEngineConfigurationImpl configuration)
TransactionRetryException. This method may be used when a
CRDB Error occurs on commit, and a Command Context is not available, as
it has already been closed. This is the case with Spring/JTA transaction
interceptors.cause - for which an operation failedconfiguration - of the Process EngineTransactionRetryException.
Otherwise, it's false.protected void insertEntity(DbEntityOperation operation)
insertEntity in class AbstractPersistenceSessionprotected void entityInsertPerformed(DbEntityOperation operation, int rowsAffected, Exception failure)
public void flush()
public void flushOperations()
public List<org.apache.ibatis.executor.BatchResult> flushBatchOperations()
public void close()
public void commit()
public void rollback()
public void dbSchemaCheckVersion()
protected String getDbVersion()
getDbVersion in class AbstractPersistenceSessionprotected void dbSchemaCreateIdentity()
dbSchemaCreateIdentity in class AbstractPersistenceSessionprotected void dbSchemaCreateHistory()
dbSchemaCreateHistory in class AbstractPersistenceSessionprotected void dbSchemaCreateEngine()
dbSchemaCreateEngine in class AbstractPersistenceSessionprotected void dbSchemaCreateCmmn()
dbSchemaCreateCmmn in class AbstractPersistenceSessionprotected void dbSchemaCreateCmmnHistory()
dbSchemaCreateCmmnHistory in class AbstractPersistenceSessionprotected void dbSchemaCreateDmn()
dbSchemaCreateDmn in class AbstractPersistenceSessionprotected void dbSchemaCreateDmnHistory()
dbSchemaCreateDmnHistory in class AbstractPersistenceSessionprotected void dbSchemaDropIdentity()
dbSchemaDropIdentity in class AbstractPersistenceSessionprotected void dbSchemaDropHistory()
dbSchemaDropHistory in class AbstractPersistenceSessionprotected void dbSchemaDropEngine()
dbSchemaDropEngine in class AbstractPersistenceSessionprotected void dbSchemaDropCmmn()
dbSchemaDropCmmn in class AbstractPersistenceSessionprotected void dbSchemaDropCmmnHistory()
dbSchemaDropCmmnHistory in class AbstractPersistenceSessionprotected void dbSchemaDropDmn()
dbSchemaDropDmn in class AbstractPersistenceSessionprotected void dbSchemaDropDmnHistory()
dbSchemaDropDmnHistory in class AbstractPersistenceSessionpublic void executeMandatorySchemaResource(String operation, String component)
public boolean isEngineTablePresent()
isEngineTablePresent in class AbstractPersistenceSessionpublic boolean isHistoryTablePresent()
isHistoryTablePresent in class AbstractPersistenceSessionpublic boolean isIdentityTablePresent()
isIdentityTablePresent in class AbstractPersistenceSessionpublic boolean isCmmnTablePresent()
isCmmnTablePresent in class AbstractPersistenceSessionpublic boolean isCmmnHistoryTablePresent()
isCmmnHistoryTablePresent in class AbstractPersistenceSessionpublic boolean isDmnTablePresent()
isDmnTablePresent in class AbstractPersistenceSessionpublic boolean isDmnHistoryTablePresent()
isDmnHistoryTablePresent in class AbstractPersistenceSessionpublic boolean isTablePresent(String tableName)
public List<String> getTableNamesPresent()
getTableNamesPresent in interface PersistenceSessiongetTableNamesPresent in class AbstractPersistenceSessionprotected List<String> getTablesPresentInOracleDatabase() throws SQLException
SQLExceptionpublic String getResourceForDbOperation(String directory, String operation, String component)
public void executeSchemaResource(String operation, String component, String resourceName, boolean isOptional)
public void executeSchemaResource(String schemaFileResourceName)
protected String readNextTrimmedLine(BufferedReader reader) throws IOException
IOExceptionprotected boolean isMissingTablesException(Exception e)
protected String[] getTableTypes()
public org.apache.ibatis.session.SqlSession getSqlSession()
public DbSqlSessionFactory getDbSqlSessionFactory()
Copyright © 2022. All rights reserved.