Class 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 TxManager<T> txManager
      The transaction manager which is used to commit transactions.
      • Fields inherited from class de.aristaflow.adept2.base.dbaccess.updatemanager.DbUpdateManager

        latestVersion, logger, serviceName, updates
    • Field Detail

      • txManager

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

      • 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 Detail

      • 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