EODatabaseContext dbc = (EODatabaseContext) dbcs.objectForKey(entityName);
String key = entityName + "/" + System.identityHashCode(osc); EODatabaseContext dbc = (EODatabaseContext) dbcs.objectForKey(key);
        private NSDictionary snapshotsGroupedByEntity(NSArray objects, EOObjectStoreCoordinator osc) {            if(objects == null || objects.count() == 0) {                return NSDictionary.EmptyDictionary;            }                        NSMutableDictionary result = new NSMutableDictionary();            NSMutableDictionary dbcs = new NSMutableDictionary();                        for(Enumeration gids = objects.objectEnumerator(); gids.hasMoreElements();) {                EOKeyGlobalID globalID = (EOKeyGlobalID) gids.nextElement();                String entityName = globalID.entityName();                                EODatabaseContext dbc = (EODatabaseContext) dbcs.objectForKey(entityName);                if(dbc == null) {                    dbc = ERXEOAccessUtilities.databaseContextForEntityNamed(osc, entityName);                    dbcs.setObjectForKey(dbc, entityName);                }                NSMutableArray snapshotsForEntity = (NSMutableArray)result.objectForKey(entityName);                if(snapshotsForEntity == null) {                    snapshotsForEntity = new NSMutableArray();                    result.setObjectForKey(snapshotsForEntity, entityName);                }                synchronized(snapshotsForEntity) {                    Object o = dbc.snapshotForGlobalID(globalID);                    if(o != null) {                        snapshotsForEntity.addObject(o);                    }                }            }            return result.immutableClone();        }