liquibase.changelog.visitor
Class StatusVisitor

java.lang.Object
  extended by 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
StatusVisitor(Database database)
           
 
Method Summary
protected  ChangeSetStatus addStatus(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database)
           
 List<ChangeSetStatus> getChangeSetsToRun()
          Return the change sets that will execute
 List<ChangeSetStatus> getChangeSetsToSkip()
          Return the change sets that will NOT execute
 ChangeSetVisitor.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
 

Constructor Detail

StatusVisitor

public StatusVisitor(Database database)
              throws LiquibaseException
Throws:
LiquibaseException
Method Detail

getDirection

public ChangeSetVisitor.Direction getDirection()
Specified by:
getDirection in interface ChangeSetVisitor

visit

public void visit(ChangeSet changeSet,
                  DatabaseChangeLog databaseChangeLog,
                  Database database,
                  Set<ChangeSetFilterResult> filterResults)
           throws LiquibaseException
Specified by:
visit in interface ChangeSetVisitor
Throws:
LiquibaseException

skipped

public void skipped(ChangeSet changeSet,
                    DatabaseChangeLog databaseChangeLog,
                    Database database,
                    Set<ChangeSetFilterResult> filterResults)
             throws LiquibaseException
Specified by:
skipped in interface SkippedChangeSetVisitor
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 change sets 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 of NotInChangeLogChangeSetFilter


getChangeSetsToRun

public List<ChangeSetStatus> getChangeSetsToRun()
Return the change sets that will execute


getChangeSetsToSkip

public List<ChangeSetStatus> getChangeSetsToSkip()
Return the change sets that will NOT execute



Copyright © 2016 Liquibase.org. All rights reserved.