public class TopiaMigrationServiceContext extends Object
Created by tchemit on 05/05/2018.
| Modifier and Type | Field and Description |
|---|---|
protected TopiaMigrationServiceConfiguration |
configuration
Service configuration.
|
protected TMSVersionHibernateDao |
dao
Dao.
|
protected boolean |
dbNotVersioned
Is database is versioned?
|
protected org.nuiton.version.Version |
dbVersion
Current database version.
|
protected MigrationVersionResourceProvider |
resources
Available migration resources found in class-path.
|
protected Path |
scriptPath
Path where to store sql scripts.
|
protected boolean |
versionTableExist
Is TMSVersion table exists?
|
| Modifier | Constructor and Description |
|---|---|
protected |
TopiaMigrationServiceContext(TopiaMigrationServiceConfiguration configuration,
boolean versionTableExist,
boolean dbNotVersioned,
org.nuiton.version.Version dbVersion,
MigrationVersionResourceProvider resources,
TMSVersionHibernateDao dao) |
| Modifier and Type | Method and Description |
|---|---|
void |
createSchemaIfNotExist() |
Optional<TopiaMigrationServiceAskUserToMigrate> |
getAskUserToMigrate() |
org.nuiton.version.Version |
getDbVersion() |
org.nuiton.version.Version |
getModelVersion() |
MigrationVersionResource |
getResource(org.nuiton.version.Version version) |
MigrationVersionResourceProvider |
getResources() |
Path |
getScriptPath() |
boolean |
isDbNotVersioned() |
boolean |
isVersionTableExist() |
TopiaMigrationServiceExecutor |
newExecutor(org.nuiton.version.Version version,
TopiaSqlSupport sqlSupport) |
org.hibernate.SessionFactory |
newSessionFactory() |
static TopiaMigrationServiceContext |
of(TopiaMigrationServiceConfiguration configuration) |
void |
saveModelVersion() |
protected void |
saveVersion(org.nuiton.version.Version version) |
protected final TopiaMigrationServiceConfiguration configuration
protected final TMSVersionHibernateDao dao
protected final MigrationVersionResourceProvider resources
protected final boolean dbNotVersioned
protected final Path scriptPath
protected boolean versionTableExist
protected org.nuiton.version.Version dbVersion
protected TopiaMigrationServiceContext(TopiaMigrationServiceConfiguration configuration, boolean versionTableExist, boolean dbNotVersioned, org.nuiton.version.Version dbVersion, MigrationVersionResourceProvider resources, TMSVersionHibernateDao dao)
public static TopiaMigrationServiceContext of(TopiaMigrationServiceConfiguration configuration)
public Path getScriptPath()
public boolean isVersionTableExist()
public boolean isDbNotVersioned()
public org.nuiton.version.Version getModelVersion()
public org.nuiton.version.Version getDbVersion()
public MigrationVersionResourceProvider getResources()
public void createSchemaIfNotExist()
public void saveModelVersion()
public Optional<TopiaMigrationServiceAskUserToMigrate> getAskUserToMigrate()
protected void saveVersion(org.nuiton.version.Version version)
public org.hibernate.SessionFactory newSessionFactory()
public MigrationVersionResource getResource(org.nuiton.version.Version version)
public TopiaMigrationServiceExecutor newExecutor(org.nuiton.version.Version version, TopiaSqlSupport sqlSupport)
Copyright © 2018 Ultreia.io. All rights reserved.