@Test public void runChangeSet_emptyFiltersIterator() throws Exception { TestChangeSetVisitor testChangeLogVisitor = new TestChangeSetVisitor(); ChangeLogIterator iterator = new ChangeLogIterator(changeLog); iterator.run(testChangeLogVisitor, null); assertEquals(6, testChangeLogVisitor.visitedChangeSets.size()); }
public void run(ChangeSetVisitor visitor, Database database) throws LiquibaseException { List<ChangeSet> changeSetList = databaseChangeLog.getChangeSets(); if (visitor.getDirection().equals(ChangeSetVisitor.Direction.REVERSE)) { Collections.reverse(changeSetList); } for (ChangeSet changeSet : changeSetList) { boolean shouldVisit = true; if (changeSetFilters != null) { for (ChangeSetFilter filter : changeSetFilters) { if (!filter.accepts(changeSet)) { shouldVisit = false; break; } } } if (shouldVisit) { visitor.visit(changeSet, databaseChangeLog, database); } } }
ChangeLogIterator { public void run(ChangeSetVisitor visitor, Database database) throws LiquibaseException { List<ChangeSet> changeSetList = databaseChangeLog.getChangeSets(); if (visitor.getDirection().equals(ChangeSetVisitor.Direction.REVERSE)) { Collections.reverse(changeSetList); } for (ChangeSet changeSet : changeSetList) { boolean shouldVisit = true; if (changeSetFilters != null) { for (ChangeSetFilter filter : changeSetFilters) { if (!filter.accepts(changeSet)) { shouldVisit = false; break; } } } if (shouldVisit) { visitor.visit(changeSet, databaseChangeLog, database); } } } }
ChangeLogIterator { public void run(ChangeSetVisitor visitor, Database database) throws LiquibaseException { List<ChangeSet> changeSetList = databaseChangeLog.getChangeSets(); if (visitor.getDirection().equals(ChangeSetVisitor.Direction.REVERSE)) { Collections.reverse(changeSetList); } for (ChangeSet changeSet : changeSetList) { boolean shouldVisit = true; if (changeSetFilters != null) { for (ChangeSetFilter filter : changeSetFilters) { if (!filter.accepts(changeSet)) { shouldVisit = false; break; } } } if (shouldVisit) { visitor.visit(changeSet, databaseChangeLog, database); } } } ChangeLogIterator(DatabaseChangeLog databaseChangeLog, ChangeSetFilter... changeSetFilters);  ChangeLogIterator(List<RanChangeSet> changeSetList, DatabaseChangeLog changeLog, ChangeSetFilter... changeSetFilters); }
ChangeLogIterator { public void run(ChangeSetVisitor visitor, Database database) throws LiquibaseException { List<ChangeSet> changeSetList = databaseChangeLog.getChangeSets(); if (visitor.getDirection().equals(ChangeSetVisitor.Direction.REVERSE)) { Collections.reverse(changeSetList); } for (ChangeSet changeSet : changeSetList) { boolean shouldVisit = true; if (changeSetFilters != null) { for (ChangeSetFilter filter : changeSetFilters) { if (!filter.accepts(changeSet)) { shouldVisit = false; break; } } } if (shouldVisit) { visitor.visit(changeSet, databaseChangeLog, database); } } } ChangeLogIterator(DatabaseChangeLog databaseChangeLog, ChangeSetFilter... changeSetFilters);  ChangeLogIterator(List<RanChangeSet> changeSetList, DatabaseChangeLog changeLog, ChangeSetFilter... changeSetFilters); void run(ChangeSetVisitor visitor, Database database); }
ChangeLogIterator { public void run(ChangeSetVisitor visitor, Database database) throws LiquibaseException { List<ChangeSet> changeSetList = databaseChangeLog.getChangeSets(); if (visitor.getDirection().equals(ChangeSetVisitor.Direction.REVERSE)) { Collections.reverse(changeSetList); } for (ChangeSet changeSet : changeSetList) { boolean shouldVisit = true; if (changeSetFilters != null) { for (ChangeSetFilter filter : changeSetFilters) { if (!filter.accepts(changeSet)) { shouldVisit = false; break; } } } if (shouldVisit) { visitor.visit(changeSet, databaseChangeLog, database); } } } ChangeLogIterator(DatabaseChangeLog databaseChangeLog, ChangeSetFilter... changeSetFilters);  ChangeLogIterator(List<RanChangeSet> changeSetList, DatabaseChangeLog changeLog, ChangeSetFilter... changeSetFilters); void run(ChangeSetVisitor visitor, Database database);  }