Package com.webobjects.foundation

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


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


                log.error("Got non-parsable data from Host: " + configHostName + " + and Port: " + aPort + ". Data received was: " + aResponse.contentString() + ". It is possible that the Wotaskd on the remote host is of the wrong version");
                throw new MonitorException("Got non-parsable data from Host: " + configHostName + " + and Port: " + aPort + ". Data received was: " +aResponse.contentString() + ". It is possible that the Wotaskd on the remote host is of the wrong version");
            }
        }

        NSArray errorResponse = (NSArray) xmlDict.valueForKey("errorResponse");
        if (errorResponse != null) {
            String errorString = "";
            for (int i=0; i<errorResponse.count(); i++)
                errorString = errorString + (String)errorResponse.objectAtIndex(i) + "\n";
            throw new MonitorException(errorString);
View Full Code Here

            throw new MonitorException(errorString);
        }
       
        NSDictionary queryWotaskdResponse = (NSDictionary) xmlDict.valueForKey("queryWotaskdResponse");
        if (queryWotaskdResponse != null) {
            return new MSiteConfig((NSDictionary) queryWotaskdResponse.valueForKey("SiteConfig"));
        }
        return new MSiteConfig(null);
    }

View Full Code Here

        }
    }

    public void _takeValueFromApplication(String valueName) {
        NSDictionary appValues = _application.values;
        values.takeValueForKey(appValues.valueForKey(valueName), valueName);
    }

    public void takeValuesFromApplication() {
        _takeNameFromApplication();
        _takePortFromApplication();
View Full Code Here

    protected int intStatisticsValueForKey(String key, int defaultValue) {
        NSDictionary aStatsDict = statistics();

        if (aStatsDict != null) {
            try {
                String aValue = (String) aStatsDict.valueForKey(key);
                if (aValue != null) {
                    return Integer.parseInt(aValue);
                }
            } catch (Throwable ex) {
                // do nothing
View Full Code Here

    protected float floatStatisticsValueForKey(String key, float defaultValue) {
        NSDictionary aStatsDict = statistics();

        if (aStatsDict != null) {
            try {
                String aValue = (String) aStatsDict.valueForKey(key);
                if (aValue != null) {
                    return Float.parseFloat(aValue);
                }
            } catch (Throwable ex) {
                // do nothing
View Full Code Here

    @Override
    public void addCreateClauseForAttribute(EOAttribute attribute) {
      NSDictionary userInfo = attribute.userInfo();
      Object defaultValue = null;
      if (userInfo != null) {
        defaultValue = userInfo.valueForKey("er.extensions.eoattribute.default"); // deprecated key
        if (defaultValue == null) {
          defaultValue = userInfo.valueForKey("default");
        }
      }
      String sql;
View Full Code Here

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

            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));

                keyPathObjects.addObject(kp);
            }
View Full Code Here

            if (a!=null) userInfo=a.userInfo();
            else {
                EORelationship r=entity.relationshipNamed(lastKey);
                if (r!=null) userInfo=r.userInfo();
            }
            result= (String)(userInfo!=null ? userInfo.valueForKey("unit") : null);
        }
        return result;
    }

    /**
 
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.