Package com.webobjects.foundation

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


      }
      result = map;
    } else if (obj instanceof NSArray) {
      List list = new LinkedList();
      NSArray nsArray = (NSArray) obj;
      Enumeration valuesEnum = nsArray.objectEnumerator();
      while (valuesEnum.hasMoreElements()) {
        Object value = valuesEnum.nextElement();
        value = toJavaCollections(value);
        list.add(value);
      }
View Full Code Here


      }
      result = map;
    } else if (obj instanceof NSArray) {
      List list = new LinkedList();
      NSArray nsArray = (NSArray) obj;
      Enumeration valuesEnum = nsArray.objectEnumerator();
      while (valuesEnum.hasMoreElements()) {
        Object value = valuesEnum.nextElement();
        value = toJavaCollections(value);
        list.add(value);
      }
View Full Code Here

    super.appendToResponse(response, context);
    WOComponent component = context.component();
    NSArray updateContainerIDs = (NSArray) _updateContainerIDs.valueInComponent(component);
    if (updateContainerIDs != null && updateContainerIDs.count() > 0) {
      AjaxUtils.appendScriptHeader(response);
      Enumeration updateContainerIDEnum = updateContainerIDs.objectEnumerator();
      while (updateContainerIDEnum.hasMoreElements()) {
        String updateContainerID = (String) updateContainerIDEnum.nextElement();
        // PROTOTYPE FUNCTIONS
        Object evalScripts = ERXComponentUtilities.valueForBinding("evalScripts", "true", _associations, component);
        response.appendContentString("if ($wi('" + updateContainerID + "')) { ");
View Full Code Here

            NSArray list=(NSArray)valueForBinding("list");
            _itemsPerSection=new NSMutableDictionary();
            if (list!=null) {
                boolean ignoreNulls = booleanValueForBinding("ignoreNulls", false);
               
                for (Enumeration e=list.objectEnumerator(); e.hasMoreElements();) {
                    Object item=e.nextElement();
                    if(log.isDebugEnabled()) log.debug("item = "+item);
                   
                    // push value up, so parent can tell us the group
                    setValueForBinding(item,"item");
View Full Code Here

    if (declarationBodyLength <= 2) {
      return associations;
    }
    trimmedDeclarationBody = trimmedDeclarationBody.substring(1, declarationBodyLength - 1).trim();
    NSArray bindings = NSArray.componentsSeparatedByString(trimmedDeclarationBody, ";");
    Enumeration bindingsEnum = bindings.objectEnumerator();
    do {
      if (!bindingsEnum.hasMoreElements()) {
        break;
      }
      String binding = ((String) bindingsEnum.nextElement()).trim();
View Full Code Here

              try {
              ERXFetchSpecification fetchSpec = new ERXFetchSpecification(entityName(), qualifier(), null);
              fetchSpec.setRefreshesRefetchedObjects(true);
              fetchSpec.setIsDeep(true);
              NSArray objects = ec.objectsWithFetchSpecification(fetchSpec);
                  for (Enumeration enumeration = objects.objectEnumerator(); enumeration.hasMoreElements();) {
                      T eo = (T) enumeration.nextElement();
                      addObject(eo);
                  }
              } finally {
                  ec.unlock();
View Full Code Here

        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);
View Full Code Here

        if( positions.count() != bindings.length ) {
            throw new RuntimeException("Binding placeholders count (" + positions.count() + ") does not match binding wrappers count (" + bindings.length + ").");
        }

        for ( Enumeration positionEnumerator = positions.objectEnumerator(); positionEnumerator.hasMoreElements(); ) {
            Integer position = (Integer) positionEnumerator.nextElement();
            if( position > currentOffset ) {
                processedQueryBuffer.append( query.substring( currentOffset, position ) );
            }
            ERXSQLBinding binding = bindings[bindingCount];
View Full Code Here

   */
  @SuppressWarnings("unchecked")
  protected NSArray<T> relevantChanges(EOEditingContext editingContext, NSDictionary dict, String key) {
    NSArray allObjects = (NSArray) dict.objectForKey(key);
    NSMutableArray<T> changedObjects = new NSMutableArray<T>();
    for (Enumeration enumeration = allObjects.objectEnumerator(); enumeration.hasMoreElements();) {
      EOEnterpriseObject eo = (EOEnterpriseObject) enumeration.nextElement();
      String changedEntityName = eo.entityName();
      if (isRelevant(editingContext, changedEntityName)) {
        changedObjects.addObject((T) eo);
        if (!_trackAllChanges) {
View Full Code Here

                "displayNameForProperty", "propertyKey"});
        _componentLevelKeys = new NSMutableArray();
        if(componentKeys != null) {
            _componentLevelKeys = componentKeys.mutableClone();
        }
        for(Enumeration e = keys.objectEnumerator(); e.hasMoreElements(); ) {
          String key = (String)e.nextElement();
          if(!_componentLevelKeys.containsObject(key)) {
            _componentLevelKeys.addObject(key);
          }
        }
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.