You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2015/09/10 18:12:29 UTC

[29/34] isis git commit: ISIS-1194: inlining postDeleteProcessingFor from FrameworkSynchronizer to PersistenceSession

ISIS-1194: inlining postDeleteProcessingFor from FrameworkSynchronizer to PersistenceSession


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/5d69af1b
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/5d69af1b
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/5d69af1b

Branch: refs/heads/ISIS-1194
Commit: 5d69af1b1bd26961c78b03658b3403871f71b926
Parents: 6748065
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Sep 10 16:49:03 2015 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Sep 10 16:49:03 2015 +0100

----------------------------------------------------------------------
 .../persistence/FrameworkSynchronizer.java      | 20 --------------------
 .../system/persistence/PersistenceSession.java  | 19 ++++++++++++++++++-
 2 files changed, 18 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/5d69af1b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/FrameworkSynchronizer.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/FrameworkSynchronizer.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/FrameworkSynchronizer.java
index 12ce154..b49a556 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/FrameworkSynchronizer.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/FrameworkSynchronizer.java
@@ -192,27 +192,7 @@ public class FrameworkSynchronizer {
         
     }
 
-    public void postDeleteProcessingFor(final Persistable pojo, final CalledFrom calledFrom) {
-        withLogging(pojo, new Runnable() {
-            @Override
-            public void run() {
-                ObjectAdapter adapter = persistenceSession.getAdapterFor(pojo);
-                if (adapter == null) {
-                    return;
-                }
-
-                // previously we called the removed callback (if any).
-                // however, this is almost certainly incorrect, because DN will not allow us
-                // to "touch" the pojo once deleted.
-                //
-                // CallbackFacet.Util.callCallback(adapter, RemovedCallbackFacet.class);
 
-
-            }
-        }, calledFrom);
-        
-    }
-    
     // /////////////////////////////////////////////////////////
     // Helpers
     // /////////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/isis/blob/5d69af1b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java
index d1f3b31..d408fb9 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java
@@ -1215,9 +1215,26 @@ public class PersistenceSession implements TransactionalResource, SessionScopedC
     //region > FrameworkSynchronizer delegate methods
 
     public void postDeleteProcessingFor(final Persistable pojo, final FrameworkSynchronizer.CalledFrom calledFrom) {
-        frameworkSynchronizer.postDeleteProcessingFor(pojo, calledFrom);
+        withLogging(pojo, new Runnable() {
+            @Override
+            public void run() {
+                ObjectAdapter adapter = getAdapterFor(pojo);
+                if (adapter == null) {
+                    return;
+                }
+
+                // previously we called the removed callback (if any).
+                // however, this is almost certainly incorrect, because DN will not allow us
+                // to "touch" the pojo once deleted.
+                //
+                // CallbackFacet.Util.callCallback(adapter, RemovedCallbackFacet.class);
+
+            }
+        }, calledFrom);
+
     }
 
+
     public void preDeleteProcessingFor(final Persistable pojo, final FrameworkSynchronizer.CalledFrom calledFrom) {
         frameworkSynchronizer.preDeleteProcessingFor(pojo, calledFrom);
     }