public abstract class DatabaseMigratorBase extends Object implements IConfigurationAware, org.springframework.beans.factory.InitializingBean
Modifier and Type | Field and Description |
---|---|
protected org.apache.logging.log4j.Logger |
log |
Constructor and Description |
---|
DatabaseMigratorBase() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
org.springframework.context.ApplicationContext |
getApplicationContext() |
abstract Resource |
getChangeLog() |
String |
getDatasourceName() |
protected URL |
getResource(String path) |
boolean |
hasMigrationScript()
Check whether the configuration contains liquibase script that can be translated into sql statements in the classpath
|
boolean |
isEnabled() |
protected void |
logConfigurationMessage(String message) |
protected DataSource |
lookupMigratorDatasource() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
abstract void |
update()
Run the migration script against the database.
|
abstract void |
update(Writer writer)
Run the migration script and write the output to the
Writer . |
abstract void |
update(Writer writer,
Resource resource)
Run the provided migration script (against the local database) and write the output to the
Writer . |
abstract boolean |
validate()
Validate the current already executed ChangeSets against the migration script
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
getConfigurationClassLoader
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public String getDatasourceName()
protected final DataSource lookupMigratorDatasource() throws SQLException
SQLException
public abstract boolean validate()
public abstract void update() throws JdbcException
JdbcException
public abstract void update(Writer writer) throws JdbcException
Writer
.JdbcException
public abstract void update(Writer writer, Resource resource) throws JdbcException
Writer
.JdbcException
public boolean hasMigrationScript()
public abstract Resource getChangeLog()
protected final void logConfigurationMessage(String message)
public final void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
public final org.springframework.context.ApplicationContext getApplicationContext()
getApplicationContext
in interface IConfigurationAware
public boolean isEnabled()
Copyright © 2023 Frank!Framework. All rights reserved.