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/15 08:03:10 UTC
[05/50] [abbrv] isis git commit: ISIS-1194: removing
PersistenceSession logging for those methods calling withLogging(Runnable)
...
ISIS-1194: removing PersistenceSession logging for those methods calling withLogging(Runnable) ...
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/61ebb2fb
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/61ebb2fb
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/61ebb2fb
Branch: refs/heads/master
Commit: 61ebb2fb6ec3379ae780dcdfc081c84d2bdf5187
Parents: 16a380a
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Sep 11 18:29:50 2015 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Sep 14 07:35:50 2015 +0100
----------------------------------------------------------------------
.../system/persistence/PersistenceSession.java | 36 +++++++-------------
1 file changed, 12 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/61ebb2fb/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 79dc26f..b18470d 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
@@ -1239,7 +1239,7 @@ public class PersistenceSession implements TransactionalResource, SessionScopedC
//region > FrameworkSynchronizer delegate methods
public void postDeleteProcessingFor(final Persistable pojo) {
- withLogging(pojo, new Runnable() {
+ new Runnable() {
@Override
public void run() {
ObjectAdapter adapter = getAdapterFor(pojo);
@@ -1254,13 +1254,13 @@ public class PersistenceSession implements TransactionalResource, SessionScopedC
// CallbackFacet.Util.callCallback(adapter, RemovedCallbackFacet.class);
}
- });
+ }.run();
}
public void preDeleteProcessingFor(final Persistable pojo) {
- withLogging(pojo, new Runnable() {
+ new Runnable() {
@Override
public void run() {
ObjectAdapter adapter = adapterFor(pojo);
@@ -1270,14 +1270,14 @@ public class PersistenceSession implements TransactionalResource, SessionScopedC
CallbackFacet.Util.callCallback(adapter, RemovingCallbackFacet.class);
}
- });
+ }.run();
}
public void postLoadProcessingFor(final Persistable pojo) {
- withLogging(pojo, new Runnable() {
+ new Runnable() {
@Override
public void run() {
final Persistable pc = pojo;
@@ -1337,7 +1337,7 @@ public class PersistenceSession implements TransactionalResource, SessionScopedC
adapter.setVersion(datastoreVersion);
}
- });
+ }.run();
}
/**
@@ -1349,7 +1349,7 @@ public class PersistenceSession implements TransactionalResource, SessionScopedC
* to determine which callback to fire.
*/
public void preStoreProcessingFor(final Persistable pojo) {
- withLogging(pojo, new Runnable() {
+ new Runnable() {
@Override
public void run() {
final ObjectAdapter adapter = getAdapterFor(pojo);
@@ -1372,7 +1372,7 @@ public class PersistenceSession implements TransactionalResource, SessionScopedC
}
}
- });
+ }.run();
}
/**
@@ -1384,7 +1384,7 @@ public class PersistenceSession implements TransactionalResource, SessionScopedC
* to determine which callback to fire.
*/
public void postStoreProcessingFor(final Persistable pojo) {
- withLogging(pojo, new Runnable() {
+ new Runnable() {
@Override
public void run() {
ensureRootObject(pojo);
@@ -1418,7 +1418,7 @@ public class PersistenceSession implements TransactionalResource, SessionScopedC
Version versionIfAny = getVersionIfAny(pojo);
adapter.setVersion(versionIfAny);
}
- });
+ }.run();
}
private Version getVersionIfAny(final Persistable pojo) {
@@ -1427,7 +1427,7 @@ public class PersistenceSession implements TransactionalResource, SessionScopedC
public void preDirtyProcessingFor(final Persistable pojo) {
- withLogging(pojo, new Runnable() {
+ new Runnable() {
@Override
public void run() {
ObjectAdapter adapter = getAdapterFor(pojo);
@@ -1463,7 +1463,7 @@ public class PersistenceSession implements TransactionalResource, SessionScopedC
ensureRootObject(pojo);
}
- });
+ }.run();
}
private <T> T withLogging(Persistable pojo, Callable<T> runnable) {
@@ -1481,18 +1481,6 @@ public class PersistenceSession implements TransactionalResource, SessionScopedC
}
}
- private void withLogging(Persistable pojo, final Runnable runnable) {
- withLogging(pojo, new Callable<Void>() {
-
- @Override
- public Void call() throws Exception {
- runnable.run();
- return null;
- }
-
- });
- }
-
private String logString(LoggingLocation location, Persistable pojo) {
final ObjectAdapter adapter = getAdapterFor(pojo);
// initial spaces just to look better in log when wrapped by IsisLifecycleListener...