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 void
adjustCommandDefinition(CommandDefinition commandDefinition)
Default implementation makes no changesprotected static RawSQLChange
buildRawSQLChange(String rollbackScriptContents)
protected void
doRollback(CommandResultsBuilder resultsBuilder, List<RanChangeSet> ranChangeSetList, ChangeSetFilter changeSetFilter)
protected void
doRollback(CommandResultsBuilder resultsBuilder, List<RanChangeSet> ranChangeSetList, ChangeSetFilter changeSetFilter, RollbackReportParameters rollbackReportParameters)
static void
doRollback(Database database, String changelogFile, String rollbackScript, ChangeLogIterator logIterator, ChangeLogParameters changeLogParameters, DatabaseChangeLog databaseChangeLog, ChangeExecListener changeExecListener)
Actually perform the rollback operation.static void
doRollback(Database database, String changelogFile, String rollbackScript, ChangeLogIterator logIterator, ChangeLogParameters changeLogParameters, DatabaseChangeLog databaseChangeLog, ChangeExecListener changeExecListener, RollbackReportParameters rollbackReportParameters)
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
protected void doRollback(CommandResultsBuilder resultsBuilder, List<RanChangeSet> ranChangeSetList, ChangeSetFilter changeSetFilter, RollbackReportParameters rollbackReportParameters) 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
-
doRollback
public static void doRollback(Database database, String changelogFile, String rollbackScript, ChangeLogIterator logIterator, ChangeLogParameters changeLogParameters, DatabaseChangeLog databaseChangeLog, ChangeExecListener changeExecListener, RollbackReportParameters rollbackReportParameters) 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:CommandStep
Return a list of configured Classes that this command requires to be passed as a dependency.- Specified by:
requiredDependencies
in interfaceCommandStep
- Overrides:
requiredDependencies
in classAbstractCommandStep
- Returns:
- list with the required classes types
-
adjustCommandDefinition
public void adjustCommandDefinition(CommandDefinition commandDefinition)
Description copied from class:AbstractCommandStep
Default implementation makes no changes- Specified by:
adjustCommandDefinition
in interfaceCommandStep
- Overrides:
adjustCommandDefinition
in classAbstractCommandStep
-
-