Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSDictionary.keyEnumerator()


    protected void handleUpdate(EOEditingContext ec, EOEnterpriseObject eo) {
        NSArray keys = configuration.objectForKey(eo.entityName()).keys;
        NSDictionary committedSnapshotForObject = ec.committedSnapshotForObject(eo);
        NSDictionary changes = eo.changesFromSnapshot(committedSnapshotForObject);
        for (Enumeration e1 = changes.keyEnumerator(); e1.hasMoreElements();) {
            String key = (String) e1.nextElement();
            if (keys.containsObject(key)) {
                handleUpdate(ec, eo, key, committedSnapshotForObject.objectForKey(key), changes.objectForKey(key));
            }
        }
View Full Code Here


  @Override
  public NSDictionary statistics() {
    NSDictionary stats = super.statistics();
    NSMutableDictionary fixed = stats.mutableClone();
    for (Enumeration enumerator = stats.keyEnumerator(); enumerator.hasMoreElements();) {
      Object key = enumerator.nextElement();
      Object value = stats.objectForKey(key);
      fixed.setObjectForKey(fix(value), key);
    }
    stats = fixed;
View Full Code Here

            //keyed by top level so we can combine like root paths
            NSDictionary subPathsKeyedByTopLevel = subPathsKeyedByTopLevel(keypathStrings);

            NSMutableArray<KeyPath> keyPathObjects = new NSMutableArray<KeyPath>();

            Enumeration e = subPathsKeyedByTopLevel.keyEnumerator();
            while (e.hasMoreElements()) {
                String path = (String) e.nextElement();
                NSArray subPaths = (NSArray) subPathsKeyedByTopLevel.valueForKey(path);

                KeyPath kp = new KeyPath(path, KeyPath.parseKeyPathStrings(subPaths));
View Full Code Here

     */
    public static NSArray<Object> primaryKeyValuesWithGlobalIDs(NSArray<EOGlobalID> globalIDs) {
      NSMutableArray<Object> result = new NSMutableArray<Object>();
      if(globalIDs.count() > 0) {
        NSDictionary gidsByEntity = globalIDsGroupedByEntityName(globalIDs);
        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();
View Full Code Here

      }
    }
    NSDictionary classList = WOClassCacheAccessor.getClassCache();
    String unknownClassName = "com.webobjects.foundation._NSUtilities$_NoClassUnderTheSun";
    Class<?> unknownClass = WOClassCacheAccessor.classForName(unknownClassName);
    Enumeration<String> en = classList.keyEnumerator();
    while(en.hasMoreElements()) {
      String className = en.nextElement();
      if (className.equals(unknownClassName)) {
        continue;
      }
View Full Code Here

      NSMutableArray<EOEnterpriseObject> result = new NSMutableArray<EOEnterpriseObject>();
    ec.lock();
    ec.rootObjectStore().lock();
    try {
        NSDictionary gidsByEntity = globalIDsGroupedByEntityName(globalIDs);
        for(Enumeration e = gidsByEntity.keyEnumerator(); e.hasMoreElements();) {
          String entityName = (String) e.nextElement();
          NSArray gidsForEntity = (NSArray) gidsByEntity.objectForKey(entityName);
         
          NSMutableArray<EOQualifier> qualifiers = new NSMutableArray<EOQualifier>();
            EOEntity entity = ERXEOAccessUtilities.entityNamed(ec, entityName);
View Full Code Here

        }
        NSArray<EOEnterpriseObject> loadedObjects = fetchObjectsWithGlobalIDs(ec, faults);
        result.addObjectsFromArray(loadedObjects);
        if(prefetchingKeypaths != null && prefetchingKeypaths.count() > 0) {
          NSDictionary objectsByEntity = ERXArrayUtilities.arrayGroupedByKeyPath(result, "entityName");
          for(Enumeration e = objectsByEntity.keyEnumerator(); e.hasMoreElements();) {
            String entityName = (String) e.nextElement();
            NSArray objects = (NSArray) objectsByEntity.objectForKey(entityName);
            EOEntity entity = ERXEOAccessUtilities.entityNamed(ec, entityName);
            for (Enumeration keyPaths = prefetchingKeypaths.objectEnumerator(); keyPaths.hasMoreElements();) {
              String keypath = (String) keyPaths.nextElement();
View Full Code Here

        eoentity = entityGroup.objectAtIndex(i);
        NSDictionary dictionary = eoentity.userInfo();

        if (dictionary != null && dictionary.valueForKey("Index") != null) {
          dictionary = (NSDictionary) dictionary.valueForKey("Index");
          java.util.Enumeration e = dictionary.keyEnumerator();

          while (e.hasMoreElements()) {
            eosqlexpression.setStatement((String) dictionary.objectForKey(e.nextElement()));
            result.addObject(eosqlexpression);
          }
View Full Code Here

  protected void _appendHiddenFieldsToResponse(WOResponse response, WOContext context) {
    boolean flag = _actionClass != null;
    NSDictionary hiddenFields = hiddenFieldsInContext(context, flag);
    if (hiddenFields.count() > 0) {
      for (Enumeration enumeration = hiddenFields.keyEnumerator(); enumeration.hasMoreElements();) {
        String s = (String) enumeration.nextElement();
        Object obj = hiddenFields.objectForKey(s);
        response._appendContentAsciiString("<input type=\"hidden\"");
        response._appendTagAttributeAndValue("name", s, true);
        response._appendTagAttributeAndValue("value", obj.toString(), true);
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.