Package com.webobjects.eocontrol

Examples of com.webobjects.eocontrol.EOKeyGlobalID.entityName()


        if (fault.faultHandler() instanceof EOAccessArrayFaultHandler) {
            EOAccessArrayFaultHandler handler = (EOAccessArrayFaultHandler) fault.faultHandler();
            EOKeyGlobalID sourceGid = handler.sourceGlobalID();
            EOEditingContext ec = handler.editingContext();
            synchronized (cache) {
                NSDictionary entries = relationshipCacheEntriesForEntity(sourceGid.entityName(), handler.relationshipName());
                if(entries != null) {
                    NSArray gids = (NSArray) entries.objectForKey(sourceGid);
                    if(gids != null) {
                        NSMutableArray eos = new NSMutableArray(gids.count());
                        for (Enumeration enumerator = gids.objectEnumerator(); enumerator.hasMoreElements();) {
View Full Code Here


      for (Enumeration gids = objects.objectEnumerator(); gids.hasMoreElements();) {
        EOGlobalID gid = (EOGlobalID) gids.nextElement();
        if (gid instanceof EOKeyGlobalID) {
          EOKeyGlobalID globalID = (EOKeyGlobalID) gid;
          String entityName = globalID.entityName();
          String key = entityName + "/" + System.identityHashCode(osc);
          EODatabaseContext dbc = (EODatabaseContext) dbcs.objectForKey(key);
          if (dbc == null) {
            dbc = ERXEOAccessUtilities.databaseContextForEntityNamed(osc, entityName);
            dbcs.setObjectForKey(dbc, key);
View Full Code Here

      public void processRelationships(EODatabase database, NSArray gids, NSDictionary snapshots, Object context, SynchronizerSettings settings) {
        Enumeration gidsEnum = gids.objectEnumerator();
        while (gidsEnum.hasMoreElements()) {
          EOKeyGlobalID gid = (EOKeyGlobalID) gidsEnum.nextElement();
          processGID(database, gid, context, settings);
          EOEntity entity = database.entityNamed(gid.entityName());
          NSDictionary snapshot = (NSDictionary) snapshots.objectForKey(gid);
          Enumeration relationshipsEnum = entity.relationships().objectEnumerator();
          while (relationshipsEnum.hasMoreElements()) {
            EORelationship relationship = (EORelationship) relationshipsEnum.nextElement();
            if (!relationship.isToMany()) {
View Full Code Here

        ec.lock();
       
        Enumeration e = objects.objectEnumerator();
        while (e.hasMoreElements()) {
            EOKeyGlobalID globalID = (EOKeyGlobalID) e.nextElement();
            String entityName = globalID.entityName();

            if (shouldSynchronizeEntity(entityName)) {
                EODatabaseContext dbContext = ERCNNotificationCoordinator.databaseContextForEntityNamed(entityName, ec);
                NSMutableArray snapshotsForEntity = (NSMutableArray)result.objectForKey(entityName);
                if (snapshotsForEntity == null) {
View Full Code Here

        NSMutableDictionary result = new NSMutableDictionary();
       
        Enumeration e = objects.objectEnumerator();
        while (e.hasMoreElements()) {
            EOKeyGlobalID globalID = (EOKeyGlobalID) e.nextElement();
            String entityName = globalID.entityName();

            if (shouldSynchronizeEntity(entityName)) {
                NSMutableArray globalIDsForEntity = (NSMutableArray)result.objectForKey(entityName);
                if (globalIDsForEntity == null) {
                    globalIDsForEntity = new NSMutableArray();
View Full Code Here

        EOObjectStoreCoordinator osc = (EOObjectStoreCoordinator) oscs.nextElement();
        Enumeration cacheChangeEnum = remoteChange.remoteCacheChanges().objectEnumerator();
        while (cacheChangeEnum.hasMoreElements()) {
          ERXDatabase.CacheChange cacheChange = (ERXDatabase.CacheChange) cacheChangeEnum.nextElement();
          EOKeyGlobalID gid = (EOKeyGlobalID) cacheChange.gid();
          EODatabaseContext dbc = ERXEOAccessUtilities.databaseContextForEntityNamed(osc, gid.entityName());
          EODatabase database = dbc.database();
          dbc.lock();
          try {
            if (cacheChange instanceof ERXDatabase.SnapshotInserted) {
              _insertCacheChangeProcessor.processCacheChange(dbc, database, cacheChange);
View Full Code Here

    ERXEC erxec = (ERXEC) ec;
    NSArray<EOGlobalID> gids = (NSArray<EOGlobalID>)ERXKeyValueCodingUtilities.privateValueForKey(erxec, "_globalIDsForRegisteredObjects");
    for(EOGlobalID gid : gids) {
      if (gid instanceof EOKeyGlobalID) {
        EOKeyGlobalID kgid = (EOKeyGlobalID) gid;
        String entityName = kgid.entityName();
        Integer count = counts.objectForKey(entityName);
        if(count == null) {
          count = Integer.valueOf(0);
          counts.setObjectForKey(count, entityName);
        }
View Full Code Here

             while (gidEnum.hasMoreElements()) {
               EOGlobalID gid = (EOGlobalID) gidEnum.nextElement();
               if (gid instanceof EOKeyGlobalID) {
                 EOEnterpriseObject eo = null;
                 EOKeyGlobalID keyGID = (EOKeyGlobalID) gid;
                 String entityName = keyGID.entityName();
                 EOEntity entity = modelGroup.entityNamed(entityName);
                 NSDictionary snapshot = database.snapshotForGlobalID(gid);
                 if (snapshot != null) {
                   EOQualifier gidQualifier = entity.qualifierForPrimaryKey(entity.primaryKeyForGlobalID(gid));
                   EOFetchSpecification gidFetchSpec = new EOFetchSpecification(entityName, gidQualifier, null);
View Full Code Here

    }
  }

  protected void writeGID(DataOutputStream dos, EOGlobalID gid) throws IOException {
    EOKeyGlobalID keyGID = (EOKeyGlobalID) gid;
    String entityName = keyGID.entityName();
    dos.writeUTF(entityName);
    writeGIDKeys(dos, keyGID);
  }

  protected void writeGIDKeys(DataOutputStream dos, EOKeyGlobalID gid) throws IOException {
View Full Code Here

    }
    NSMutableDictionary<String, NSSet<EOGlobalID>> result = new NSMutableDictionary<String, NSSet<EOGlobalID>>();
    for (EOGlobalID gid : gids) {
      if (gid instanceof EOKeyGlobalID) {
        EOKeyGlobalID keyGID = (EOKeyGlobalID)gid;
        String entityName = keyGID.entityName();
        if (shouldSynchronizeEntity(entityName)) {
          NSMutableSet<EOGlobalID> globalIDsForEntity = (NSMutableSet<EOGlobalID>) result.objectForKey(entityName);
          if (globalIDsForEntity == null) {
            globalIDsForEntity = new NSMutableSet<EOGlobalID>();
            result.setObjectForKey(globalIDsForEntity, entityName);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.