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/11 00:08:42 UTC

[18/50] isis git commit: ISIS-1194: PersistenceSession, added an enum (unused as of yet), and moved method lexically.

ISIS-1194: PersistenceSession, added an enum (unused as of yet), and moved method lexically.


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

Branch: refs/heads/master
Commit: c7424d50677141223e7d7b68e3c2724c02e6baf4
Parents: d85822f
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Sep 10 15:03:40 2015 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Sep 10 15:03:40 2015 +0100

----------------------------------------------------------------------
 .../runtime/system/persistence/PersistenceSession.java  | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/c7424d50/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 2a9f0ce..ca3de0d 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
@@ -390,6 +390,15 @@ public class PersistenceSession implements TransactionalResource, SessionScopedC
         return createInstance(objectSpec);
     }
 
+    public ObjectAdapter createViewModelInstance(final ObjectSpecification objectSpec, final String memento) {
+        return createInstance(objectSpec, memento);
+    }
+
+    private enum Variant {
+        TRANSIENT,
+        VIEW_MODEL
+    }
+
     private ObjectAdapter createInstance(final ObjectSpecification objectSpec) {
         if (LOG.isDebugEnabled()) {
             LOG.debug("creating transient instance of " + objectSpec);
@@ -399,9 +408,6 @@ public class PersistenceSession implements TransactionalResource, SessionScopedC
         return initializePropertiesAndDoCallback(adapter);
     }
 
-    public ObjectAdapter createViewModelInstance(final ObjectSpecification objectSpec, final String memento) {
-        return createInstance(objectSpec, memento);
-    }
 
     private ObjectAdapter createInstance(final ObjectSpecification objectSpec, final String memento) {
         if (LOG.isDebugEnabled()) {