Package org.camunda.bpm.engine.impl.db
Interface PersistenceSession
-
- All Superinterfaces:
Session
- All Known Implementing Classes:
AbstractPersistenceSession
,BatchDbSqlSession
,DbSqlSession
,SimpleDbSqlSession
public interface PersistenceSession extends Session
- Author:
- Daniel Meyer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addEntityLoadListener(EntityLoadListener listener)
void
commit()
void
dbSchemaCheckVersion()
void
dbSchemaCreate()
void
dbSchemaDrop()
void
dbSchemaPrune()
void
dbSchemaUpdate()
FlushResult
executeDbOperations(java.util.List<DbOperation> operations)
Attempts to perform the operations in order and returns a flush result.int
executeNonEmptyUpdateStmt(java.lang.String updateStmt, java.lang.Object parameter)
void
flushOperations()
java.util.List<java.lang.String>
getTableNamesPresent()
void
lock(java.lang.String statement, java.lang.Object parameter)
void
rollback()
<T extends DbEntity>
TselectById(java.lang.Class<T> type, java.lang.String id)
java.util.List<?>
selectList(java.lang.String statement, java.lang.Object parameter)
java.lang.Object
selectOne(java.lang.String statement, java.lang.Object parameter)
-
-
-
Method Detail
-
executeDbOperations
FlushResult executeDbOperations(java.util.List<DbOperation> operations)
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 (viaFlushResult.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:- Successful operations:
DbOperation.State.APPLIED
- Failed operations:
DbOperation.State.FAILED_ERROR
orDbOperation.State.FAILED_CONCURRENT_MODIFICATION
. - Remaining operations:
DbOperation.State.NOT_APPLIED
- Throws:
java.lang.Exception
- in case of an unexpected error that is unrelated to an operation result. The caller should rollback the transaction in this case
- Successful operations:
-
flushOperations
void flushOperations()
-
selectList
java.util.List<?> selectList(java.lang.String statement, java.lang.Object parameter)
-
selectById
<T extends DbEntity> T selectById(java.lang.Class<T> type, java.lang.String id)
-
selectOne
java.lang.Object selectOne(java.lang.String statement, java.lang.Object parameter)
-
lock
void lock(java.lang.String statement, java.lang.Object parameter)
-
executeNonEmptyUpdateStmt
int executeNonEmptyUpdateStmt(java.lang.String updateStmt, java.lang.Object parameter)
-
commit
void commit()
-
rollback
void rollback()
-
dbSchemaCheckVersion
void dbSchemaCheckVersion()
-
dbSchemaCreate
void dbSchemaCreate()
-
dbSchemaDrop
void dbSchemaDrop()
-
dbSchemaPrune
void dbSchemaPrune()
-
dbSchemaUpdate
void dbSchemaUpdate()
-
getTableNamesPresent
java.util.List<java.lang.String> getTableNamesPresent()
-
addEntityLoadListener
void addEntityLoadListener(EntityLoadListener listener)
-
-