Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSDictionary$_JavaNSDictionaryMapEntry


  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


            }
            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

   *            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

  public Class[] getSerializableClasses() {
    return _serializableClasses;
  }

  public Object marshall(SerializerState state, Object p, Object o) throws MarshallException {
    NSDictionary dictionary = (NSDictionary) o;
    JSONObject obj = new JSONObject();
    JSONObject dictionarydata = new JSONObject();
    if (ser.getMarshallClassHints()) {
      try {
        obj.put("javaClass", o.getClass().getName());
      }
      catch (JSONException e) {
        throw new MarshallException("javaClass not found!");
      }
    }
    try {
      obj.put("nsdictionary", dictionarydata);
      state.push(o, dictionarydata, "nsdictionary");
    }
    catch (JSONException e) {
      throw new MarshallException("Could not add nsdictionary to object: " + e.getMessage());
    }
    Object key = null;
    try {
      Enumeration keyEnum = dictionary.allKeys().objectEnumerator();
      while (keyEnum.hasMoreElements()) {
        key = keyEnum.nextElement();
        Object value = dictionary.objectForKey(key);
        String keyString = key.toString(); // only support String keys

        Object json = ser.marshall(state, dictionarydata, value, keyString);

        // omit the object entirely if it's a circular reference or duplicate
View Full Code Here

        }
        else {
          abdictionary.setObjectForKey(NSKeyValueCoding.NullValue, key);
        }
      }
      NSDictionary finalDictionary = abdictionary;
      if (immutableClone) {
        finalDictionary = abdictionary.immutableClone();
      }
      state.setSerialized(o, finalDictionary);
      return finalDictionary;
View Full Code Here

        if (entity!=null && lastKey!=null) {
            Object property=entity.attributeNamed(lastKey);
            property=property==null ? entity.relationshipNamed(lastKey) : property;
            //BOOGIE
            EOAttribute a=entity.attributeNamed(lastKey);
            NSDictionary userInfo=null;
            if (a!=null) userInfo=a.userInfo();
            else {
                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;
    }
View Full Code Here

        EOFetchSpecification spec = new EOFetchSpecification( entityName, null, null );
        spec.setRefreshesRefetchedObjects(refreshesCache);
        if( fetchLimit != null ) {
            spec.setFetchLimit( fetchLimit );
        }
        spec.setHints( new NSDictionary( expression, EODatabaseContext.CustomQueryExpressionHintKey ) );

        return ec.objectsWithFetchSpecification(spec);
    }
View Full Code Here

        EOFetchSpecification pkSpec = new EOFetchSpecification( entityName, null, null );
        pkSpec.setRefreshesRefetchedObjects(refreshesCache);
        pkSpec.setFetchesRawRows(true);
        pkSpec.setRawRowKeyPaths(entity.primaryKeyAttributeNames());
        pkSpec.setHints( new NSDictionary( expression, EODatabaseContext.CustomQueryExpressionHintKey ) );

        NSArray pkDicts = ec.objectsWithFetchSpecification(pkSpec);
        NSMutableArray pks = new NSMutableArray();
        String pkAtttributeName = entity.primaryKeyAttributes().lastObject().name();

        for ( Enumeration rowEnumerator = pkDicts.objectEnumerator(); rowEnumerator.hasMoreElements(); ) {
            NSDictionary row = (NSDictionary) rowEnumerator.nextElement();
            pks.addObject( row.objectForKey( pkAtttributeName ));
        }

        EOFetchSpecification spec = new EOFetchSpecification(entityName, null, sortOrderings);
        spec.setRefreshesRefetchedObjects( refreshesCache );
        return new ERXFetchSpecificationBatchIterator( spec, pks, ec, batchSize);
View Full Code Here

        EOSQLExpression expression = adaptorChannel.adaptorContext().adaptor().expressionFactory().expressionForEntity( entity );
        expression.setStatement( processedQueryString( query, expression, bindings ) );

        EOFetchSpecification spec = new EOFetchSpecification( entityName, null, null );
        spec.setFetchesRawRows(true);
        spec.setHints( new NSDictionary( expression, EODatabaseContext.CustomQueryExpressionHintKey ) );

        return ec.objectsWithFetchSpecification(spec);
    }
View Full Code Here

    public void modelFileDidChange(NSNotification n) {
        File file = (File)n.object();
        try {
            defaultLog.debug("Reading .plist for entity <"+entity()+">");

            NSDictionary userInfo = (NSDictionary)NSPropertyListSerialization.propertyListFromString(ERXFileUtilities.stringFromFile(file));
            entity().setUserInfo((NSDictionary)userInfo.objectForKey("userInfo"));
           
            _validationInfo = ERXValueUtilities.dictionaryValue(entity().userInfo().objectForKey("ERXValidation"));
            _validationQualiferCache = ERXMutableDictionary.synchronizedDictionary();
            _initialDefaultValues = null;
            readDefaultValues();
View Full Code Here

TOP

Related Classes of com.webobjects.foundation.NSDictionary$_JavaNSDictionaryMapEntry

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.