Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSSet


                value = NSKeyValueCodingAdditions.Utility.valueForKeyPath(eo, key);
                if (value instanceof NSArray) {
                    // here we will only handle to-many (NSArray).
                    // so we try to compare 'n' values with 'm' objects.
                    // we use set intersection
                    NSSet vs = new NSSet((NSArray) value);
                    NSSet vss = new NSSet(values());
                    return vs.intersectsSet(vss);
                }
            }
        } else {
            value = NSKeyValueCodingAdditions.Utility.valueForKeyPath(object, key);
View Full Code Here


                    // ** serious problem here. Raise an exception?
                }
            }
            // dt: this can be used with a subset as array for the checkboxes.
            if (relationshipName() != null && relationshipName().length() > 0 && relationshipOwner() != null) {
                NSSet objectsToRemove = new NSSet(_selections).setBySubtractingSet(new NSSet(aSelectionsArray));
                NSSet objectsToAdd = new NSSet(aSelectionsArray).setBySubtractingSet(new NSSet(_selections));
                EOEnterpriseObject owner = relationshipOwner();
                String relname = relationshipName();
                for (Enumeration e = objectsToRemove.objectEnumerator(); e.hasMoreElements();) {
                    EOEnterpriseObject eo = (EOEnterpriseObject)e.nextElement();
                    owner.removeObjectFromBothSidesOfRelationshipWithKey(eo, relname);
                }
                for (Enumeration e = objectsToAdd.objectEnumerator(); e.hasMoreElements();) {
                    EOEnterpriseObject eo = (EOEnterpriseObject)e.nextElement();
                    owner.addObjectToBothSidesOfRelationshipWithKey(eo, relname);
                }
               
            } else {
View Full Code Here

TOP

Related Classes of com.webobjects.foundation.NSSet

Copyright © 2018 www.massapicom. 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.