Class DbSqlSession
java.lang.Object
org.camunda.bpm.engine.impl.db.AbstractPersistenceSession
org.camunda.bpm.engine.impl.db.sql.DbSqlSession
- All Implemented Interfaces:
PersistenceSession,Session
- Direct Known Subclasses:
BatchDbSqlSession,SimpleDbSqlSession
- Author:
- Tom Baeyens, Joram Barrez, Daniel Meyer, Sebastian Menski, Roman Smirnov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Stringprotected DbSqlSessionFactorystatic final String[]protected static final EnginePersistenceLoggerstatic final String[]protected org.apache.ibatis.session.SqlSessionFields inherited from class org.camunda.bpm.engine.impl.db.AbstractPersistenceSession
listeners -
Constructor Summary
ConstructorsConstructorDescriptionDbSqlSession(DbSqlSessionFactory dbSqlSessionFactory) DbSqlSession(DbSqlSessionFactory dbSqlSessionFactory, Connection connection, String catalog, String schema) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringaddSqlStatementPiece(String sqlStatement, String line) protected voidbulkDeletePerformed(DbBulkOperation operation, int rowsAffected, org.apache.ibatis.exceptions.PersistenceException failure) protected voidbulkOperationPerformed(DbBulkOperation operation, int rowsAffected, org.apache.ibatis.exceptions.PersistenceException failure) protected voidbulkUpdatePerformed(DbBulkOperation operation, int rowsAffected, org.apache.ibatis.exceptions.PersistenceException failure) voidclose()voidcommit()protected voidconfigureFailedDbEntityOperation(DbEntityOperation operation, org.apache.ibatis.exceptions.PersistenceException failure) voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidentityDeletePerformed(DbEntityOperation operation, int rowsAffected, org.apache.ibatis.exceptions.PersistenceException failure) protected voidentityInsertPerformed(DbEntityOperation operation, int rowsAffected, org.apache.ibatis.exceptions.PersistenceException failure) protected voidentityUpdatePerformed(DbEntityOperation operation, int rowsAffected, org.apache.ibatis.exceptions.PersistenceException failure) protected intexecuteDelete(String deleteStatement, Object parameter) protected voidexecuteInsertEntity(String insertStatement, Object parameter) voidexecuteMandatorySchemaResource(String operation, String component) intexecuteNonEmptyUpdateStmt(String updateStmt, Object parameter) voidexecuteSchemaResource(String schemaFileResourceName) voidexecuteSchemaResource(String operation, String component, String resourceName, boolean isOptional) protected abstract voidexecuteSelectForUpdate(String statement, Object parameter) executeSelectList(String statement, Object parameter) intexecuteUpdate(String updateStatement, Object parameter) voidflush()List<org.apache.ibatis.executor.BatchResult>voidprotected StringgetResourceForDbOperation(String directory, String operation, String component) org.apache.ibatis.session.SqlSessionprotected String[]protected voidinsertEntity(DbEntityOperation operation) booleanbooleanprotected booleanisConcurrentModificationException(DbOperation failedOperation, org.apache.ibatis.exceptions.PersistenceException cause) booleanbooleanbooleanbooleanbooleanprotected booleanbooleanisTablePresent(String tableName) voidprependDatabaseTablePrefix(String tableName) protected StringreadNextTrimmedLine(BufferedReader reader) voidrollback()<T extends DbEntity>
TselectById(Class<T> type, String id) List<?>selectList(String statement, Object parameter) intMethods inherited from class org.camunda.bpm.engine.impl.db.AbstractPersistenceSession
addEntityLoadListener, dbSchemaCreate, dbSchemaDrop, dbSchemaPrune, dbSchemaUpdate, deleteBulk, deleteEntity, executeDbOperation, fireEntityLoaded, updateBulk, updateEntityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.camunda.bpm.engine.impl.db.PersistenceSession
executeDbOperations
-
Field Details
-
LOG
-
JDBC_METADATA_TABLE_TYPES
-
PG_JDBC_METADATA_TABLE_TYPES
-
sqlSession
protected org.apache.ibatis.session.SqlSession sqlSession -
dbSqlSessionFactory
-
connectionMetadataDefaultCatalog
-
connectionMetadataDefaultSchema
-
-
Constructor Details
-
DbSqlSession
-
DbSqlSession
public DbSqlSession(DbSqlSessionFactory dbSqlSessionFactory, Connection connection, String catalog, String schema)
-
-
Method Details
-
selectList
-
executeSelectList
-
selectById
-
selectOne
-
lock
-
executeSelectForUpdate
-
entityUpdatePerformed
protected void entityUpdatePerformed(DbEntityOperation operation, int rowsAffected, org.apache.ibatis.exceptions.PersistenceException failure) -
bulkUpdatePerformed
protected void bulkUpdatePerformed(DbBulkOperation operation, int rowsAffected, org.apache.ibatis.exceptions.PersistenceException failure) -
bulkDeletePerformed
protected void bulkDeletePerformed(DbBulkOperation operation, int rowsAffected, org.apache.ibatis.exceptions.PersistenceException failure) -
bulkOperationPerformed
protected void bulkOperationPerformed(DbBulkOperation operation, int rowsAffected, org.apache.ibatis.exceptions.PersistenceException failure) -
entityDeletePerformed
protected void entityDeletePerformed(DbEntityOperation operation, int rowsAffected, org.apache.ibatis.exceptions.PersistenceException failure) -
configureFailedDbEntityOperation
protected void configureFailedDbEntityOperation(DbEntityOperation operation, org.apache.ibatis.exceptions.PersistenceException failure) -
isConcurrentModificationException
protected boolean isConcurrentModificationException(DbOperation failedOperation, org.apache.ibatis.exceptions.PersistenceException cause) -
insertEntity
- Specified by:
insertEntityin classAbstractPersistenceSession
-
executeInsertEntity
-
entityInsertPerformed
protected void entityInsertPerformed(DbEntityOperation operation, int rowsAffected, org.apache.ibatis.exceptions.PersistenceException failure) -
executeDelete
-
executeUpdate
-
update
-
executeNonEmptyUpdateStmt
-
flush
public void flush() -
flushOperations
public void flushOperations() -
flushBatchOperations
-
close
public void close() -
commit
public void commit() -
rollback
public void rollback() -
dbSchemaCheckVersion
public void dbSchemaCheckVersion() -
getDbVersion
- Specified by:
getDbVersionin classAbstractPersistenceSession
-
dbSchemaCreateIdentity
protected void dbSchemaCreateIdentity()- Specified by:
dbSchemaCreateIdentityin classAbstractPersistenceSession
-
dbSchemaCreateHistory
protected void dbSchemaCreateHistory()- Specified by:
dbSchemaCreateHistoryin classAbstractPersistenceSession
-
dbSchemaCreateEngine
protected void dbSchemaCreateEngine()- Specified by:
dbSchemaCreateEnginein classAbstractPersistenceSession
-
dbSchemaCreateCmmn
protected void dbSchemaCreateCmmn()- Specified by:
dbSchemaCreateCmmnin classAbstractPersistenceSession
-
dbSchemaCreateCmmnHistory
protected void dbSchemaCreateCmmnHistory()- Specified by:
dbSchemaCreateCmmnHistoryin classAbstractPersistenceSession
-
dbSchemaCreateDmn
protected void dbSchemaCreateDmn()- Specified by:
dbSchemaCreateDmnin classAbstractPersistenceSession
-
dbSchemaCreateDmnHistory
protected void dbSchemaCreateDmnHistory()- Specified by:
dbSchemaCreateDmnHistoryin classAbstractPersistenceSession
-
dbSchemaDropIdentity
protected void dbSchemaDropIdentity()- Specified by:
dbSchemaDropIdentityin classAbstractPersistenceSession
-
dbSchemaDropHistory
protected void dbSchemaDropHistory()- Specified by:
dbSchemaDropHistoryin classAbstractPersistenceSession
-
dbSchemaDropEngine
protected void dbSchemaDropEngine()- Specified by:
dbSchemaDropEnginein classAbstractPersistenceSession
-
dbSchemaDropCmmn
protected void dbSchemaDropCmmn()- Specified by:
dbSchemaDropCmmnin classAbstractPersistenceSession
-
dbSchemaDropCmmnHistory
protected void dbSchemaDropCmmnHistory()- Specified by:
dbSchemaDropCmmnHistoryin classAbstractPersistenceSession
-
dbSchemaDropDmn
protected void dbSchemaDropDmn()- Specified by:
dbSchemaDropDmnin classAbstractPersistenceSession
-
dbSchemaDropDmnHistory
protected void dbSchemaDropDmnHistory()- Specified by:
dbSchemaDropDmnHistoryin classAbstractPersistenceSession
-
executeMandatorySchemaResource
-
isEngineTablePresent
public boolean isEngineTablePresent()- Specified by:
isEngineTablePresentin classAbstractPersistenceSession
-
isHistoryTablePresent
public boolean isHistoryTablePresent()- Specified by:
isHistoryTablePresentin classAbstractPersistenceSession
-
isIdentityTablePresent
public boolean isIdentityTablePresent()- Specified by:
isIdentityTablePresentin classAbstractPersistenceSession
-
isCmmnTablePresent
public boolean isCmmnTablePresent()- Specified by:
isCmmnTablePresentin classAbstractPersistenceSession
-
isCmmnHistoryTablePresent
public boolean isCmmnHistoryTablePresent()- Specified by:
isCmmnHistoryTablePresentin classAbstractPersistenceSession
-
isDmnTablePresent
public boolean isDmnTablePresent()- Specified by:
isDmnTablePresentin classAbstractPersistenceSession
-
isDmnHistoryTablePresent
public boolean isDmnHistoryTablePresent()- Specified by:
isDmnHistoryTablePresentin classAbstractPersistenceSession
-
isTablePresent
-
getTableNamesPresent
- Specified by:
getTableNamesPresentin interfacePersistenceSession- Overrides:
getTableNamesPresentin classAbstractPersistenceSession
-
getTablesPresentInOracleDatabase
- Throws:
SQLException
-
prependDatabaseTablePrefix
-
getResourceForDbOperation
-
executeSchemaResource
-
executeSchemaResource
-
addSqlStatementPiece
-
readNextTrimmedLine
- Throws:
IOException
-
isMissingTablesException
-
getTableTypes
-
getSqlSession
public org.apache.ibatis.session.SqlSession getSqlSession() -
getDbSqlSessionFactory
-