for(Enumeration entityNames = changesByEntity.allKeys().objectEnumerator(); entityNames.hasMoreElements();) {
NSMutableDictionary snapshotsByGlobalID = new NSMutableDictionary(); for(Enumeration entityNames = changesByEntity.allKeys().objectEnumerator(); entityNames.hasMoreElements();) {
        private void process(EOObjectStoreCoordinator sender, SnapshotProcessor processor, NSDictionary changesByEntity) {            NSMutableDictionary dbcs = new NSMutableDictionary();            for (Enumeration oscs = _synchronizer.coordinators(); oscs.hasMoreElements(); ) {                EOObjectStoreCoordinator osc = (EOObjectStoreCoordinator) oscs.nextElement();                if (osc != sender) {                    for(Enumeration entityNames = changesByEntity.allKeys().objectEnumerator(); entityNames.hasMoreElements();) {                        String entityName = (String)entityNames.nextElement();                        EOEntity entity = EOModelGroup.modelGroupForObjectStoreCoordinator(sender).entityNamed(entityName);                        NSArray snapshots = (NSArray)changesByEntity.objectForKey(entityName);                        EODatabaseContext dbc = (EODatabaseContext) dbcs.objectForKey(entityName);                        if(dbc == null) {                            dbc = ERXEOAccessUtilities.databaseContextForEntityNamed(osc,entityName);                            dbcs.setObjectForKey(dbc, entityName);                        }                        EODatabase database = dbc.database();                        for(Enumeration snapshotsEnumerator = snapshots.objectEnumerator(); snapshotsEnumerator.hasMoreElements(); ) {                            NSDictionary snapshot = (NSDictionary)snapshotsEnumerator.nextElement();                            EOGlobalID globalID = entity.globalIDForRow(snapshot);                            EODatabaseContext._EOAssertSafeMultiThreadedAccess(dbc);                            dbc.lock();                                                        try {                                processor.processSnapshotForGlobalID(database, snapshot, globalID);                            } finally {                                dbc.unlock();                            }                        }                    }                }            }        }