Modifier and Type | Class and Description |
---|---|
class |
Liquibase.SpringResourceOpener |
Modifier and Type | Field and Description |
---|---|
protected static String |
CHANGE_LOG_SNAPSHOT_SUFFIX |
protected Version |
maxChangeLogFileVersion |
Constructor and Description |
---|
Liquibase(DataSource dataSource,
AdagioConfiguration config) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Executed automatically when the bean is initialized.
|
protected void |
computeMaxChangeLogFileVersion() |
protected Database |
createDatabase(Connection c)
Subclasses may override this method add change some database settings such as
default schema before returning the database object.
|
protected Database |
createHibernateDatabase()
Create a database connection to hibernate model.
|
protected Liquibase |
createLiquibase(Connection c) |
protected Liquibase.SpringResourceOpener |
createResourceOpener()
Create a new resourceOpener.
|
void |
executeUpdate()
Execute liquibase update, using change log
|
void |
generateDiffChangelog(File changeLogFile,
String typesToControl)
Generate a changelog file, with all diff found
|
String |
getBeanName() |
String |
getChangeLog() |
String |
getContexts() |
String |
getDatabaseProductName() |
DataSource |
getDataSource() |
String |
getDefaultSchema() |
protected Logger |
getLog() |
Version |
getMaxChangeLogFileVersion()
Get the max version from all change log files.
|
ResourceLoader |
getResourceLoader() |
protected DiffResult |
performDiff(Liquibase liquibase,
String typesToControl) |
protected void |
performReportStatus(Liquibase liquibase,
Writer writer) |
protected void |
performUpdate(Liquibase liquibase) |
void |
reportDiff(File outputFile,
String typesToControl)
Generate a diff report (using text format)
|
void |
reportStatus(Writer writer)
Execute liquibase status, using change log
|
void |
setBeanName(String name)
Spring sets this automatically to the instance's configured bean name.
|
void |
setChangeLog(String dataModel)
Sets a Spring Resource that is able to resolve to a file or classpath resource.
|
void |
setChangeLogParameters(Map<String,String> parameters) |
void |
setContexts(String contexts) |
void |
setDataSource(DataSource dataSource)
The DataSource that liquibase will use to perform the migration.
|
void |
setDefaultSchema(String defaultSchema) |
void |
setResourceLoader(ResourceLoader resourceLoader) |
String |
toString() |
protected static final String CHANGE_LOG_SNAPSHOT_SUFFIX
protected Version maxChangeLogFileVersion
@Autowired public Liquibase(DataSource dataSource, AdagioConfiguration config)
public void afterPropertiesSet() throws LiquibaseException
afterPropertiesSet
in interface InitializingBean
LiquibaseException
public String getDatabaseProductName() throws DatabaseException
DatabaseException
public DataSource getDataSource()
public void setDataSource(DataSource dataSource)
public String getChangeLog()
public void setChangeLog(String dataModel)
classpath:db-changelog.xml
.public String getContexts()
public void setContexts(String contexts)
public String getDefaultSchema()
public void setDefaultSchema(String defaultSchema)
public void executeUpdate() throws LiquibaseException
LiquibaseException
protected void performUpdate(Liquibase liquibase) throws LiquibaseException
LiquibaseException
public void reportStatus(Writer writer) throws LiquibaseException
LiquibaseException
protected void performReportStatus(Liquibase liquibase, Writer writer) throws LiquibaseException
LiquibaseException
protected Liquibase createLiquibase(Connection c) throws LiquibaseException
LiquibaseException
protected Database createDatabase(Connection c) throws DatabaseException
c
- DatabaseFactory
.DatabaseException
protected Database createHibernateDatabase() throws DatabaseException
DatabaseException
public void setChangeLogParameters(Map<String,String> parameters)
protected Liquibase.SpringResourceOpener createResourceOpener()
public void setBeanName(String name)
setBeanName
in interface BeanNameAware
public String getBeanName()
public void setResourceLoader(ResourceLoader resourceLoader)
setResourceLoader
in interface ResourceLoaderAware
public ResourceLoader getResourceLoader()
protected void computeMaxChangeLogFileVersion()
public Version getMaxChangeLogFileVersion()
public void reportDiff(File outputFile, String typesToControl) throws LiquibaseException
outputFile
- typesToControl
- a comma separated database object to check (i.e Table, View, Column...). If null, all types are
checkedLiquibaseException
public void generateDiffChangelog(File changeLogFile, String typesToControl) throws LiquibaseException
changeLogFile
- typesToControl
- a comma separated database object to check (i.e Table, View, Column...). If null, all types are
checkedLiquibaseException
protected DiffResult performDiff(Liquibase liquibase, String typesToControl) throws LiquibaseException
liquibase
- the connection to the target databasetypesToControl
- a comma separated database object to check (i.e Table, View, Column...). If null, all types are
checkedLiquibaseException
protected Logger getLog()
Copyright © 2012–2014 IFREMER. All rights reserved.