Examples of objectEnumerator()


Examples of com.webobjects.foundation.NSArray.objectEnumerator()

        protected void registerDescriptionForClass(Class class1) {
            NSArray entities = (NSArray)_entitiesForClass.objectForKey(class1.getName());
            if (entities != null) {
                if (log.isDebugEnabled())
                    log.debug("Registering descriptions for class: " + class1.getName() + " found entities: " + entities.valueForKey("name"));
                for (Enumeration e = entities.objectEnumerator(); e.hasMoreElements();) {
                    EOEntity entity = (EOEntity)e.nextElement();
                    ERXEntityClassDescription cd = newClassDescriptionForEntity(entity);
                    EOClassDescription.registerClassDescription(cd, class1);
                    _setClassDescriptionOnEntity(entity, cd);
                }
View Full Code Here

Examples of com.webobjects.foundation.NSArray.objectEnumerator()

    protected void _removeOrderingWithKey(String aKey) {
        int anIndex = 0;
        EOSortOrdering ordering;
        NSArray orderingArray = _sortOrderingArray();
        Enumeration anEnumerator = orderingArray.objectEnumerator();
        while (anEnumerator.hasMoreElements()) {
            ordering = (EOSortOrdering) anEnumerator.nextElement();
            if (aKey.equals(ordering.key())) {
                ((NSMutableArray)orderingArray).removeObjectAtIndex(anIndex);
                return ;
View Full Code Here

Examples of com.webobjects.foundation.NSArray.objectEnumerator()

    catch (JSONException e) {
      throw new MarshallException("Error setting nsarray: " + e);
    }
    int index = 0;
    try {
      Enumeration e = nsarray.objectEnumerator();
      while (e.hasMoreElements()) {
        Object json = ser.marshall(state, arr, e.nextElement(), Integer.valueOf(index));
        if (JSONSerializer.CIRC_REF_OR_DUPLICATE != json) {
          arr.put(json);
        }
View Full Code Here

Examples of com.webobjects.foundation.NSArray.objectEnumerator()

                    if(o != null) {
                        if(o instanceof EOEnterpriseObject) {
                            ERXEOControlUtilities.addObjectToObjectOnBothSidesOfRelationshipWithKey((EOEnterpriseObject)o, eo, key);
                        } else if(o instanceof NSArray) {
                            NSArray newObjects = (NSArray)o;
                            for(Enumeration e = newObjects.objectEnumerator(); e.hasMoreElements();) {
                                ERXEOControlUtilities.addObjectToObjectOnBothSidesOfRelationshipWithKey((EOEnterpriseObject)e.nextElement(), eo, key);
                            }
                        } else {
                            defaultLog.warn("setValueInObject: Object is neither an EO nor an array");
                        }
View Full Code Here

Examples of com.webobjects.foundation.NSArray.objectEnumerator()

            Object selection = null;
            if (strValue != null) {
          NSArray values = (NSArray) valueForBinding("list");
            int maxItems = maxItems();
            int itemsCount = 0;
            for(Enumeration e = values.objectEnumerator(); e.hasMoreElements() && itemsCount++ < maxItems;) {
                Object value = e.nextElement();
                  setValueForBinding(value, "item");
                String displayString = displayStringForValue(value);
                if (ERXStringUtilities.stringEqualsString(displayString, strValue)) {
                  selection = value;
View Full Code Here

Examples of com.webobjects.foundation.NSArray.objectEnumerator()

    protected void _addUpdateResponseToErrorArray(NSDictionary updateTypeResponse, String responseKey,
            NSMutableArray errorArray) {
        NSArray aResponse = (NSArray) updateTypeResponse.valueForKey(responseKey);
        if (aResponse != null) {
            for (Enumeration e = aResponse.objectEnumerator(); e.hasMoreElements();) {
                NSDictionary aDict = (NSDictionary) e.nextElement();
                String errorMessage = (String) aDict.valueForKey("errorMessage");
                if (errorMessage != null) {
                    errorArray.addObject(errorMessage);
                }
View Full Code Here

Examples of com.webobjects.foundation.NSArray.objectEnumerator()

  public NSDictionary editors() {
    NSMutableDictionary result = new NSMutableDictionary();
    NSArray editors = (NSArray) componentConfiguration().objectForKey("editors");
    if (editors != null) {
      for (Enumeration iter = editors.objectEnumerator(); iter.hasMoreElements();) {
        String key = (String) iter.nextElement();
        NSDictionary dict = (NSDictionary) configuration.editors().objectForKey(key);
        if (dict != null) {
          result.setObjectForKey(dict, key);
        }
View Full Code Here

Examples of com.webobjects.foundation.NSArray.objectEnumerator()

                NSDictionary entries = relationshipCacheEntriesForEntity(sourceGid.entityName(), handler.relationshipName());
                if(entries != null) {
                    NSArray gids = (NSArray) entries.objectForKey(sourceGid);
                    if(gids != null) {
                        NSMutableArray eos = new NSMutableArray(gids.count());
                        for (Enumeration enumerator = gids.objectEnumerator(); enumerator.hasMoreElements();) {
                            EOGlobalID gid = (EOGlobalID) enumerator.nextElement();
                            EOEnterpriseObject eo = ec.faultForGlobalID(gid, ec);
                            eos.addObject(eo);
                        }
                        EOFaultHandler.clearFault(obj);
View Full Code Here

Examples of com.webobjects.foundation.NSArray.objectEnumerator()

        EOEntity joinEntity=context.entity();
        NSArray relationships=joinRelationshipsForJoinEntity(joinEntity);
       
        EORelationship destinationRelationship=null;
        String originEntityName=(String)context.valueForKeyPath("object.entityName");
        for (Enumeration e=relationships.objectEnumerator(); e.hasMoreElements();) {
            EORelationship r=(EORelationship)e.nextElement();
            if (!originEntityName.equals(r.destinationEntity().name())) {
                destinationRelationship=r;
                break;
            }
View Full Code Here

Examples of com.webobjects.foundation.NSArray.objectEnumerator()

                        keyChoices.addObject(new ERXKeyValuePair(key, ERXLocalizer.currentLocalizer().localizedStringForKeyWithDefault(value)));
                    }
                } else if(choices instanceof NSDictionary) {
                    NSArray keys = ((NSDictionary)choices).allKeys();
                    keys = ERXArrayUtilities.sortedArraySortedWithKey(keys, "toString");
                    for(Enumeration e = keys.objectEnumerator(); e.hasMoreElements(); ) {
                        String key = (String)e.nextElement();
                        String value = (String)((NSDictionary)choices).objectForKey(key);
                        keyChoices.addObject(new ERXKeyValuePair(key, ERXLocalizer.currentLocalizer().localizedStringForKeyWithDefault(value)));
                    }
                }
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.