01: package liquibase.parser.filter;
02:
03: import liquibase.ChangeSet;
04: import liquibase.RanChangeSet;
05:
06: import java.util.List;
07:
08: public class AlreadyRanChangeSetFilter implements ChangeSetFilter {
09:
10: public List<RanChangeSet> ranChangeSets;
11:
12: public AlreadyRanChangeSetFilter(List<RanChangeSet> ranChangeSets) {
13: this .ranChangeSets = ranChangeSets;
14: }
15:
16: @SuppressWarnings({"RedundantIfStatement"})
17: public boolean accepts(ChangeSet changeSet) {
18: for (RanChangeSet ranChangeSet : ranChangeSets) {
19: if (ranChangeSet.getId().equals(changeSet.getId())
20: && ranChangeSet.getAuthor().equals(
21: changeSet.getAuthor())
22: && ranChangeSet.getChangeLog().equals(
23: changeSet.getFilePath())) {
24: return true;
25: }
26: }
27: return false;
28: }
29: }
|