Package com.webobjects.eocontrol

Examples of com.webobjects.eocontrol.EOKeyGlobalID


      }
    }
  }

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


    EOEntityClassDescription classDescription = (EOEntityClassDescription) EOEntityClassDescription.classDescriptionForEntityName(entityName);
    return _readGID(classDescription, entityName, dis);
  }

  protected EOGlobalID _readGID(EOEntityClassDescription classDescription, String entityName, DataInputStream dis) throws IOException {
    EOKeyGlobalID gid;
    int keyCount = dis.readByte();
    if (keyCount == -1) {
      gid = null;
    }
    else {
View Full Code Here

      return NSDictionary.EmptyDictionary;
    }
    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

    else {
      NSMutableArray<ERXDatabase.CacheChange> mutableFilteredCacheChanges = new NSMutableArray<ERXDatabase.CacheChange>();
      for (ERXDatabase.CacheChange cacheChange : cacheChanges) {
        EOGlobalID gid = cacheChange.gid();
        if (gid instanceof EOKeyGlobalID) {
          EOKeyGlobalID keyGID = (EOKeyGlobalID)gid;
          String entityName = keyGID.entityName();
          if (shouldSynchronizeEntity(entityName)) {
            mutableFilteredCacheChanges.addObject(cacheChange);
          }
        }
      }
View Full Code Here

        for(Enumeration e = gidsByEntity.keyEnumerator(); e.hasMoreElements();) {
          String entityName = (String) e.nextElement();
          NSArray gidsForEntity = (NSArray) gidsByEntity.objectForKey(entityName);
         
          for (Enumeration gids = gidsForEntity.objectEnumerator(); gids.hasMoreElements();) {
            EOKeyGlobalID keyGID = (EOKeyGlobalID) gids.nextElement();
            if(keyGID.keyCount() == 1) {
              result.addObject(keyGID.keyValues()[0]);
            } else {
              throw new IllegalArgumentException("GID has more than one key: " + keyGID);
            }
          }
        }
View Full Code Here

    public static NSArray<EOGlobalID> globalIDsWithPrimaryKeyValues(String entityName, NSArray<Object> values) {
        NSMutableArray<EOGlobalID> result = new NSMutableArray<EOGlobalID>();
        if(values.count() > 0) {
            for (Enumeration pks = values.objectEnumerator(); pks.hasMoreElements();) {
                Object value = pks.nextElement();
                EOKeyGlobalID gid = EOKeyGlobalID.globalIDWithEntityName(entityName, new Object[] {value});
                result.addObject(gid);
            }
        }
        return result;
    }
View Full Code Here

      public Info(EOGlobalID gid) {
        if(gid instanceof EOTemporaryGlobalID) {
          _data = ((EOTemporaryGlobalID)gid)._rawBytes();
        } else if (gid instanceof EOKeyGlobalID) {
          EOKeyGlobalID keyGid = (EOKeyGlobalID)gid;
          Object value = keyGid.keyValues()[0];
          if(value instanceof NSData && keyGid.keyValues().length == 1) {
            _data = ((NSData)value)._bytesNoCopy();
          }
        }
       
        if(_data == null) {
View Full Code Here

  {
    JobDataMap map = new JobDataMap();
    map.put(ERQSSchedulerServiceFrameworkPrincipal.INSTANCE_KEY, getSchedulerFPInstance());
    if (jobDescription.isEnterpriseObject())
    {
      EOKeyGlobalID globalID = ((ERXGenericRecord)jobDescription).permanentGlobalID();
      map.put(ERQSJob.ENTERPRISE_OBJECT_KEY, globalID);
    }
    else
      map.put(ERQSJob.NOT_PERSISTENT_OBJECT_KEY, jobDescription);
View Full Code Here

      databaseContext.lock();
      try {
        EODatabase database = databaseContext.database();
        for (EOGlobalID gid : (NSArray<EOGlobalID>) database.snapshots().allKeys()) {
          if (gid instanceof EOKeyGlobalID) {
            EOKeyGlobalID kgid = (EOKeyGlobalID) gid;
            String entityName = kgid.entityName();
            SEEntityStats entityStats = _entityStats.get(entityName);
            if (entityStats == null) {
              EOEntity entity = _model.entityNamed(entityName);
              if (entity != null) {
                entityStats = new SEEntityStats(databaseContext, entity);
View Full Code Here

    if(value == null) {
      return null;
    }
    String entityName = ERXStringUtilities.firstPropertyKeyInKeyPath(value);
    String valueString = ERXStringUtilities.keyPathWithoutFirstProperty(value);
    EOKeyGlobalID gid = (EOKeyGlobalID) ERXEOControlUtilities.globalIDForString(null, entityName, valueString);
    return globalIDForGID(gid);
  }
View Full Code Here

TOP

Related Classes of com.webobjects.eocontrol.EOKeyGlobalID

Copyright © 2018 www.massapicom. 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.