Package com.webobjects.foundation

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


          willChange();
          mutableValue.removeObject(eo);
        }
      } else if ((value instanceof NSArray)) {
        NSArray immutableValue = (NSArray) value;
        if (immutableValue.containsObject(eo)) {
          NSMutableArray newArray = new NSMutableArray(immutableValue);

          newArray.removeObject(eo);
          takeValueForKey(newArray, key);
        }
View Full Code Here


        index = selectionPath.indexOfObject(e);
        if (index != NSArray.NotFound)
            return index;

        children = rootEventList();
        if (children.containsObject(e))
            return 0;

        int count = selectionPath.count();
        for (i = 0, n = count; i < n; i++) {
            children = (NSArray)cache.objectForKey(selectionPath.objectAtIndex(i));
View Full Code Here

        for (i = 0, n = count; i < n; i++) {
            children = (NSArray)cache.objectForKey(selectionPath.objectAtIndex(i));
            if (null==children)
                break;

            if (children.containsObject(e))
                return i+1;
        }

        return -1;
    }
View Full Code Here

                    }
                }
                setSelectedParents(parents);
            }

            if(childFormValues.containsObject("WONoSelectionString")) {
                NSArray children = (NSArray)parentSelection().valueForKeyPath(parentToChildrenRelationshipName());
                if(parentFormValues.containsObject("WONoSelectionString")) {
                    setChildrenSelection(null);
                } else {
                    if(!multiple()) {
View Full Code Here

     *
     * @return true if the application is deployed as a servlet
     */
    public boolean isDeployedAsServlet() {
        NSArray frameworkNames = (NSArray)NSBundle.frameworkBundles().valueForKey("name");
        return frameworkNames.containsObject("JavaWOJSPServlet");
    }
       
}
View Full Code Here

        NSArray selections = selections();
        for (Enumeration keysEnum = allValuesDict.allKeys().objectEnumerator(); keysEnum.hasMoreElements();) {
            Integer key = (Integer)keysEnum.nextElement();
            String displayName = (String)allValuesDict.objectForKey(key);
            Object currentObject = sortedValues.objectAtIndex(key);
            if (!selections.containsObject(currentObject)) {
                sb.append("\t<option value=\"").append(key).append("\">").append(displayName).append("</option>\n");
            }
        }
        sb.append("</select>");
        return sb.toString();
View Full Code Here

  public void testAllObjects() {
      ERXEnterpriseObjectCache<Company> cache = new ERXEnterpriseObjectCache<Company>(Company.ENTITY_NAME, Company.NAME_KEY, null, 0);
      cache.setFetchInitialValues(true);

      NSArray allObjects = cache.allObjects(editingContext);
      assertTrue(allObjects.containsObject(c1));
      assertTrue(allObjects.containsObject(c2));
     
      allObjects = cache.allObjects(editingContext, Company.NAME.contains("Test"));
      assertFalse(allObjects.containsObject(c1));
      assertTrue(allObjects.containsObject(c2));
View Full Code Here

      ERXEnterpriseObjectCache<Company> cache = new ERXEnterpriseObjectCache<Company>(Company.ENTITY_NAME, Company.NAME_KEY, null, 0);
      cache.setFetchInitialValues(true);

      NSArray allObjects = cache.allObjects(editingContext);
      assertTrue(allObjects.containsObject(c1));
      assertTrue(allObjects.containsObject(c2));
     
      allObjects = cache.allObjects(editingContext, Company.NAME.contains("Test"));
      assertFalse(allObjects.containsObject(c1));
      assertTrue(allObjects.containsObject(c2));
     
View Full Code Here

      NSArray allObjects = cache.allObjects(editingContext);
      assertTrue(allObjects.containsObject(c1));
      assertTrue(allObjects.containsObject(c2));
     
      allObjects = cache.allObjects(editingContext, Company.NAME.contains("Test"));
      assertFalse(allObjects.containsObject(c1));
      assertTrue(allObjects.containsObject(c2));
     
      cache.stop();
    }
 
View Full Code Here

      assertTrue(allObjects.containsObject(c1));
      assertTrue(allObjects.containsObject(c2));
     
      allObjects = cache.allObjects(editingContext, Company.NAME.contains("Test"));
      assertFalse(allObjects.containsObject(c1));
      assertTrue(allObjects.containsObject(c2));
     
      cache.stop();
    }
 
  @Override
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.