Package liquibase.changelog.visitor
Class StatusVisitor
- java.lang.Object
-
- liquibase.changelog.visitor.StatusVisitor
-
- All Implemented Interfaces:
ChangeSetVisitor
,SkippedChangeSetVisitor
public class StatusVisitor extends Object implements ChangeSetVisitor, SkippedChangeSetVisitor
ChangeSetVisitor that will collect the execution status of changeSets without executing them. Also includes changeSets previously executed against the database but no longer in the change log.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface liquibase.changelog.visitor.ChangeSetVisitor
ChangeSetVisitor.Direction
-
-
Constructor Summary
Constructors Constructor Description StatusVisitor(Database database)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ChangeSetStatus
addStatus(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database)
List<ChangeSetStatus>
getChangeSetsToRun()
Return the changesets that will executeList<ChangeSetStatus>
getChangeSetsToSkip()
Return the changesets that will NOT executeChangeSetVisitor.Direction
getDirection()
ChangeSetStatus
getStatus(ChangeSet changeSet)
Convenience method to return the ChangeSetStatus of a given changeSet.List<ChangeSetStatus>
getStatuses()
Return the status of all changeSets, in the order they exist in the databasechangelog.void
skipped(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database, Set<ChangeSetFilterResult> filterResults)
void
visit(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database, Set<ChangeSetFilterResult> filterResults)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface liquibase.changelog.visitor.ChangeSetVisitor
logMdcData
-
-
-
-
Constructor Detail
-
StatusVisitor
public StatusVisitor(Database database) throws LiquibaseException
- Throws:
LiquibaseException
-
-
Method Detail
-
getDirection
public ChangeSetVisitor.Direction getDirection()
- Specified by:
getDirection
in interfaceChangeSetVisitor
-
visit
public void visit(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database, Set<ChangeSetFilterResult> filterResults) throws LiquibaseException
- Specified by:
visit
in interfaceChangeSetVisitor
- Throws:
LiquibaseException
-
skipped
public void skipped(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database, Set<ChangeSetFilterResult> filterResults) throws LiquibaseException
- Specified by:
skipped
in interfaceSkippedChangeSetVisitor
- Throws:
LiquibaseException
-
addStatus
protected ChangeSetStatus addStatus(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database) throws LiquibaseException
- Throws:
LiquibaseException
-
getStatus
public ChangeSetStatus getStatus(ChangeSet changeSet)
Convenience method to return the ChangeSetStatus of a given changeSet. Returns null if the changeSet is not know.
-
getStatuses
public List<ChangeSetStatus> getStatuses()
Return the status of all changeSets, in the order they exist in the databasechangelog. Any changesets not in the current change log but previously ran against the database will be at the front of the List with a not run reason type ofNotInChangeLogChangeSetFilter
-
getChangeSetsToRun
public List<ChangeSetStatus> getChangeSetsToRun()
Return the changesets that will execute
-
getChangeSetsToSkip
public List<ChangeSetStatus> getChangeSetsToSkip()
Return the changesets that will NOT execute
-
-