Package com.webobjects.foundation

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


    NSDictionary defaultConnectionDictionary;
    Map overrideConnectionDictionary = (Map) databaseConfig.get("connectionDictionary");
    if (overrideConnectionDictionary != null) {
      NSDictionary connectionDictionary = (NSDictionary) EOFSQLUtils56.toWOCollections(overrideConnectionDictionary);
      _model.setConnectionDictionary(connectionDictionary);
      String eomodelProcessorClassName = (String) connectionDictionary.valueForKey("eomodelProcessorClassName");
      if (eomodelProcessorClassName != null) {
        findModelProcessor(eomodelProcessorClassName, true);
      }
      defaultConnectionDictionary = connectionDictionary;
    } else {
View Full Code Here


    for (Enumeration e = attributes.objectEnumerator(); e.hasMoreElements();) {
      EOAttribute attribute = (EOAttribute) e.nextElement();
      NSDictionary userInfo = attribute.userInfo();
      String name = attribute.name();
      if (userInfo != null) {
        Object l = userInfo.valueForKey("ERXLanguages");
        if (l != null && !(l instanceof NSArray)) {
          l = (entity.model().userInfo() != null ? entity.model().userInfo().valueForKey("ERXLanguages") : null);
        }

        NSArray languages = (NSArray) l;
View Full Code Here

    NSDictionary defaultConnectionDictionary;
    Map overrideConnectionDictionary = (Map) databaseConfig.get("connectionDictionary");
    if (overrideConnectionDictionary != null) {
      NSDictionary connectionDictionary = (NSDictionary) EOFSQLUtils53.toWOCollections(overrideConnectionDictionary);
      _model.setConnectionDictionary(connectionDictionary);
      String eomodelProcessorClassName = (String) connectionDictionary.valueForKey("eomodelProcessorClassName");
      if (eomodelProcessorClassName != null) {
        findModelProcessor(eomodelProcessorClassName, true);
      }
      defaultConnectionDictionary = connectionDictionary;
    } else {
View Full Code Here

    for (Enumeration e = attributes.objectEnumerator(); e.hasMoreElements();) {
      EOAttribute attribute = (EOAttribute) e.nextElement();
      NSDictionary userInfo = attribute.userInfo();
      String name = attribute.name();
      if (userInfo != null) {
        Object l = userInfo.valueForKey("ERXLanguages");
        if (l != null && !(l instanceof NSArray)) {
          l = (entity.model().userInfo() != null ? entity.model().userInfo().valueForKey("ERXLanguages") : null);
        }

        NSArray languages = (NSArray) l;
View Full Code Here

      sql.append(' ');
      sql.append(columnTypeStringForAttribute(attribute));

      NSDictionary userInfo = attribute.userInfo();
      if (userInfo != null) {
        Object defaultValue = userInfo.valueForKey("er.extensions.eoattribute.default"); // deprecated key
            if (defaultValue == null) {
                defaultValue = userInfo.valueForKey("default");
            }
        if (defaultValue != null) {
          sql.append(" DEFAULT ");
View Full Code Here

      NSDictionary userInfo = attribute.userInfo();
      if (userInfo != null) {
        Object defaultValue = userInfo.valueForKey("er.extensions.eoattribute.default"); // deprecated key
            if (defaultValue == null) {
                defaultValue = userInfo.valueForKey("default");
            }
        if (defaultValue != null) {
          sql.append(" DEFAULT ");
          sql.append(formatValueForAttribute(defaultValue, attribute));
        }
View Full Code Here

                EORelationship r=entity.relationshipNamed(lastKey);
                if (r!=null) userInfo=r.userInfo();
            }
            //
           // NSDictionary userInfo=(NSDictionary)(property!=null ? property.valueForKey("userInfo") : null);
            result= (String)(userInfo!=null ? userInfo.valueForKey("unit") : null);
        }
        return result;
    }

    /** @deprecated use ERD2WFactory.erFactory().printerFriendlyPageForD2WContext(D2WContext context, WOSession session)*/
 
View Full Code Here

    if (formattersByKeypath == null) {
      NSArray columns = columns();
      formattersByKeypath = new NSMutableDictionary(columns.count());
      for (int i = 0; i < columns.count(); i++) {
        NSDictionary column = (NSDictionary) columns.objectAtIndex(i);
        String className = (String) column.valueForKey(FORMATTER_CLASS);
        if (className != null) {
          try {
            Format formatter = (Format) Class.forName(className).newInstance();
            String pattern = (String) column.valueForKey(FORMAT_PATTERN);
            if (pattern != null) {
View Full Code Here

        NSDictionary column = (NSDictionary) columns.objectAtIndex(i);
        String className = (String) column.valueForKey(FORMATTER_CLASS);
        if (className != null) {
          try {
            Format formatter = (Format) Class.forName(className).newInstance();
            String pattern = (String) column.valueForKey(FORMAT_PATTERN);
            if (pattern != null) {
              NSKeyValueCoding.DefaultImplementation.takeValueForKey(formatter, pattern, "pattern");
            }
            formattersByKeypath.setObjectForKey(formatter, column.valueForKey(KEY_PATH));
          }
View Full Code Here

            Format formatter = (Format) Class.forName(className).newInstance();
            String pattern = (String) column.valueForKey(FORMAT_PATTERN);
            if (pattern != null) {
              NSKeyValueCoding.DefaultImplementation.takeValueForKey(formatter, pattern, "pattern");
            }
            formattersByKeypath.setObjectForKey(formatter, column.valueForKey(KEY_PATH));
          }
          catch (Exception e) {
            throw NSForwardException._runtimeExceptionForThrowable(e);
          }
        }
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.