liquibase.change.custom
Class CustomChangeWrapper
java.lang.Object
liquibase.change.AbstractChange
liquibase.change.custom.CustomChangeWrapper
- All Implemented Interfaces:
- Change
public class CustomChangeWrapper
- extends AbstractChange
Adapts CustomChange implementations to the standard change system used by Liquibase.
Custom change implementations should implement CustomSqlChange or CustomTaskChange
- See Also:
CustomSqlChange
,
CustomTaskChange
Methods inherited from class liquibase.change.AbstractChange |
createInverses, generateCheckSum, getAffectedDatabaseObjects, getChangeLogParameters, getChangeMetaData, getChangeSet, getResourceAccessor, init, requiresUpdatedDatabaseMetadata, setChangeLogParameters, setChangeSet, setPriority, setResourceAccessor, supports |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CustomChangeWrapper
public CustomChangeWrapper()
getCustomChange
public CustomChange getCustomChange()
getClassLoader
public ClassLoader getClassLoader()
setClassLoader
public void setClassLoader(ClassLoader classLoader)
setClass
public void setClass(String className)
throws CustomChangeException
- Throws:
CustomChangeException
getClassName
public String getClassName()
setParam
public void setParam(String name,
String value)
getParams
public SortedSet<String> getParams()
getParamValues
public Map<String,String> getParamValues()
validate
public ValidationErrors validate(Database database)
- Specified by:
validate
in interface Change
- Overrides:
validate
in class AbstractChange
warn
public Warnings warn(Database database)
- Specified by:
warn
in interface Change
- Overrides:
warn
in class AbstractChange
generateStatements
public SqlStatement[] generateStatements(Database database)
- Description copied from interface:
Change
- Generates the SQL statements required to run the change
- Parameters:
database
- databasethe target Database
associated to this change's statements
- Returns:
- an array of
String
s with the statements
generateRollbackStatements
public SqlStatement[] generateRollbackStatements(Database database)
throws UnsupportedChangeException,
RollbackImpossibleException
- Description copied from interface:
Change
- Generates the SQL statements required to roll back the change
- Specified by:
generateRollbackStatements
in interface Change
- Overrides:
generateRollbackStatements
in class AbstractChange
- Parameters:
database
- database databasethe target Database
associated to this change's rollback statements
- Returns:
- an array of
String
s with the rollback statements
- Throws:
UnsupportedChangeException
- if this change is not supported by the Database
passed as argument
RollbackImpossibleException
- if rollback is not supported for this change- See Also:
Change.generateRollbackStatements(liquibase.database.Database)
supportsRollback
public boolean supportsRollback(Database database)
- Description copied from interface:
Change
- Can this change be rolled back
- Specified by:
supportsRollback
in interface Change
- Overrides:
supportsRollback
in class AbstractChange
- Returns:
- true if rollback is supported, false otherwise
- See Also:
Change.supportsRollback(liquibase.database.Database)
getConfirmationMessage
public String getConfirmationMessage()
- Returns:
- Confirmation message to be displayed after the change is executed
Copyright © 2012 Liquibase.org. All Rights Reserved.