QueryEvent queryEvent = new QueryEvent(Application.getFrame(), null);
Collection addedOE = CollectionUtils.subtract(newOE, originalOE);
Iterator it = addedOE.iterator();
while (it.hasNext()) {
Entity e = (Entity) it.next();
entityEvent.setEntity(e);
entityEvent.setId(MapEvent.ADD);
mediator.fireObjEntityEvent(entityEvent);
}
Collection removedOE = CollectionUtils.subtract(originalOE, newOE);
it = removedOE.iterator();
while (it.hasNext()) {
Entity e = (Entity) it.next();
entityEvent.setEntity(e);
entityEvent.setId(MapEvent.REMOVE);
mediator.fireObjEntityEvent(entityEvent);
}
Collection addedDE = CollectionUtils.subtract(newDE, originalDE);
it = addedDE.iterator();
while (it.hasNext()) {
Entity e = (Entity) it.next();
entityEvent.setEntity(e);
entityEvent.setId(MapEvent.ADD);
mediator.fireDbEntityEvent(entityEvent);
}
Collection removedDE = CollectionUtils.subtract(originalDE, newDE);
it = removedDE.iterator();
while (it.hasNext()) {
Entity e = (Entity) it.next();
entityEvent.setEntity(e);
entityEvent.setId(MapEvent.REMOVE);
mediator.fireDbEntityEvent(entityEvent);
}