Examples of processRecentChanges()


Examples of com.webobjects.eocontrol.EOEditingContext.processRecentChanges()

       
        public void editingContextWillSaveChanges(NSNotification n) {
            EOEditingContext ec = (EOEditingContext) n.object();
                    boolean isNestedEditingContext = (ec.parentObjectStore() instanceof EOEditingContext);

                    ec.processRecentChanges(); // need to do this to make sure the updated objects list is current

            if (ec.hasChanges()) {
                NSNotificationCenter.defaultCenter().postNotification(ERXExtensions.objectsWillChangeInEditingContext, ec);
                // we don't need to lock ec because we can assume that we're locked
                // before this method is called, but we do need to lock our parent
View Full Code Here

Examples of com.webobjects.eocontrol.EOEditingContext.processRecentChanges()

            EOEditingContext ec = (EOEditingContext) n.object();
            if (ec.parentObjectStore() == ec.rootObjectStore()) {

                String notificationName = n.name();
                if (notificationName.equals(ERXEC.EditingContextWillSaveChangesNotification)) {
                    ec.processRecentChanges();
                    NSArray inserted = ec.insertedObjects();
                    NSArray updated = ec.updatedObjects();
                    updated = ERXArrayUtilities.arrayMinusArray(updated, inserted);
                    NSArray deleted = ec.deletedObjects();
View Full Code Here

Examples of com.webobjects.eocontrol.EOEditingContext.processRecentChanges()

            EOEditingContext ec = (EOEditingContext) n.object();
            if (ec.parentObjectStore() == ec.rootObjectStore()) {

                String notificationName = n.name();
                if (notificationName.equals(ERXEC.EditingContextWillSaveChangesNotification)) {
                    ec.processRecentChanges();
                    NSArray inserted = ec.insertedObjects();
                    NSArray updated = ec.updatedObjects();
                    updated = ERXArrayUtilities.arrayMinusArray(updated, inserted);
                    NSArray deleted = ec.deletedObjects();
View Full Code Here

Examples of com.webobjects.eocontrol.EOEditingContext.processRecentChanges()

    public void handleSave(NSNotification n) {
        if (configuration.count() == 0)
            return;
        EOEditingContext ec = (EOEditingContext) n.object();
        if (ec.parentObjectStore() instanceof EOObjectStoreCoordinator) {
            ec.processRecentChanges();
            NSArray<EOEnterpriseObject> insertedObjects = ec.insertedObjects().immutableClone();
            for (EOEnterpriseObject eo : insertedObjects) {
                if(ERCAuditTrailEntry.clazz.entityName().equals(eo.entityName())) {
                    ec.deleteObject(eo);
                }
View Full Code Here

Examples of com.webobjects.eocontrol.EOEditingContext.processRecentChanges()

                }
                if(ERCAuditTrail.clazz.entityName().equals(eo.entityName())) {
                    ec.deleteObject(eo);
                }
            }
            ec.processRecentChanges();
            NSArray updatedObjects = ec.updatedObjects();
            NSArray deletedObjects = ec.deletedObjects();
            handleSave(ec, EOEditingContext.InsertedKey, insertedObjects);
            handleSave(ec, EOEditingContext.UpdatedKey, updatedObjects);
            handleSave(ec, EOEditingContext.DeletedKey, deletedObjects);
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.