Examples of NSDictionary


Examples of com.webobjects.foundation.NSDictionary

      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

Examples of com.webobjects.foundation.NSDictionary

  }

  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

Examples of com.webobjects.foundation.NSDictionary

    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

Examples of com.webobjects.foundation.NSDictionary

    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

Examples of com.webobjects.foundation.NSDictionary

  {
    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

Examples of com.webobjects.foundation.NSDictionary

      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

Examples of com.webobjects.foundation.NSDictionary

    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

Examples of com.webobjects.foundation.NSDictionary

  private static WOElement _componentReferenceWithClassNameDeclarationAndTemplate(String s, WODeclaration wodeclaration, WOElement woelement, NSArray nsarray) throws ClassNotFoundException {
    WOComponentReference wocomponentreference = null;
    WOComponentDefinition wocomponentdefinition = WOApplication.application()._componentDefinition(s, nsarray);
    if (wocomponentdefinition != null) {
      NSDictionary nsdictionary = wodeclaration.associations();
      wocomponentreference = wocomponentdefinition.componentReferenceWithAssociations(nsdictionary, woelement);
    }
    else {
      throw new ClassNotFoundException("Cannot find class or component named \'" + s + "\" in runtime or in a loadable bundle");
    }
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary

            }
            result.append(context().directActionURLForActionNamed(anActionName, (NSDictionary)valueForBinding("queryDictionary")));
            ERXExtensions.addRandomizeDirectActionURL(result);
        }
       
        NSDictionary urlParameters = (NSDictionary)valueForBinding("urlParameters");
        if (urlParameters != null) {
          result.append(result.toString().indexOf('?') > - 1 ? '&' : '?');
          result.append(ERXDictionaryUtilities.queryStringForDictionary(urlParameters, null));
        }
       
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary

   *            the id of the progress to retrieve
   * @return the matching progess object (or null)
   */
  public static AjaxProgress progress(WOSession session, String id) {
    AjaxProgress progress = null;
    NSDictionary progresses = (NSDictionary) session.objectForKey(AjaxProgressBar.AJAX_PROGRESSES_KEY);
    if (progresses != null) {
      progress = (AjaxProgress) progresses.objectForKey(id);
    }
    return progress;
  }
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.