Class MigratorConfiguration
- java.lang.Object
-
- com.alessiodp.core.common.storage.sql.migrator.MigratorConfiguration
-
public class MigratorConfiguration extends Object
-
-
Constructor Summary
Constructors Constructor Description MigratorConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Migratorload(ADPPlugin plugin, SQLDispatcher dispatcher)Load a new Migrator with this configurationMigratorConfigurationsetBackwardMigration(int backwardMigration)Set the backward migration table (-1 to disable)MigratorConfigurationsetConnectionFactory(ConnectionFactory connectionFactory)MigratorConfigurationsetLocation(String location)Set scripts locationMigratorConfigurationsetScripts(TreeSet<String> scripts)Set scripts listMigratorConfigurationsetStartMigration(int startMigration)Set the start migration tableMigratorConfigurationsetStorageType(StorageType storageType)Set the storage type
-
-
-
Method Detail
-
setConnectionFactory
public MigratorConfiguration setConnectionFactory(ConnectionFactory connectionFactory)
-
setLocation
public MigratorConfiguration setLocation(String location)
Set scripts location- Parameters:
location- the location to set- Returns:
- the class instance
-
setScripts
public MigratorConfiguration setScripts(TreeSet<String> scripts)
Set scripts list- Parameters:
scripts- the scripts to set- Returns:
- the class instance
-
setStorageType
public MigratorConfiguration setStorageType(StorageType storageType)
Set the storage type- Parameters:
storageType- the storage type to set- Returns:
- the class instance
-
setStartMigration
public MigratorConfiguration setStartMigration(int startMigration)
Set the start migration table- Parameters:
startMigration- the start migration table to set- Returns:
- the class instance
-
setBackwardMigration
public MigratorConfiguration setBackwardMigration(int backwardMigration)
Set the backward migration table (-1 to disable)- Parameters:
backwardMigration- the backward migration table to set- Returns:
- the class instance
-
load
public Migrator load(ADPPlugin plugin, SQLDispatcher dispatcher)
Load a new Migrator with this configuration- Parameters:
plugin- the plugin instancedispatcher- the SQL dispatcher- Returns:
- a new Migrator instance
-
-