Interface PersistenceSession

All Superinterfaces:
All Known Implementing Classes:
AbstractPersistenceSession, BatchDbSqlSession, DbSqlSession, SimpleDbSqlSession

public interface PersistenceSession extends Session
Daniel Meyer
  • Method Details

    • executeDbOperations

      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:

      In addition, the number of affected rows and failure (if any) is updated in the operation.
      Exception - in case of an unexpected error that is unrelated to an operation result. The caller should rollback the transaction in this case
    • flushOperations

      void flushOperations()
    • selectList

      List<?> selectList(String statement, Object parameter)
    • selectById

      <T extends DbEntity> T selectById(Class<T> type, String id)
    • selectOne

      Object selectOne(String statement, Object parameter)
    • lock

      void lock(String statement, Object parameter)
    • executeNonEmptyUpdateStmt

      int executeNonEmptyUpdateStmt(String updateStmt, Object parameter)
    • commit

      void commit()
    • rollback

      void rollback()
    • dbSchemaCheckVersion

      void dbSchemaCheckVersion()
    • dbSchemaCreate

      void dbSchemaCreate()
    • dbSchemaDrop

      void dbSchemaDrop()
    • dbSchemaPrune

      void dbSchemaPrune()
    • dbSchemaUpdate

      void dbSchemaUpdate()
    • getTableNamesPresent

      List<String> getTableNamesPresent()
    • addEntityLoadListener

      void addEntityLoadListener(EntityLoadListener listener)