Class TxDbUpdateManager<T>

java.lang.Object
de.aristaflow.adept2.base.dbaccess.updatemanager.DbUpdateManager
de.aristaflow.adept2.core.transactionmanager.TxDbUpdateManager<T>
Type Parameters:
T - The type of objects for which transactions are registered.

public class TxDbUpdateManager<T> extends de.aristaflow.adept2.base.dbaccess.updatemanager.DbUpdateManager
Simple (transient) manager for the definition and execution of updates to the database schema.
Author:
Patrick Schmidt, Ulrich Kreher
  • Nested Class Summary

    Nested classes/interfaces inherited from class de.aristaflow.adept2.base.dbaccess.updatemanager.DbUpdateManager

    de.aristaflow.adept2.base.dbaccess.updatemanager.DbUpdateManager.Update
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final TxManager<T>
    The transaction manager which is used to commit transactions.

    Fields inherited from class de.aristaflow.adept2.base.dbaccess.updatemanager.DbUpdateManager

    latestVersion, logger, serviceName, updates
  • Constructor Summary

    Constructors
    Constructor
    Description
    TxDbUpdateManager(Class<?> serviceInterface, TxManager<T> txManager, LogService logService)
    Constructs a new DbSchemaUpdateManager.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Performs all available updates from the current version the latest version.

    Methods inherited from class de.aristaflow.adept2.base.dbaccess.updatemanager.DbUpdateManager

    getLatestVersion, performUpdates, registerUpdate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • txManager

      protected final TxManager<T> txManager
      The transaction manager which is used to commit transactions.
  • Constructor Details

    • TxDbUpdateManager

      public TxDbUpdateManager(Class<?> serviceInterface, TxManager<T> txManager, LogService logService)
      Constructs a new DbSchemaUpdateManager.
      Parameters:
      serviceInterface - The name of this class Class.getSimpleName() will be used as service name.
      txManager - The transaction manager which is used to commit transactions.
      logService - The log service to retrieve the logger for the DB updates.
  • Method Details

    • performUpdates

      public void performUpdates(T o, ExtendedConnection con) throws de.aristaflow.adept2.base.dbaccess.updatemanager.UpdateException
      Performs all available updates from the current version the latest version.
      Parameters:
      o - The object for which the designated connection has been retrieved from our TxManager.
      con - The connection to use for performing the updates. This has to be a connection retrieved from our TxManager.
      Throws:
      de.aristaflow.adept2.base.dbaccess.updatemanager.UpdateException - if the update fails