Examples of containsObject()


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

              }
            }
          }
          else {
            NSArray values = (NSArray) eo.valueForKey(inverse);
            if (values != null && !values.containsObject(object)) {
              boolean oldUpdateInverseRelationship = eo._setUpdateInverseRelationships(false);
              try {
                eo.addObjectToPropertyWithKey(object, inverse);
              }
              finally {
View Full Code Here

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

              }
            }
          }
          else {
            NSArray values = (NSArray) eo.valueForKey(inverse);
            if (values.containsObject(object)) {
              boolean oldUpdateInverseRelationship = eo._setUpdateInverseRelationships(false);
              try {
                eo.removeObjectFromPropertyWithKey(object, inverse);
              }
              finally {
View Full Code Here

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

            ERXGenericRecord.checkMatchingEditingContexts(object, key, newValueEO);

            //object._superTakeValueForKey(value, key);
            if (newValueEO.isToManyKey(inverse)) {
              NSArray inverseOldValues = (NSArray) newValueEO.valueForKey(inverse);
              if (inverseOldValues == null || !inverseOldValues.containsObject(object)) {
                boolean oldUpdateInverseRelationship = newValueEO._setUpdateInverseRelationships(false);
                try {
                  newValueEO.addObjectToPropertyWithKey(object, inverse);
                }
                finally {
View Full Code Here

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

          else {
            //object._superTakeValueForKey(null, key);
            if (oldValueEO != null) {
              if (oldValueEO.isToManyKey(inverse)) {
                NSArray inverseOldValues = (NSArray) oldValueEO.valueForKey(inverse);
                if (inverseOldValues != null && inverseOldValues.containsObject(object)) {
                  boolean oldUpdateInverseRelationship = oldValueEO._setUpdateInverseRelationships(false);
                  try {
                    oldValueEO.removeObjectFromPropertyWithKey(object, inverse);
                  }
                  finally {
View Full Code Here

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

                            }
                        }
                    } else {
                        for(Enumeration attributes = relationship.sourceAttributes().objectEnumerator(); attributes.hasMoreElements(); ) {
                            EOAttribute attribute = (EOAttribute)attributes.nextElement();
                            if(!attribute.allowsNull() && !primaryKeys.containsObject(attribute)) {
                                handleOptionalRelationshipError(eoentity, relationship, attribute);
                            }
                        }
                    }
                }
View Full Code Here

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

            }
            NSArray pickedObjects = (NSArray)eo.valueForKeyPath(relationshipName +"." + pickRelationshipName +".@unique");
            EOEntity entity = ERXEOAccessUtilities.destinationEntityForKeyPath(ERXEOAccessUtilities.entityForEo(eo), relationshipName);
            for(Enumeration e = selectedObjects.objectEnumerator(); e.hasMoreElements(); ) {
                EOEnterpriseObject selectedObject = (EOEnterpriseObject)e.nextElement();
                if(!pickedObjects.containsObject(selectedObject)) {
                    EOEnterpriseObject relatedObject = ERXEOControlUtilities.createAndInsertObject(ec, entity.name());
                    relatedObject.addObjectToBothSidesOfRelationshipWithKey(selectedObject, pickRelationshipName);
                    eo.addObjectToBothSidesOfRelationshipWithKey(relatedObject, relationshipName);
                }
            }
View Full Code Here

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

            page.displayGroup.setObjectArray(instancesArray);
        }
        if (selected != null) {
            NSMutableArray<MInstance> active = new NSMutableArray<MInstance>();
            for (MInstance instance : selected) {
                if (instancesArray.containsObject(instance)) {
                    active.addObject(instance);
                }
            }
            page.displayGroup.setSelectedObjects(active);
        } else {
View Full Code Here

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

                    log.debug("removing: "+ anItem);
            }
        }
        for (Enumeration e=selections().objectEnumerator(); e.hasMoreElements();){
            EOEnterpriseObject anItem = (EOEnterpriseObject)e.nextElement();
            if(!existingListArray.containsObject(anItem)){
                subObject.addObjectToBothSidesOfRelationshipWithKey(anItem, subKey);
                if (log.isDebugEnabled())
                    log.debug("adding: "+ anItem);
            }
        }
View Full Code Here

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

        return _listComponent;
    }

    public WOComponent add() {
        NSArray existingList=(NSArray)objectKeyPathValue();
        if (!existingList.containsObject(item)&&item!=null)
            object().addObjectToBothSidesOfRelationshipWithKey(item,key());       
        return listComponent();
    }
}
View Full Code Here

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

      NSMutableArray mutableAttributesUsedForLocking = attributesUsedForLocking.mutableClone();
      if (attributes != null) {
        for (Enumeration e = attributes.objectEnumerator(); e.hasMoreElements();) {
          EOAttribute attribute = (EOAttribute) e.nextElement();
          boolean isClassProperty = classProperties.containsObject(attribute);
          boolean isUsedForLocking = attributesUsedForLocking.containsObject(attribute);
          Object languagesObject = attribute.userInfo() != null ? attribute.userInfo().objectForKey(LANGUAGES_KEY) : null;
          if (languagesObject != null && !(languagesObject instanceof NSArray)) {
            languagesObject = entity.model().userInfo() != null ? entity.model().userInfo().objectForKey(LANGUAGES_KEY) : null;
            if(languagesObject == null) {
              languagesObject = ERXProperties.arrayForKey(LANGUAGES_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.