use of org.apache.cayenne.commitlog.model.ObjectChange in project cayenne by apache.
the class CommitLogFilter_ListenerInducedChangesIT method sortedChanges.
private List<ObjectChange> sortedChanges(InvocationOnMock invocation) {
assertSame(context, invocation.getArguments()[0]);
ChangeMap changes = (ChangeMap) invocation.getArguments()[1];
List<ObjectChange> sortedChanges = new ArrayList<>(changes.getUniqueChanges());
Collections.sort(sortedChanges, new Comparator<ObjectChange>() {
public int compare(ObjectChange o1, ObjectChange o2) {
return o1.getPostCommitId().getEntityName().compareTo(o2.getPostCommitId().getEntityName());
}
});
return sortedChanges;
}
Aggregations