Examples of parentObjectStore()


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

     *
     * @param n NSNotification with EOEditingContext as the object and a dictionary of changes in the userInfo
     */
    public void editingContextDidSaveChanges(NSNotification n) {
        EOEditingContext ec = (EOEditingContext) n.object();
        if(_applicationDidFinishInitialization && ec.parentObjectStore() instanceof EOObjectStoreCoordinator) {
          NSArray<T> releventsInsertedEOs = relevantChanges(n.userInfo(), EOEditingContext.InsertedKey);
          NSArray<T> releventsUpdatedEOs = relevantChanges(n.userInfo(), EOEditingContext.UpdatedKey);
          NSArray<T> releventsDeletedEOs = relevantChanges(n.userInfo(), EOEditingContext.DeletedKey);
          if (_resetOnChange) {
            if (releventsInsertedEOs.count() > 0 || releventsUpdatedEOs.count() > 0 || releventsDeletedEOs.count() > 0) {
View Full Code Here

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

   *
   * @param n
   */
  public void editingContextDidSaveChanges(NSNotification n) {
    EOEditingContext ec = (EOEditingContext) n.object();
    if (ec.parentObjectStore() instanceof EOObjectStoreCoordinator) {
      NSArray<T> entitiesInserted = relevantChanges(ec, n.userInfo(), EOEditingContext.InsertedKey);
      NSArray<T> entitiesUpdated = null;
      NSArray<T> entitiesDeleted = null;
      if (entitiesInserted.count() == 0 || _trackAllChanges) {
        entitiesUpdated = relevantChanges(ec, n.userInfo(), EOEditingContext.UpdatedKey);
View Full Code Here

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

     */
    public static class Observer {
       
        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);
View Full Code Here

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

            }
       }

        public void editingContextDidSaveChanges(NSNotification n) {
            EOEditingContext ec = (EOEditingContext) n.object();
            final boolean isNestedEditingContext = (ec.parentObjectStore() instanceof EOEditingContext);
           
            NSArray insertedObjects = (NSArray)n.userInfo().objectForKey("inserted");
            NSArray updatedObjects = (NSArray)n.userInfo().objectForKey("updated");
            NSArray deletedObjects = (NSArray)n.userInfo().objectForKey("deleted");
           
View Full Code Here

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

    @Override
    public void _run() {
      EOEditingContext ec = newEditingContext();
      ec.lock();
      try {
        log.info("Started child in " + Thread.currentThread().getName() + " with OSC " + ec.parentObjectStore());
       
        TaskInfo taskInfo = (TaskInfo) ec.faultForGlobalID(_childTaskInfoGID, ec);
       
        while (_childCurrentNumber <= _childToNumber) {
          ResultItem resultItem = ERXEOControlUtilities.createAndInsertObject(ec, ResultItem.class);
View Full Code Here

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

    protected class AttributeTransactionHandler extends TransactionHandler {
       
        @Override
        public void _handleChanges(NSNotification n) {
            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();
View Full Code Here

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

        }

        @Override
    public void _handleChanges(NSNotification n) {
            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();
View Full Code Here

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

        NSArray objects = NSArray.EmptyArray;
        int i;
        while (!(objectStore instanceof EOObjectStoreCoordinator)) {
          final EOEditingContext theEC = (EOEditingContext)objectStore;
          parentEditingContexts.addObject(theEC);
          objectStore = theEC.parentObjectStore();
        }

        i = parentEditingContexts.count();
        while (i-- > 0) {
          EOEditingContext theEC = (EOEditingContext)parentEditingContexts.objectAtIndex(i);
View Full Code Here

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

    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.parentObjectStore()

     * and object of the given entity were changed.
     * @param n
     */
    public void editingContextDidSaveChanges(NSNotification n) {
        EOEditingContext ec = (EOEditingContext) n.object();
        if(ec.parentObjectStore() instanceof EOObjectStoreCoordinator) {
            if(!hadRelevantChanges(n.userInfo(), EOEditingContext.InsertedKey)) {
                if(!hadRelevantChanges(n.userInfo(), EOEditingContext.UpdatedKey)) {
                    if(!hadRelevantChanges(n.userInfo(), EOEditingContext.DeletedKey)) {
                        return;
                    }
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.