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
FieldsModifier and TypeFieldDescriptionThe 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
ConstructorsConstructorDescriptionTxDbUpdateManager(Class<?> serviceInterface, TxManager<T> txManager, LogService logService) Constructs a newDbSchemaUpdateManager. -
Method Summary
Modifier and TypeMethodDescriptionvoidperformUpdates(T o, ExtendedConnection con) Performs all available updates from the current version thelatest version.Methods inherited from class de.aristaflow.adept2.base.dbaccess.updatemanager.DbUpdateManager
getLatestVersion, performUpdates, registerUpdate
-
Field Details
-
txManager
The transaction manager which is used to commit transactions.
-
-
Constructor Details
-
TxDbUpdateManager
Constructs a newDbSchemaUpdateManager.- Parameters:
serviceInterface- The name of this classClass.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 thelatest version.- Parameters:
o- The object for which the designated connection has been retrieved from ourTxManager.con- The connection to use for performing the updates. This has to be a connection retrieved from ourTxManager.- Throws:
de.aristaflow.adept2.base.dbaccess.updatemanager.UpdateException- if the update fails
-