Add removeAll function to DeleteConflictList

This commit is contained in:
Tadgh 2020-08-01 13:15:22 -07:00
parent 46251af81a
commit ad887428b3
2 changed files with 6 additions and 2 deletions

View File

@ -127,6 +127,10 @@ public class DeleteConflictList implements Iterable<DeleteConflict> {
return myList.size(); return myList.size();
} }
public void removeAll() {
this.removeIf(x -> true);
}
@Override @Override
public String toString() { public String toString() {
return myList.toString(); return myList.toString();

View File

@ -95,10 +95,10 @@ public class EmpiPersonDeletingSvc {
DeleteConflictList newBatch = new DeleteConflictList(); DeleteConflictList newBatch = new DeleteConflictList();
for (DeleteConflict next : theDcl) { for (DeleteConflict next : theDcl) {
IdDt nextSource = next.getSourceId(); IdDt nextSource = next.getSourceId();
ourLog.info("Have delete conflict {} - Cascading delete", next); ourLog.info("Have delete conflict {} - Cascading delete", nextSource);
theDao.delete(nextSource.toVersionless(), newBatch, null, null); theDao.delete(nextSource.toVersionless(), newBatch, null, null);
} }
theDcl.removeIf(x -> true); theDcl.removeAll();
theDcl.addAll(newBatch); theDcl.addAll(newBatch);
} }
} }