Package liquibase.command.core
Class AbstractRollbackCommandStep
- java.lang.Object
-
- liquibase.command.AbstractCommandStep
-
- liquibase.command.core.AbstractRollbackCommandStep
-
- All Implemented Interfaces:
CommandStep
- Direct Known Subclasses:
RollbackCommandStep,RollbackCountCommandStep,RollbackToDateCommandStep
public abstract class AbstractRollbackCommandStep extends AbstractCommandStep
AbstractRollbackCommandStep provides the common operations to all the rollback* commands.
-
-
Field Summary
Fields Modifier and Type Field Description static CommandArgumentDefinition<String>ROLLBACK_SCRIPT_ARG-
Fields inherited from class liquibase.command.AbstractCommandStep
coreBundle
-
Fields inherited from interface liquibase.command.CommandStep
ORDER_DEFAULT, ORDER_NOT_APPLICABLE
-
-
Constructor Summary
Constructors Constructor Description AbstractRollbackCommandStep()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadjustCommandDefinition(CommandDefinition commandDefinition)Default implementation makes no changesprotected static RawSQLChangebuildRawSQLChange(String rollbackScriptContents)protected voiddoRollback(CommandResultsBuilder resultsBuilder, List<RanChangeSet> ranChangeSetList, ChangeSetFilter changeSetFilter)static voiddoRollback(Database database, String changelogFile, String rollbackScript, ChangeLogIterator logIterator, ChangeLogParameters changeLogParameters, DatabaseChangeLog databaseChangeLog, ChangeExecListener changeExecListener)Actually perform the rollback operation.List<Class<?>>requiredDependencies()Return a list of configured Classes that this command requires to be passed as a dependency.-
Methods inherited from class liquibase.command.AbstractCommandStep
getOrder, providedDependencies, validate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface liquibase.command.CommandStep
defineCommandNames, run
-
-
-
-
Field Detail
-
ROLLBACK_SCRIPT_ARG
public static final CommandArgumentDefinition<String> ROLLBACK_SCRIPT_ARG
-
-
Method Detail
-
doRollback
protected void doRollback(CommandResultsBuilder resultsBuilder, List<RanChangeSet> ranChangeSetList, ChangeSetFilter changeSetFilter) throws Exception
- Throws:
Exception
-
doRollback
public static void doRollback(Database database, String changelogFile, String rollbackScript, ChangeLogIterator logIterator, ChangeLogParameters changeLogParameters, DatabaseChangeLog databaseChangeLog, ChangeExecListener changeExecListener) throws Exception
Actually perform the rollback operation. Determining which changesets to roll back is the responsibility of the logIterator.- Throws:
Exception
-
buildRawSQLChange
protected static RawSQLChange buildRawSQLChange(String rollbackScriptContents)
-
requiredDependencies
public List<Class<?>> requiredDependencies()
Description copied from interface:CommandStepReturn a list of configured Classes that this command requires to be passed as a dependency.- Specified by:
requiredDependenciesin interfaceCommandStep- Overrides:
requiredDependenciesin classAbstractCommandStep- Returns:
- list with the required classes types
-
adjustCommandDefinition
public void adjustCommandDefinition(CommandDefinition commandDefinition)
Description copied from class:AbstractCommandStepDefault implementation makes no changes- Specified by:
adjustCommandDefinitionin interfaceCommandStep- Overrides:
adjustCommandDefinitionin classAbstractCommandStep
-
-