public interface PersistenceSession extends Session
Modifier and Type | Method and Description |
---|---|
void |
addEntityLoadListener(EntityLoadListener listener) |
void |
commit() |
void |
dbSchemaCheckVersion() |
void |
dbSchemaCreate() |
void |
dbSchemaDrop() |
void |
dbSchemaPrune() |
void |
dbSchemaUpdate() |
FlushResult |
executeDbOperations(List<DbOperation> operations)
Attempts to perform the operations in order and returns a flush result.
|
int |
executeNonEmptyUpdateStmt(String updateStmt,
Object parameter) |
void |
flushOperations() |
List<String> |
getTableNamesPresent() |
void |
lock(String statement,
Object parameter) |
void |
rollback() |
<T extends DbEntity> |
selectById(Class<T> type,
String id) |
List<?> |
selectList(String statement,
Object parameter) |
Object |
selectOne(String statement,
Object parameter) |
FlushResult executeDbOperations(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 (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
Exception
- in case of an unexpected error that is unrelated to an operation result.
The caller should rollback the transaction in this casevoid flushOperations()
void commit()
void rollback()
void dbSchemaCheckVersion()
void dbSchemaCreate()
void dbSchemaDrop()
void dbSchemaPrune()
void dbSchemaUpdate()
void addEntityLoadListener(EntityLoadListener listener)
Copyright © 2022. All rights reserved.