Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSDictionary


  }

  public static void listWithEntityName(String entityName,
                                        EOFetchSpecification fs) {
    EOControllerFactory f = EOControllerFactory.sharedControllerFactory();
    EOController controller = f.controllerWithSpecification(new NSDictionary(new Object[] { entityName,
                                                                                           EOControllerFactory.ListTask,
                                                                                           EOControllerFactory.TopLevelWindowQuestion },
                                                                             new Object[] { EOControllerFactory.EntitySpecification,
                                                                                           EOControllerFactory.TaskSpecification,
                                                                                           EOControllerFactory.QuestionSpecification }),
View Full Code Here


  }

  public static void listWithEntityName(String entityName,
                                        NSArray arrayOfEOs) {
    EOControllerFactory f = EOControllerFactory.sharedControllerFactory();
    EOController controller = f.controllerWithSpecification(new NSDictionary(new Object[] { entityName,
                                                                                           EOControllerFactory.ListTask,
                                                                                           EOControllerFactory.TopLevelWindowQuestion },
                                                                             new Object[] { EOControllerFactory.EntitySpecification,
                                                                                           EOControllerFactory.TaskSpecification,
                                                                                           EOControllerFactory.QuestionSpecification }),
View Full Code Here

    // }
    // catch(Exception e) {
    // throw new IllegalStateException("problem writing JDBCInfo.plist",e);
    // }

    NSDictionary jdbcInfo;
    // have a look at the JDBC connection URL to see if the flag has been
    // set to
    // specify that the hard-coded jdbcInfo information should be used.
    if (shouldUseBundledJdbcInfo()) {
      if (NSLog.debugLoggingAllowedForLevel(NSLog.DebugLevelDetailed)) {
View Full Code Here

      StringBuilder sql = new StringBuilder();
      sql.append(attribute.columnName());
      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 ");
          sql.append(formatValueForAttribute(defaultValue, attribute));
        }
View Full Code Here

  }

  public Object rawPrimaryKeyInTransaction() {
    Object result = rawPrimaryKey();
    if (result == null) {
      NSDictionary pk = primaryKeyDictionary(false);
      NSArray primaryKeyAttributeNames = primaryKeyAttributeNames();
      result = ERXArrayUtilities.valuesForKeyPaths(pk, primaryKeyAttributeNames);
      if (((NSArray) result).count() == 1)
        result = ((NSArray) result).lastObject();
    }
View Full Code Here

    String pk = ERXEOControlUtilities.primaryKeyStringForObject(this);
    return pk == null ? null : ERXCrypto.crypterForAlgorithm(ERXCrypto.BLOWFISH).encrypt(pk);
  }

  public Object foreignKeyForRelationshipWithKey(String rel) {
    NSDictionary d = EOUtilities.destinationKeyForSourceObject(editingContext(), this, rel);
    return d != null && d.count() > 0 ? d.allValues().objectAtIndex(0) : null;
  }
View Full Code Here

    if(entity().primaryKeyAttributeNames().contains(key)) {
      // Deleted object. Return null.
      if(editingContext() == null) {
        return null;
      }
      NSDictionary pkDict = EOUtilities.primaryKeyForObject(editingContext(), this);
      // New object. Return null.
      if(pkDict == null) {
        return null;
      }
      // Return value for key
      return pkDict.objectForKey(key);
    }
    return super.handleQueryWithUnboundKey(key);
  }
View Full Code Here

  {
    NSMutableDictionary tmp = null;

    if (hasBinding("jsonQueryDictionary") && valueForKey("jsonQueryDictionary") != null)
    {
      tmp = new NSMutableDictionary(valueForNSDictionaryBindings("jsonQueryDictionary", new NSDictionary("1", "any")));
    }
    else
    {
      tmp = new NSMutableDictionary("1", "any");
    }
View Full Code Here

      for (String language : availableLanguages()) {
      NSArray<String> languageArray = new NSArray<String>(language);
      URL url = ERXFileUtilities.pathURLForResourceNamed(selectedFilename, selectedFramework, languageArray);
      NSMutableDictionary dict = new NSMutableDictionary();
         for (Enumeration entries = data.objectEnumerator(); entries.hasMoreElements();) {
           NSDictionary entry = (NSDictionary) entries.nextElement();
           String key = (String) entry.objectForKey("key");
        Object value = entry.objectForKey(language);
        if (value != null && !value.equals(UNSET)) {
          dict.setObjectForKey(value, key);
        }
      }
         String result = ERXStringUtilities.stringFromDictionary(dict);
         NSDictionary newDict = (NSDictionary) NSPropertyListSerialization.propertyListFromString(result);
         if (!newDict.equals(dict)) {
           throw new IllegalStateException("Data wasn't equal when comparing before save");
         } else if (url != null) {
           ERXFileUtilities.stringToFile(result, new File(url.getFile()), ERXProperties.stringForKeyWithDefault("er.extensions.ERXLocalizationEditor.endoding", CharEncoding.UTF_16BE));
         }
      }
View Full Code Here

    response.appendContentString("new Ajax.InPlaceEditorWithEmptyText('");
    response.appendContentString(id);
    response.appendContentString("', '");
    response.appendContentString(actionUrl);
    response.appendContentString("',");
    NSDictionary options = createAjaxOptions(component);
    AjaxOptions.appendToResponse(options, response, context);
    response.appendContentString(");");
    AjaxUtils.appendScriptFooter(response);
  }
View Full Code Here

TOP

Related Classes of com.webobjects.foundation.NSDictionary

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.