Examples of containsObject()


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

            d2wContext().setPropertyKey(propertyKey);
            Object o = object().valueForKeyPath(keyPath + "." + d2wContext().valueForKey("keyWhenRelationship"));
            d2wContext().setPropertyKey(propertyKey);
            if (o instanceof NSArray) {
                NSArray array = (NSArray) o;
                return array.containsObject(value) ? Boolean.TRUE : Boolean.FALSE;
            }
            return (o != null && o.equals(value) ? Boolean.TRUE : Boolean.FALSE);
        }
        return Boolean.FALSE;
    }
View Full Code Here

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

  public boolean _isPrimaryKeyClassProperty() {
    NSArray pkAtts = _parent_primaryKeyAttributes();
    if (pkAtts == null)
      return false;
    if (!pkAtts.containsObject(this))
      return false;

    return _parent.classProperties().containsObject(this);
  }
View Full Code Here

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

        int count = pkAttributes.count();
        NSMutableDictionary<String, Object> nsmutabledictionary = new NSMutableDictionary<String, Object>(count);
        NSArray classPropertyNames = entity.classPropertyNames();
        while (count-- != 0) {
            String key = pkAttributes.objectAtIndex(count);
            if(!classPropertyNames.containsObject(key))
                return null;
            Object value = eo.valueForKey(key);
            if(value == null)
                return null;
            nsmutabledictionary.setObjectForKey(value, key);
View Full Code Here

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

        if (includeAttributes) {
          for (int i = attributes.count(); i-- > 0;) {
              EOAttribute att = (EOAttribute) attributes.objectAtIndex(i);
              String name = att.name();
              if (cpNames.containsObject(name) && !parentAttributeNames.containsObject(name)) {
                  ret.addObject(att);
              }
          }
        }
       
View Full Code Here

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

        NSArray keys = configuration.objectForKey(eo.entityName()).keys;
        NSDictionary committedSnapshotForObject = ec.committedSnapshotForObject(eo);
        NSDictionary changes = eo.changesFromSnapshot(committedSnapshotForObject);
        for (Enumeration e1 = changes.keyEnumerator(); e1.hasMoreElements();) {
            String key = (String) e1.nextElement();
            if (keys.containsObject(key)) {
                handleUpdate(ec, eo, key, committedSnapshotForObject.objectForKey(key), changes.objectForKey(key));
            }
        }
    }
View Full Code Here

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

                Number n=(Number)valueForBinding("condition");
                result=n!=null && n.intValue()!=0;
            } else {
                NSArray list=(NSArray)valueForBinding("list");
                Object item=valueForBinding("item");
                result=list!=null && item!=null && list.containsObject(item);
            }
            if (hasBinding("negate")) {
                Integer negate=(Integer)valueForBinding("negate");
                if (negate!=null && negate.intValue()!=0) result=!result;
            }
View Full Code Here

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

        NSArray availableLanguages = availableLanguages();
       
        Enumeration e = preferedLanguages.objectEnumerator();
        while (e.hasMoreElements()) {
            String aPreferedLanguage = (String)e.nextElement();
            if (availableLanguages.containsObject(aPreferedLanguage)) {
                _encoding = defaultEncodingForLanguage(aPreferedLanguage);
                break;
            }
        }
        if (_encoding == null)
View Full Code Here

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

    }

    public boolean isSelected() {
        if (_isSelected == null) {
            NSArray navigationState = navigationState().state();
            _isSelected=!isDisabled() && navigationState != null && navigationState.containsObject(navigationItem().name()) ? Boolean.TRUE : Boolean.FALSE;

        }
        return _isSelected.booleanValue();
    }
View Full Code Here

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

    }

    public boolean isSelected() {
        if (_isSelected == null) {
            NSArray navigationState = navigationState().state();
            _isSelected=!isDisabled() && navigationState != null && navigationState.containsObject(navigationItem().name()) ? Boolean.TRUE : Boolean.FALSE;

        }
        return _isSelected.booleanValue();
    }
View Full Code Here

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

          willChange();
          mutableValue.addObject(eo);
        }
      } else if ((value instanceof NSArray)) {
        NSArray immutableValue = (NSArray) value;
        if (!immutableValue.containsObject(eo)) {
          NSArray newArray = immutableValue.arrayByAddingObject(eo);
          takeValueForKey(newArray, key);
        }
      } else if (value == null) {
        NSMutableArray newArray = new NSMutableArray(eo);
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.