Package com.webobjects.foundation

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


        NSArray entityNames = ercnSnapshot.shapshotsForUpdateGroupedByEntity().allKeys();
        EOEditingContext ec = new EOEditingContext();
        ec.lock();

        Enumeration entitiesEnumerator = entityNames.objectEnumerator();
        while (entitiesEnumerator.hasMoreElements()) {
            String entityName = (String)entitiesEnumerator.nextElement();
            if (! ERCNSnapshot.shouldSynchronizeEntity(entityName))   continue;

            EOEntity entity = EOModelGroup.defaultGroup().entityNamed(entityName);
View Full Code Here


            EOEntity entity = EOModelGroup.defaultGroup().entityNamed(entityName);
            EODatabaseContext dbContext = ERCNNotificationCoordinator.databaseContextForEntityNamed(entityName, ec);
            EODatabase database = dbContext.database();
            NSArray snapshots = (NSArray)ercnSnapshot.shapshotsForUpdateGroupedByEntity().objectForKey(entityName);
            Enumeration snapshotsEnumerator = snapshots.objectEnumerator();
            while (snapshotsEnumerator.hasMoreElements()) {
                NSDictionary snapshot = (NSDictionary)snapshotsEnumerator.nextElement();
                if (NSLog.debug.isEnabled())
                    NSLog.debug.appendln(ERCNNotificationCoordinator.LOG_HEADER + "Snapshot: " + snapshot);
                if (snapshot != null) {
View Full Code Here

                        int count = list.count();
                        EncodedArray array = new EncodedArray(encodeCount(count, Type.kCFBinaryPlistMarkerArray));
                        objectList.add(array);
   
                        // 2. write all values
                        for (Enumeration valuesEnum = list.objectEnumerator(); valuesEnum.hasMoreElements(); ) {
                            Object aValue = valuesEnum.nextElement();
                            array.addValueRef(encodeObject(aValue, objectList, uniquingTable));
                        }
            }
          break;
View Full Code Here

                        int count = list.count();
                        EncodedSet set = new EncodedSet(encodeCount(count, Type.kCFBinaryPlistMarkerSet));
                        objectList.add(set);
   
                        // 2. write all values
                        for (Enumeration valuesEnum = list.objectEnumerator(); valuesEnum.hasMoreElements(); ) {
                            Object aValue = valuesEnum.nextElement();
                            set.addValueRef(encodeObject(aValue, objectList, uniquingTable));
                        }
            }
          break;
View Full Code Here

                        delayedDependendKeysPerKey.put(rhsKey, recipientForNewKeys);
                    }
                }
                NSArray extraKeys=((ERDComputingAssignmentInterface)r.rhs()).dependentKeys(rhsKey);
                if (extraKeys!=null) {
                    for (Enumeration e6=extraKeys.objectEnumerator(); e6.hasMoreElements(); ) {
                        String k=(String)e6.nextElement();
                        _addKeyToVector(k, recipientForNewKeys);
                    }
                }
            } else if (r.rhs() instanceof DefaultAssignment) {
View Full Code Here

            log.debug("Loading url: " + url);
         
            if(url != null) {
                model = Services.dictionaryFromPathURL(url);
                NSArray rules = (NSArray)model.objectForKey("rules");
                Enumeration e = rules.objectEnumerator();
                boolean patchRules = ERXProperties.booleanForKeyWithDefault("er.directtoweb.ERXD2WModel.patchRules", true);
                while(e.hasMoreElements()) {
                    NSMutableDictionary dict = (NSMutableDictionary)e.nextElement();
                    if(patchRules) {
                        if(Rule.class.getName().equals(dict.objectForKey("class"))) {
View Full Code Here

          dbc = ERXEOAccessUtilities.databaseContextForEntityNamed(osc, entityName);
          dbcs.setObjectForKey(dbc, key);
        }
        EODatabase database = dbc.database();
        NSMutableDictionary snapshotsByGlobalID = new NSMutableDictionary();
        for (Enumeration snapshotsEnumerator = snapshots.objectEnumerator(); snapshotsEnumerator.hasMoreElements();) {
          NSDictionary snapshot = (NSDictionary) snapshotsEnumerator.nextElement();
          EOGlobalID globalID = entity.globalIDForRow(snapshot);
          snapshotsByGlobalID.setObjectForKey(snapshot, globalID);
        }
        if (snapshotsByGlobalID.count() > 0) {
View Full Code Here

            if (choices == null)
                log.warn("Choices was null for the list.  For now this means that an empty list will appear.");
            // FIXME: Might want to just fetch all of the eos if a choice isn't specified.
            NSArray nonLocallist = choices == null ? ERXConstant.EmptyArray : (NSArray)valueForKeyPath(choices);
            if (nonLocallist!=null) {
                for (Enumeration e=nonLocallist.objectEnumerator(); e.hasMoreElements();) {
                    nonSortedLocalList.addObject(EOUtilities.localInstanceOfObject(objectContext, (EOEnterpriseObject) e.nextElement()));
               
                NSArray sortArray=new NSArray(new EOSortOrdering(choicesSortKey(),
                                                                 EOSortOrdering.CompareAscending));
                _list=EOSortOrdering.sortedArrayUsingKeyOrderArray(nonSortedLocalList, sortArray);
View Full Code Here

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

    public WOComponent saveMoving() {
        handler().startReading();
        try {
            MHost mhost;
            NSArray hosts = siteConfig().hostArray();
            for (Enumeration enumeration = hosts.objectEnumerator(); enumeration.hasMoreElements(); ) {
                mhost = (MHost) enumeration.nextElement();
                handler().sendOverwriteToWotaskd(mhost);
            }
            return AdminApplicationsPage.create(context());
        } finally {
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.