Examples of keyEnumerator()


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

        }
        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

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

        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

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

  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

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

  private NSMutableDictionary parseDeclarationsWithoutComments(String declarationWithoutComment) throws WOHelperFunctionDeclarationFormatException {
    NSMutableDictionary declarations = new NSMutableDictionary();
    NSMutableDictionary rawDeclarations = _rawDeclarationsWithoutComment(declarationWithoutComment);
    String tagName;
    WODeclaration declaration;
    Enumeration rawDeclarationHeaderEnum = rawDeclarations.keyEnumerator();
    while (rawDeclarationHeaderEnum.hasMoreElements()) {
      String declarationHeader = (String) rawDeclarationHeaderEnum.nextElement();
      String declarationBody = (String) rawDeclarations.objectForKey(declarationHeader);
      int colonIndex = declarationHeader.indexOf(':');
      if (colonIndex < 0) {
View Full Code Here

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

    // that are SharedEntity EOs to a dictionary with keys (encodedSharedEO or encodedEO,
    // entityName, pk)
    protected NSMutableDictionary encodeDictionaryWithEOs(NSDictionary dictionary) {
      NSMutableDictionary theMutableDictionary = (NSMutableDictionary) ((dictionary instanceof NSMutableDictionary) ? dictionary : dictionary.mutableClone());

      for (Enumeration anEnum = theMutableDictionary.keyEnumerator(); anEnum.hasMoreElements();) {
        String key = (String) anEnum.nextElement();
        Object value = theMutableDictionary.objectForKey(key);

        if (value instanceof EOEnterpriseObject && !ERXEOControlUtilities.isNewObject((EOEnterpriseObject)value)) {
                    EOEnterpriseObject eo = (EOEnterpriseObject)value;
View Full Code Here

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

                // If we can't decode the EO, then just return the dictionary.
                return  (eo != null) ? eo : dictionary;
      }

      for (Enumeration anEnum = theMutableDictionary.keyEnumerator(); anEnum.hasMoreElements();) {
        String key = (String) anEnum.nextElement();
        Object value = theMutableDictionary.objectForKey(key);

        if (value instanceof NSDictionary) {
          theMutableDictionary.setObjectForKey(decodeDictionaryWithEOs((NSDictionary) value), key);
View Full Code Here

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

    aLog.append(new StringBuilder().append(indentString).append("<EOAttribute ").append(name()).append('\n').toString());
    String aKey = "";
    try {
      NSMutableDictionary aDictionary = new NSMutableDictionary();
      encodeIntoPropertyList(aDictionary);
      for (Enumeration enumerator = aDictionary.keyEnumerator(); enumerator.hasMoreElements(); aLog.append(new StringBuilder().append(indentString).append('\t').append(aKey).append(" : '").append(aDictionary.objectForKey(aKey)).append("'\n").toString()))
        aKey = (String) enumerator.nextElement();

    }
    catch (Exception exception) {
      aLog.append(new StringBuilder().append(indentString).append('\t').append(getClass().getName()).append(".toString: characteristics ").append(aKey).append(" exception ").append(exception).append('\n').toString());
View Full Code Here

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

            if ( (unknownApps.count() ==0) ) {
                // we endReading in the finally block
                return sb;
            }

            for (Enumeration e = unknownApps.keyEnumerator(); e.hasMoreElements(); ) {
                String appName = (String) e.nextElement();
                NSMutableDictionary appDict = (NSMutableDictionary) unknownApps.valueForKey(appName);

                sb.append("  <application name=\"");
                sb.append(appName);
View Full Code Here

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

                sb.append("  <application name=\"");
                sb.append(appName);
                sb.append("\">\n");

                for (Enumeration e2 = appDict.keyEnumerator(); e2.hasMoreElements(); ) {
                    String port = (String) e2.nextElement();
                    sb.append("    <instance");

                    sb.append(" id=\"-");
                    sb.append(port);
View Full Code Here

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

    public static void setDefaultEncodingForAllLanguages(String newDefaultEncoding) {
        // This statement may throw an IllegalArgumentException when newDefaultEncoding isn't supported. 
        setDefaultEncoding(newDefaultEncoding);

        NSMutableDictionary d = new NSMutableDictionary(_languagesAndDefaultEncodings());
        Enumeration e = d.keyEnumerator();
        while (e.hasMoreElements()) {
            String key = (String)e.nextElement();
            d.setObjectForKey(newDefaultEncoding, key);
        }
        _setLanguagesAndDefaultEncodings(d);
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.