Class ExplicitMigrater
- java.lang.Object
-
- software.xdev.micromigration.migrater.AbstractMigrater
-
- software.xdev.micromigration.migrater.ExplicitMigrater
-
- All Implemented Interfaces:
MicroMigrater
public class ExplicitMigrater extends AbstractMigrater
Contains all the available scripts to migrate the datastore to a certain version.This class needs explicit scripts which are then included in the migration process.
- Author:
- Johannes Rabauer
-
-
Constructor Summary
Constructors Constructor Description ExplicitMigrater(MigrationScript<?,?>... scripts)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.TreeSet<MigrationScript<?,?>>
getSortedScripts()
-
Methods inherited from class software.xdev.micromigration.migrater.AbstractMigrater
checkIfVersionIsAlreadyRegistered, migrateToNewest, migrateToVersion, setNotificationConsumer
-
-
-
-
Constructor Detail
-
ExplicitMigrater
public ExplicitMigrater(MigrationScript<?,?>... scripts) throws VersionAlreadyRegisteredException
- Parameters:
scripts
- are all the scripts that are executed, if the current version is lower than this of the script
Versions of the scripts must be unique. That means that no version is allowed multiple times in the migrater.- Throws:
VersionAlreadyRegisteredException
-
-
Method Detail
-
getSortedScripts
public java.util.TreeSet<MigrationScript<?,?>> getSortedScripts()
- Returns:
- all the contained
MigrationScript
s, sorted by theirMigrationVersion
ascending.
-
-