isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1373632 [4/5] - in /incubator/isis/trunk/framework: core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/mgr/ core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/ core/metamodel/src/main/java/org/apache/i...
Date Wed, 15 Aug 2012 21:15:42 GMT
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/PersistenceSession.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/PersistenceSession.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/PersistenceSession.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/PersistenceSession.java Wed Aug 15 21:15:39 2012
@@ -29,12 +29,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-
-import org.apache.log4j.Logger;
-
-import org.apache.isis.applib.DomainObjectContainer;
 import org.apache.isis.applib.query.Query;
 import org.apache.isis.applib.query.QueryDefault;
 import org.apache.isis.applib.query.QueryFindAllInstances;
@@ -72,12 +66,9 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
-import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
 import org.apache.isis.runtimes.dflt.runtime.persistence.FixturesInstalledFlag;
 import org.apache.isis.runtimes.dflt.runtime.persistence.NotPersistableException;
 import org.apache.isis.runtimes.dflt.runtime.persistence.ObjectPersistenceException;
-import org.apache.isis.runtimes.dflt.runtime.persistence.UnsupportedFindException;
-import org.apache.isis.runtimes.dflt.runtime.persistence.internal.RuntimeContextFromSession;
 import org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.ObjectStoreSpi;
 import org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm.PersistAlgorithm;
 import org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm.ToPersistObjectSet;
@@ -95,13 +86,17 @@ import org.apache.isis.runtimes.dflt.run
 import org.apache.isis.runtimes.dflt.runtime.system.transaction.TransactionalClosureAbstract;
 import org.apache.isis.runtimes.dflt.runtime.system.transaction.TransactionalClosureWithReturnAbstract;
 import org.apache.isis.runtimes.dflt.runtime.system.transaction.UpdateNotifier;
+import org.apache.log4j.Logger;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
 
 public class PersistenceSession implements  
+        Persistor,
         EnlistedObjectDirtying, ToPersistObjectSet,
-        AdapterRecreator,
         RecreatedPojoRemapper,
         AdapterLifecycleTransitioner,
-        SessionScopedComponent, DebuggableWithTitle, Persistor {
+        SessionScopedComponent, DebuggableWithTitle {
 
     private static final Logger LOG = Logger.getLogger(PersistenceSession.class);
 
@@ -339,12 +334,8 @@ public class PersistenceSession implemen
     // Factory (for transient instance)
     // ///////////////////////////////////////////////////////////////////////////
 
-    /* (non-Javadoc)
-     * @see org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor#createInstance(org.apache.isis.core.metamodel.spec.ObjectSpecification)
-     */
-    //@Override
     @Override
-    public ObjectAdapter createInstance(final ObjectSpecification objectSpec) {
+    public ObjectAdapter createTransientInstance(final ObjectSpecification objectSpec) {
         if (LOG.isDebugEnabled()) {
             LOG.debug("creating transient instance of " + objectSpec);
         }
@@ -353,12 +344,8 @@ public class PersistenceSession implemen
         return objectSpec.initialize(adapter);
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor#createInstance(org.apache.isis.core.metamodel.spec.ObjectSpecification, org.apache.isis.core.metamodel.adapter.ObjectAdapter)
-     */
-    //@Override
     @Override
-    public ObjectAdapter createInstance(final ObjectSpecification objectSpec, final ObjectAdapter parentAdapter) {
+    public ObjectAdapter createAggregatedInstance(final ObjectSpecification objectSpec, final ObjectAdapter parentAdapter) {
         if (LOG.isDebugEnabled()) {
             LOG.debug("creating aggregated instance of " + objectSpec);
         }
@@ -378,10 +365,6 @@ public class PersistenceSession implemen
     // findInstances, getInstances
     // ///////////////////////////////////////////////////////////////////////////
 
-    /* (non-Javadoc)
-     * @see org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor#findInstances(org.apache.isis.applib.query.Query, org.apache.isis.core.metamodel.services.container.query.QueryCardinality)
-     */
-    //@Override
     @Override
     public <T> ObjectAdapter findInstances(final Query<T> query, final QueryCardinality cardinality) {
         final PersistenceQuery persistenceQuery = createPersistenceQueryFor(query, cardinality);
@@ -391,10 +374,6 @@ public class PersistenceSession implemen
         return findInstances(persistenceQuery);
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor#findInstances(org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceQuery)
-     */
-    //@Override
     @Override
     public ObjectAdapter findInstances(final PersistenceQuery persistenceQuery) {
         final List<ObjectAdapter> instances = getInstances(persistenceQuery);
@@ -669,10 +648,6 @@ public class PersistenceSession implemen
     // loadObject, reload
     // ///////////////////////////////////////////////////////////////////////////
 
-    /* (non-Javadoc)
-     * @see org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor#loadObject(org.apache.isis.core.metamodel.adapter.oid.TypedOid)
-     */
-    //@Override
     @Override
     public ObjectAdapter loadObject(final TypedOid oid) {
         ensureThatArg(oid, is(notNullValue()));
@@ -700,10 +675,6 @@ public class PersistenceSession implemen
     // resolveImmediately, resolveField
     // ///////////////////////////////////////////////////////////////////////////
 
-    /* (non-Javadoc)
-     * @see org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor#resolveImmediately(org.apache.isis.core.metamodel.adapter.ObjectAdapter)
-     */
-    //@Override
     @Override
     public void resolveImmediately(final ObjectAdapter adapter) {
         // synchronize on the current session because getting race
@@ -749,9 +720,6 @@ public class PersistenceSession implemen
         });
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor#resolveField(org.apache.isis.core.metamodel.adapter.ObjectAdapter, org.apache.isis.core.metamodel.spec.feature.ObjectAssociation)
-     */
     @Override
     public void resolveField(final ObjectAdapter objectAdapter, final ObjectAssociation field) {
         if (field.isNotPersisted()) {
@@ -794,9 +762,6 @@ public class PersistenceSession implemen
     // makePersistent
     // ////////////////////////////////////////////////////////////////
 
-    /* (non-Javadoc)
-     * @see org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor#makePersistent(org.apache.isis.core.metamodel.adapter.ObjectAdapter)
-     */
     @Override
     public void makePersistent(final ObjectAdapter adapter) {
         if (adapter.representsPersistent()) {
@@ -844,9 +809,6 @@ public class PersistenceSession implemen
     // objectChanged
     // ///////////////////////////////////////////////////////////////////////////
 
-    /* (non-Javadoc)
-     * @see org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor#objectChanged(org.apache.isis.core.metamodel.adapter.ObjectAdapter)
-     */
     @Override
     public void objectChanged(final ObjectAdapter adapter) {
 
@@ -913,9 +875,6 @@ public class PersistenceSession implemen
     // destroyObject
     // ///////////////////////////////////////////////////////////////////////////
 
-    /* (non-Javadoc)
-     * @see org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor#destroyObject(org.apache.isis.core.metamodel.adapter.ObjectAdapter)
-     */
     @Override
     public void destroyObject(final ObjectAdapter adapter) {
         if (adapter.getSpecification().isParented()) {
@@ -960,9 +919,6 @@ public class PersistenceSession implemen
     // hasInstances
     // ///////////////////////////////////////////////////////////////////////////
 
-    /* (non-Javadoc)
-     * @see org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor#hasInstances(org.apache.isis.core.metamodel.spec.ObjectSpecification)
-     */
     @Override
     public boolean hasInstances(final ObjectSpecification specification) {
         if (LOG.isInfoEnabled()) {
@@ -982,16 +938,6 @@ public class PersistenceSession implemen
 
     
     // ///////////////////////////////////////////////////////////////////////////
-    // AdapterRecreator
-    // ///////////////////////////////////////////////////////////////////////////
-
-    @Override
-    public ObjectAdapter recreatePersistentAdapter(TypedOid oid) {
-        return adapterManager.recreatePersistentAdapter(oid);
-    }
-
-    
-    // ///////////////////////////////////////////////////////////////////////////
     // RecreatedPojoRemapper
     // ///////////////////////////////////////////////////////////////////////////
 
@@ -1061,8 +1007,7 @@ public class PersistenceSession implemen
         return persistentByTransient.get(transientOid);
     }
 
-
-
+    
     /**
      * Uses the {@link ObjectStoreSpi} to
      * {@link ObjectStoreSpi#createCreateObjectCommand(ObjectAdapter) create} a
@@ -1270,9 +1215,4 @@ public class PersistenceSession implemen
     protected AuthenticationSession getAuthenticationSession() {
         return IsisContext.getAuthenticationSession();
     }
-
-    
-    
-    
-    
 }

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/Persistor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/Persistor.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/Persistor.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/Persistor.java Wed Aug 15 21:15:39 2012
@@ -144,7 +144,7 @@ public interface Persistor {
      * This method is ultimately delegated to by the
      * {@link DomainObjectContainer}.
      */
-    public abstract ObjectAdapter createInstance(ObjectSpecification objectSpec);
+    public abstract ObjectAdapter createTransientInstance(ObjectSpecification objectSpec);
 
     /**
      * Creates a new instance of the specified type and returns an adapter with
@@ -162,7 +162,7 @@ public interface Persistor {
      * This method is ultimately delegated to by the
      * {@link DomainObjectContainer}.
      */
-    public abstract ObjectAdapter createInstance(ObjectSpecification objectSpec, ObjectAdapter parentAdapter);
+    public abstract ObjectAdapter createAggregatedInstance(ObjectSpecification objectSpec, ObjectAdapter parentAdapter);
 
     /**
      * Makes an {@link ObjectAdapter} persistent. The specified object should be

Modified: incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/IsisSystemWithFixtures.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/IsisSystemWithFixtures.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/IsisSystemWithFixtures.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/IsisSystemWithFixtures.java Wed Aug 15 21:15:39 2012
@@ -51,6 +51,7 @@ import org.apache.isis.runtimes.dflt.run
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.AdapterManagerSpi;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor;
+import org.apache.isis.runtimes.dflt.runtime.system.session.IsisSession;
 import org.apache.isis.runtimes.dflt.runtime.system.transaction.IsisTransaction;
 import org.apache.isis.runtimes.dflt.runtime.system.transaction.IsisTransaction.State;
 import org.apache.isis.runtimes.dflt.runtime.system.transaction.IsisTransactionManager;
@@ -513,7 +514,7 @@ public class IsisSystemWithFixtures impl
 
     public ObjectAdapter recreateAdapter(RootOid oid) {
         ensureSessionInProgress();
-        return getPersistenceSession().recreatePersistentAdapter(oid);
+        return getAdapterManager().adapterFor(oid);
     }
 
     public ObjectAdapter remapAsPersistent(Object pojo, RootOid persistentOid) {
@@ -651,8 +652,12 @@ public class IsisSystemWithFixtures impl
         return getPersistenceSession().getTransactionManager();
     }
     
-    protected AdapterManager getAdapterManager() {
-        return getPersistenceSession().getAdapterManager();
+    public Persistor getPersistor() {
+    	return getPersistenceSession();
+    }
+    
+    public AdapterManager getAdapterManager() {
+        return getPersistor().getAdapterManager();
     }
 
     protected PersistenceSession getPersistenceSession() {

Modified: incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/WrapperValuedEntity.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/WrapperValuedEntity.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/WrapperValuedEntity.java (original)
+++ incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/WrapperValuedEntity.java Wed Aug 15 21:15:39 2012
@@ -155,8 +155,8 @@ public class WrapperValuedEntity extends
     // }}
 
     // {{ CharacterProperty (property)
-    //@javax.jdo.annotations.Column(jdbcType="char") // works for hsqldb
-    @javax.jdo.annotations.Column(jdbcType="char", sqlType="char") // works for mssqlserver
+    @javax.jdo.annotations.Column(jdbcType="char") // works for hsqldb
+    //@javax.jdo.annotations.Column(jdbcType="char", sqlType="char") // works for mssqlserver
     private Character characterProperty;
 
     @Optional

Modified: incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/fixtures/SetUpObjectsPeer.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/fixtures/SetUpObjectsPeer.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/fixtures/SetUpObjectsPeer.java (original)
+++ incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/fixtures/SetUpObjectsPeer.java Wed Aug 15 21:15:39 2012
@@ -194,7 +194,7 @@ public class SetUpObjectsPeer extends Ab
         if (spec == null) {
             return null;
         }
-        return getPersistenceSession().createInstance(spec);
+        return getPersistenceSession().createTransientInstance(spec);
     }
 
     public SetUpObjectResult setUpProperty(final ObjectAdapter adapter, final int colNum) {

Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/content/AbstractObjectContent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/content/AbstractObjectContent.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/content/AbstractObjectContent.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/content/AbstractObjectContent.java Wed Aug 15 21:15:39 2012
@@ -92,7 +92,7 @@ public abstract class AbstractObjectCont
             // ObjectAdapter original = getObject();
             final ObjectSpecification spec = original.getSpecification();
 
-            final ObjectAdapter clone = getPersistenceSession().createInstance(spec);
+            final ObjectAdapter clone = getPersistenceSession().createTransientInstance(spec);
             final List<ObjectAssociation> fields = spec.getAssociations();
             for (int i = 0; i < fields.size(); i++) {
                 final ObjectAdapter fld = fields.get(i).get(original);

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/PersistentRootAdapterMapping.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/PersistentRootAdapterMapping.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/PersistentRootAdapterMapping.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/PersistentRootAdapterMapping.java Wed Aug 15 21:15:39 2012
@@ -70,7 +70,7 @@ public class PersistentRootAdapterMappin
     @Override
     public void restoreToLoader() {
         final RootOidDefault oid = RootOidDefault.deString(getOidStr());
-        final ObjectAdapter adapter = getPersistenceSession().recreatePersistentAdapter(oid);
+        final ObjectAdapter adapter = getAdapterManager().adapterFor(oid);
         adapter.setVersion(getVersion());
     }
 

Modified: incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/ResourceContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/ResourceContext.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/ResourceContext.java (original)
+++ incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/ResourceContext.java Wed Aug 15 21:15:39 2012
@@ -29,26 +29,24 @@ import javax.ws.rs.core.Request;
 import javax.ws.rs.core.SecurityContext;
 import javax.ws.rs.core.UriInfo;
 
-import com.google.common.base.Predicate;
-import com.google.common.collect.Collections2;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-
 import org.apache.isis.applib.profiles.Localization;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
-import org.apache.isis.core.metamodel.adapter.oid.stringable.OidStringifier;
 import org.apache.isis.core.metamodel.spec.SpecificationLoader;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
-import org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor;
 import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
 import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
 import org.apache.isis.viewer.restfulobjects.applib.RestfulRequest.RequestParameter;
 import org.apache.isis.viewer.restfulobjects.applib.RestfulResponse.HttpStatusCode;
 import org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.DomainResourceHelper;
 
+import com.google.common.base.Predicate;
+import com.google.common.collect.Collections2;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
 public class ResourceContext {
 
     private final HttpHeaders httpHeaders;
@@ -57,12 +55,11 @@ public class ResourceContext {
     private final HttpServletRequest httpServletRequest;
     private final HttpServletResponse httpServletResponse;
     private final SecurityContext securityContext;
-    private final OidStringifier oidStringifier;
     private final Localization localization;
     private final IsisConfiguration configuration;
     private final AuthenticationSession authenticationSession;
     private final PersistenceSession persistenceSession;
-    private final AdapterManager objectAdapterLookup;
+    private final AdapterManager adapterManager;
     private final SpecificationLoader specificationLookup;
 
     private List<List<String>> followLinks;
@@ -82,7 +79,7 @@ public class ResourceContext {
     private JsonRepresentation readQueryStringAsMap;
 
     public ResourceContext(final RepresentationType representationType, final HttpHeaders httpHeaders, final UriInfo uriInfo, final Request request, final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse, final SecurityContext securityContext,
-            final OidStringifier oidStringifier, final Localization localization, final AuthenticationSession authenticationSession, final PersistenceSession persistenceSession, final AdapterManager objectAdapterLookup, final SpecificationLoader specificationLookup, IsisConfiguration configuration) {
+            final Localization localization, final AuthenticationSession authenticationSession, final PersistenceSession persistenceSession, final AdapterManager objectAdapterLookup, final SpecificationLoader specificationLookup, IsisConfiguration configuration) {
 
         this.httpHeaders = httpHeaders;
         this.uriInfo = uriInfo;
@@ -90,12 +87,11 @@ public class ResourceContext {
         this.httpServletRequest = httpServletRequest;
         this.httpServletResponse = httpServletResponse;
         this.securityContext = securityContext;
-        this.oidStringifier = oidStringifier;
         this.localization = localization;
         this.configuration = configuration;
         this.authenticationSession = authenticationSession;
         this.persistenceSession = persistenceSession;
-        this.objectAdapterLookup = objectAdapterLookup;
+        this.adapterManager = objectAdapterLookup;
         this.specificationLookup = specificationLookup;
 
         init(representationType);
@@ -192,10 +188,6 @@ public class ResourceContext {
         return getUriInfo().getBaseUri().toString() + url;
     }
 
-    public OidStringifier getOidStringifier() {
-        return oidStringifier;
-    }
-
     public Localization getLocalization() {
         return localization;
     }
@@ -204,8 +196,8 @@ public class ResourceContext {
         return authenticationSession;
     }
 
-    public AdapterManager getObjectAdapterLookup() {
-        return objectAdapterLookup;
+    public AdapterManager getAdapterManager() {
+        return adapterManager;
     }
 
     public PersistenceSession getPersistenceSession() {

Modified: incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/representations/ReprRendererAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/representations/ReprRendererAbstract.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/representations/ReprRendererAbstract.java (original)
+++ incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/representations/ReprRendererAbstract.java Wed Aug 15 21:15:39 2012
@@ -23,10 +23,8 @@ import java.util.List;
 import org.apache.isis.applib.profiles.Localization;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.oid.stringable.OidStringifier;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
-import org.apache.isis.runtimes.dflt.runtime.system.persistence.OidGenerator;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor;
 import org.apache.isis.runtimes.dflt.runtime.system.transaction.UpdateNotifier;
 import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
@@ -163,10 +161,6 @@ public abstract class ReprRendererAbstra
         }
     }
 
-    protected OidStringifier getOidStringifier() {
-        return IsisContext.getPersistenceSession().getOidGenerator().getOidStringifier();
-    }
-
     protected List<ObjectAdapter> getServiceAdapters() {
         return IsisContext.getPersistenceSession().getServices();
     }

Modified: incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/ResourceAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/ResourceAbstract.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/ResourceAbstract.java (original)
+++ incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/ResourceAbstract.java Wed Aug 15 21:15:39 2012
@@ -34,33 +34,30 @@ import javax.ws.rs.core.Response.Respons
 import javax.ws.rs.core.SecurityContext;
 import javax.ws.rs.core.UriInfo;
 
-import org.codehaus.jackson.JsonGenerationException;
-import org.codehaus.jackson.map.JsonMappingException;
-
 import org.apache.isis.applib.profiles.Localization;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
-import org.apache.isis.core.metamodel.adapter.oid.stringable.OidStringifier;
 import org.apache.isis.core.metamodel.adapter.version.Version;
 import org.apache.isis.core.metamodel.services.ServiceUtil;
 import org.apache.isis.core.metamodel.spec.ActionType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
-import org.apache.isis.runtimes.dflt.runtime.system.persistence.AdapterManagerSpi;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.OidGenerator;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
 import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
 import org.apache.isis.viewer.restfulobjects.applib.RestfulResponse.HttpStatusCode;
 import org.apache.isis.viewer.restfulobjects.applib.util.JsonMapper;
-import org.apache.isis.viewer.restfulobjects.viewer.RestfulObjectsApplicationException;
 import org.apache.isis.viewer.restfulobjects.viewer.ResourceContext;
+import org.apache.isis.viewer.restfulobjects.viewer.RestfulObjectsApplicationException;
 import org.apache.isis.viewer.restfulobjects.viewer.representations.RendererFactoryRegistry;
 import org.apache.isis.viewer.restfulobjects.viewer.representations.ReprRenderer;
 import org.apache.isis.viewer.restfulobjects.viewer.util.OidUtils;
 import org.apache.isis.viewer.restfulobjects.viewer.util.UrlDecoderUtils;
+import org.codehaus.jackson.JsonGenerationException;
+import org.codehaus.jackson.map.JsonMappingException;
 
 public abstract class ResourceAbstract {
 
@@ -123,7 +120,7 @@ public abstract class ResourceAbstract {
             throw RestfulObjectsApplicationException.create(HttpStatusCode.UNAUTHORIZED);
         }
 
-        this.resourceContext = new ResourceContext(representationType, httpHeaders, uriInfo, request, httpServletRequest, httpServletResponse, securityContext, getOidStringifier(), getLocalization(), getAuthenticationSession(), getPersistenceSession(), getAdapterManager(), getSpecificationLoader(), getConfiguration());
+        this.resourceContext = new ResourceContext(representationType, httpHeaders, uriInfo, request, httpServletRequest, httpServletResponse, securityContext, getLocalization(), getAuthenticationSession(), getPersistenceSession(), getAdapterManager(), getSpecificationLoader(), getConfiguration());
     }
 
     protected ResourceContext getResourceContext() {
@@ -240,10 +237,6 @@ public abstract class ResourceAbstract {
         return getPersistenceSession().getOidGenerator();
     }
 
-    private OidStringifier getOidStringifier() {
-        return getOidGenerator().getOidStringifier();
-    }
-
     protected Localization getLocalization() {
         return IsisContext.getLocalization();
     }

Modified: incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainObjectLinkTo.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainObjectLinkTo.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainObjectLinkTo.java (original)
+++ incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainObjectLinkTo.java Wed Aug 15 21:15:39 2012
@@ -64,7 +64,8 @@ public class DomainObjectLinkTo implemen
             throw new IllegalStateException("objectAdapter not provided");
         }
         final StringBuilder buf = new StringBuilder("objects/");
-        buf.append(resourceContext.getOidStringifier().enString((RootOid) objectAdapter.getOid()));
+        RootOid rootOid = (RootOid) objectAdapter.getOid();
+		buf.append(rootOid.enString());
         return buf.toString();
     }
 

Modified: incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainObjectReprRenderer.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainObjectReprRenderer.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainObjectReprRenderer.java (original)
+++ incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainObjectReprRenderer.java Wed Aug 15 21:15:39 2012
@@ -61,7 +61,8 @@ public class DomainObjectReprRenderer ex
     }
 
     public static LinkBuilder newLinkToBuilder(final ResourceContext resourceContext, final Rel rel, final ObjectAdapter elementAdapter) {
-        final String oidStr = resourceContext.getOidStringifier().enString((RootOid) elementAdapter.getOid());
+        RootOid rootOid = (RootOid) elementAdapter.getOid();
+		final String oidStr = rootOid.enString();
         final String url = "objects/" + oidStr;
         final LinkBuilder builder = LinkBuilder.newBuilder(resourceContext, rel, RepresentationType.DOMAIN_OBJECT, url).withTitle(elementAdapter.titleString());
         return builder;

Modified: incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainObjectResourceServerside.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainObjectResourceServerside.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainObjectResourceServerside.java (original)
+++ incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainObjectResourceServerside.java Wed Aug 15 21:15:39 2012
@@ -86,7 +86,7 @@ public class DomainObjectResourceServers
             throw RestfulObjectsApplicationException.create(HttpStatusCode.BAD_REQUEST, "Could not determine type of domain object to persist (no such class '%s')", domainTypeStr);
         }
 
-        final ObjectAdapter objectAdapter = getResourceContext().getPersistenceSession().createInstance(domainTypeSpec);
+        final ObjectAdapter objectAdapter = getResourceContext().getPersistenceSession().createTransientInstance(domainTypeSpec);
 
         final JsonRepresentation propertiesList = objectRepr.getArrayEnsured("members[memberType=property]");
         if (propertiesList == null) {

Modified: incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domaintypes/DomainTypeResourceServerside.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domaintypes/DomainTypeResourceServerside.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domaintypes/DomainTypeResourceServerside.java (original)
+++ incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domaintypes/DomainTypeResourceServerside.java Wed Aug 15 21:15:39 2012
@@ -297,7 +297,7 @@ public class DomainTypeResourceServersid
 
         final RendererFactory domainObjectRendererFactory = rendererFactoryRegistry.find(RepresentationType.DOMAIN_OBJECT);
         final DomainObjectReprRenderer domainObjectRenderer = (DomainObjectReprRenderer) domainObjectRendererFactory.newRenderer(getResourceContext(), null, JsonRepresentation.newMap());
-        final ObjectAdapter transientInstance = getResourceContext().getPersistenceSession().createInstance(domainTypeSpec);
+        final ObjectAdapter transientInstance = getResourceContext().getPersistenceSession().createTransientInstance(domainTypeSpec);
         domainObjectRenderer.with(transientInstance).includesSelf();
 
         renderer.with(domainTypeSpec).withSelf(selfLink).withValue(domainObjectRenderer.render());

Modified: incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/util/OidUtils.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/util/OidUtils.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/util/OidUtils.java (original)
+++ incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/util/OidUtils.java Wed Aug 15 21:15:39 2012
@@ -21,6 +21,7 @@ package org.apache.isis.viewer.restfulob
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
 import org.apache.isis.core.metamodel.adapter.oid.RootOid;
+import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
 import org.apache.isis.viewer.restfulobjects.viewer.ResourceContext;
 
 public final class OidUtils {
@@ -30,12 +31,8 @@ public final class OidUtils {
 
     public static ObjectAdapter getObjectAdapter(final ResourceContext resourceContext, final String oidEncodedStr) {
         final String oidStr = UrlDecoderUtils.urlDecode(oidEncodedStr);
-        final RootOid rootOid = resourceContext.getOidStringifier().deString(oidStr);
-        final ObjectAdapter adapterFor = resourceContext.getObjectAdapterLookup().getAdapterFor(rootOid);
-        if(adapterFor != null) {
-            return adapterFor;
-        }
-        return resourceContext.getPersistenceSession().recreatePersistentAdapter(rootOid);
+        final RootOid rootOid = RootOidDefault.deStringEncoded(oidStr);
+        return resourceContext.getAdapterManager().adapterFor(rootOid);
     }
 
     public static String getOidStr(final ResourceContext resourceContext, final ObjectAdapter objectAdapter) {
@@ -44,7 +41,7 @@ public final class OidUtils {
             throw new IllegalArgumentException("objectAdapter must be a root adapter");
         }
         RootOid rootOid = (RootOid) oid;
-        return oid != null ? resourceContext.getOidStringifier().enString(rootOid) : null;
+        return rootOid != null ? rootOid.enString() : null;
     }
 
 }

Modified: incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/test/java/org/apache/isis/viewer/restfulobjects/viewer/ResourceContextTest_ensureCompatibleAcceptHeader.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/test/java/org/apache/isis/viewer/restfulobjects/viewer/ResourceContextTest_ensureCompatibleAcceptHeader.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/test/java/org/apache/isis/viewer/restfulobjects/viewer/ResourceContextTest_ensureCompatibleAcceptHeader.java (original)
+++ incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/test/java/org/apache/isis/viewer/restfulobjects/viewer/ResourceContextTest_ensureCompatibleAcceptHeader.java Wed Aug 15 21:15:39 2012
@@ -128,7 +128,7 @@ public class ResourceContextTest_ensureC
     }
 
     private ResourceContext instantiateResourceContext(final RepresentationType representationType) {
-        return new ResourceContext(representationType, httpHeaders, null, null, httpServletRequest, null, null, null, null, null, null, null, null, null);
+        return new ResourceContext(representationType, httpHeaders, null, null, httpServletRequest, null, null, null, null, null, null, null, null);
     }
 
 }

Modified: incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/test/java/org/apache/isis/viewer/restfulobjects/viewer/ResourceContextTest_getArg.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/test/java/org/apache/isis/viewer/restfulobjects/viewer/ResourceContextTest_getArg.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/test/java/org/apache/isis/viewer/restfulobjects/viewer/ResourceContextTest_getArg.java (original)
+++ incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/test/java/org/apache/isis/viewer/restfulobjects/viewer/ResourceContextTest_getArg.java Wed Aug 15 21:15:39 2012
@@ -58,7 +58,7 @@ public class ResourceContextTest_getArg 
                 will(returnValue(queryString));
             }
         });
-        resourceContext = new ResourceContext(null, null, null, null, httpServletRequest, null, null, null, null, null, null, null, null, null) {
+        resourceContext = new ResourceContext(null, null, null, null, httpServletRequest, null, null, null, null, null, null, null, null) {
             @Override
             void init(final RepresentationType representationType) {
                 //
@@ -78,7 +78,7 @@ public class ResourceContextTest_getArg 
                 will(returnValue(queryString));
             }
         });
-        resourceContext = new ResourceContext(null, null, null, null, httpServletRequest, null, null, null, null, null, null, null, null, null) {
+        resourceContext = new ResourceContext(null, null, null, null, httpServletRequest, null, null, null, null, null, null, null, null) {
             @Override
             void init(final RepresentationType representationType) {
                 //

Modified: incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/DefaultOidObjectMapping.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/DefaultOidObjectMapping.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/DefaultOidObjectMapping.java (original)
+++ incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/DefaultOidObjectMapping.java Wed Aug 15 21:15:39 2012
@@ -326,7 +326,7 @@ public class DefaultOidObjectMapping imp
         final TypedOid typedOid = new OidMarshaller().unmarshal(oidStr, TypedOid.class);
 
         if(!typedOid.isTransient()) {
-            return getPersistenceSession().recreatePersistentAdapter(typedOid);
+            return getAdapterManager().adapterFor(typedOid);
         } else {
             return mappedObject(oidStr);
         }
@@ -389,7 +389,7 @@ public class DefaultOidObjectMapping imp
                 // Oid oid = deString(objectType, oidData, State.TRANSIENT);
                 //return getPersistenceSession().recreateAdapter(oid, pojo);
                 
-                return getPersistenceSession().recreatePersistentAdapter(typedOid);
+                return getAdapterManager().adapterFor(typedOid);
             }
             
             final ObjectAdapter mappedTransientObject = mapping.getObject();

Modified: incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/Mapping.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/Mapping.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/Mapping.java (original)
+++ incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/Mapping.java Wed Aug 15 21:15:39 2012
@@ -28,7 +28,6 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.runtimes.dflt.runtime.memento.Memento;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
-import org.apache.isis.runtimes.dflt.runtime.system.persistence.AdapterManagerSpi;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
 
 interface Mapping {
@@ -56,7 +55,7 @@ class TransientRootAdapterMapping implem
 
     @Override
     public ObjectAdapter getObject() {
-        return IsisContext.getPersistenceSession().getAdapterManager().getAdapterFor(oid);
+        return getAdapterManager().getAdapterFor(oid);
     }
 
     @Override
@@ -65,16 +64,30 @@ class TransientRootAdapterMapping implem
     }
 
     @Override
+    public void reload() {
+        memento.recreateObject();
+    }
+
+    @Override
+    public void update() {
+        memento = new Memento(getObject());
+    }
+
+
+    ////////////////////////////////////
+    // debug
+    ////////////////////////////////////
+
+    @Override
     public String debug() {
         final DebugString debug = new DebugString();
         memento.debug(debug);
         return debug.toString();
     }
 
-    @Override
-    public void reload() {
-        memento.recreateObject();
-    }
+    ////////////////////////////////////
+    // equals, hashCode
+    ////////////////////////////////////
 
     @Override
     public boolean equals(final Object obj) {
@@ -93,10 +106,18 @@ class TransientRootAdapterMapping implem
         return oid.hashCode();
     }
 
-    @Override
-    public void update() {
-        memento = new Memento(getObject());
-    }
+    
+    ////////////////////////////////////
+    // from context
+    ////////////////////////////////////
+
+	private AdapterManager getAdapterManager() {
+		return getPersistenceSession().getAdapterManager();
+	}
+
+	private PersistenceSession getPersistenceSession() {
+		return IsisContext.getPersistenceSession();
+	}
 }
 
 class PersistentRootAdapterMapping implements Mapping {
@@ -114,11 +135,6 @@ class PersistentRootAdapterMapping imple
     }
 
     @Override
-    public String debug() {
-        return oid + "  " + spec.getShortIdentifier() + "  " + getAdapterManager().getAdapterFor(oid);
-    }
-
-    @Override
     public ObjectAdapter getObject() {
         if (!IsisContext.inTransaction()) {
             throw new IllegalStateException(getClass().getSimpleName() + " requires transaction in order to load");
@@ -128,12 +144,28 @@ class PersistentRootAdapterMapping imple
 
     @Override
     public void reload() {
-        if (getAdapterManager().getAdapterFor(oid) == null) {
-            final Object recreatedPojo = spec.createObject();
-            getPersistenceSession().mapRecreatedPojo(oid, recreatedPojo);
-        }
+    	// will only recreate if not already in the adapter mgr maps.
+    	getAdapterManager().adapterFor(oid);
     }
 
+
+    @Override
+    public void update() {
+    }
+
+    ////////////////////////////////////
+    // debug
+    ////////////////////////////////////
+
+    @Override
+    public String debug() {
+        return oid + "  " + spec.getShortIdentifier() + "  " + getAdapterManager().getAdapterFor(oid);
+    }
+
+    ////////////////////////////////////
+    // equals, hashCode
+    ////////////////////////////////////
+
     @Override
     public boolean equals(final Object obj) {
         if (obj == this) {
@@ -148,6 +180,7 @@ class PersistentRootAdapterMapping imple
         return false;
     }
 
+
     @Override
     public int hashCode() {
         int hash = 37;
@@ -156,22 +189,17 @@ class PersistentRootAdapterMapping imple
         return hash;
     }
 
-    @Override
-    public void update() {
-    }
-
     
     ////////////////////////////////////
-    
+    // from context
+    ////////////////////////////////////
 
     protected PersistenceSession getPersistenceSession() {
         return IsisContext.getPersistenceSession();
     }
 
-
     protected AdapterManager getAdapterManager() {
         return getPersistenceSession().getAdapterManager();
     }
 
-
 }

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/ObjectAdapterMemento.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/ObjectAdapterMemento.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/ObjectAdapterMemento.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/ObjectAdapterMemento.java Wed Aug 15 21:15:39 2012
@@ -97,7 +97,7 @@ public class ObjectAdapterMemento implem
             @Override
             ObjectAdapter recreateAdapter(final ObjectAdapterMemento oam) {
                 TypedOid oid = oidMarshaller.unmarshal(oam.persistentOidStr, TypedOid.class);
-                return getPersistenceSession().recreatePersistentAdapter(oid);
+                return getAdapterManager().adapterFor(oid);
             }
 
             @Override

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java Wed Aug 15 21:15:39 2012
@@ -24,18 +24,12 @@ import java.util.Map.Entry;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import com.google.common.collect.Maps;
-
-import org.apache.wicket.Component;
-import org.apache.wicket.PageParameters;
-import org.apache.wicket.markup.html.link.BookmarkablePageLink;
-
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
 import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
 import org.apache.isis.core.metamodel.adapter.oid.RootOid;
-import org.apache.isis.core.metamodel.adapter.oid.stringable.OidStringifier;
+import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
 import org.apache.isis.core.metamodel.consent.Consent;
 import org.apache.isis.core.metamodel.spec.ActionType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecId;
@@ -49,6 +43,11 @@ import org.apache.isis.viewer.wicket.mod
 import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
 import org.apache.isis.viewer.wicket.model.mementos.PageParameterNames;
 import org.apache.isis.viewer.wicket.model.util.ActionParams;
+import org.apache.wicket.Component;
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+
+import com.google.common.collect.Maps;
 
 /**
  * Models an action invocation, either the gathering of arguments for the
@@ -101,8 +100,8 @@ public class ActionModel extends ModelAb
     /**
      * Factory; for use by {@link BookmarkablePageLink}s.
      */
-    public static ActionModel createForPersistent(final PageParameters pageParameters, final OidStringifier oidStringifier) {
-        return new ActionModel(pageParameters, oidStringifier);
+    public static ActionModel createForPersistent(final PageParameters pageParameters) {
+        return new ActionModel(pageParameters);
     }
 
     /**
@@ -110,8 +109,8 @@ public class ActionModel extends ModelAb
      * 
      * see {@link #ActionModel(PageParameters)}
      */
-    public static PageParameters createPageParameters(final ObjectAdapter adapter, final ObjectAction noAction, final OidStringifier oidStringifier, final ObjectAdapter contextAdapter, final SingleResultsMode singleResultsMode) {
-        final PageParameters pageParameters = EntityModel.createPageParameters(adapter, oidStringifier);
+    public static PageParameters createPageParameters(final ObjectAdapter adapter, final ObjectAction noAction, final ObjectAdapter contextAdapter, final SingleResultsMode singleResultsMode) {
+        final PageParameters pageParameters = EntityModel.createPageParameters(adapter);
 
         final String actionType = noAction.getType().name();
         final String actionNameParmsId = determineActionId(noAction);
@@ -127,7 +126,7 @@ public class ActionModel extends ModelAb
         PageParameterNames.ACTION_MODE.addTo(pageParameters, actionMode.name());
         PageParameterNames.ACTION_SINGLE_RESULTS_MODE.addTo(pageParameters, singleResultsMode.name());
 
-        addActionParamContextIfPossible(noAction, oidStringifier, contextAdapter, pageParameters);
+        addActionParamContextIfPossible(noAction, contextAdapter, pageParameters);
         return pageParameters;
     }
 
@@ -145,15 +144,15 @@ public class ActionModel extends ModelAb
         return ActionParams.compatibleWith(contextAdapter, actionParam) ? Mode.RESULTS : Mode.PARAMETERS;
     }
 
-    private static void addActionParamContextIfPossible(final ObjectAction noAction, final OidStringifier oidStringifier, final ObjectAdapter contextAdapter, final PageParameters pageParameters) {
+    private static void addActionParamContextIfPossible(final ObjectAction noAction, final ObjectAdapter contextAdapter, final PageParameters pageParameters) {
         if (contextAdapter == null) {
             return;
         }
         int i = 0;
         for (final ObjectActionParameter actionParam : noAction.getParameters()) {
             if (ActionParams.compatibleWith(contextAdapter, actionParam)) {
-                final String oidStr = oidStringifier.enString((RootOid)contextAdapter.getOid());
-                final String oidKeyValue = "" + i + "=" + oidStr;
+                RootOid rootOid = (RootOid)contextAdapter.getOid();
+				final String oidKeyValue = "" + i + "=" + rootOid.enString();
                 PageParameterNames.ACTION_PARAM_CONTEXT.addTo(pageParameters, oidKeyValue);
                 return;
             }
@@ -188,10 +187,10 @@ public class ActionModel extends ModelAb
     private final Map<Integer, ScalarModel> arguments = Maps.newHashMap();
     private ActionExecutor executor;
 
-    private ActionModel(final PageParameters pageParameters, final OidStringifier oidStringifier) {
-        this(newObjectAdapterMementoFrom(pageParameters, oidStringifier), newActionMementoFrom(pageParameters), actionModeFor(pageParameters), singleResultsModeFor(pageParameters));
+    private ActionModel(final PageParameters pageParameters) {
+        this(newObjectAdapterMementoFrom(pageParameters), newActionMementoFrom(pageParameters), actionModeFor(pageParameters), singleResultsModeFor(pageParameters));
 
-        setContextArgumentIfPossible(pageParameters, oidStringifier);
+        setContextArgumentIfPossible(pageParameters);
 
         // TODO: if #args < param count, then change the actionMode
 
@@ -230,7 +229,7 @@ public class ActionModel extends ModelAb
         return ObjectSpecId.of(PageParameterNames.ACTION_OWNING_SPEC.getFrom(pageParameters));
     }
 
-    private static ObjectAdapterMemento newObjectAdapterMementoFrom(final PageParameters pageParameters, final OidStringifier oidStringifier) {
+    private static ObjectAdapterMemento newObjectAdapterMementoFrom(final PageParameters pageParameters) {
         RootOid oid = oidFor(pageParameters);
         if(oid.isTransient()) {
             //return ObjectAdapterMemento.
@@ -257,7 +256,7 @@ public class ActionModel extends ModelAb
         this.singleResultsMode = singleResultsMode;
     }
 
-    private boolean setContextArgumentIfPossible(final PageParameters pageParameters, final OidStringifier oidStringifier) {
+    private boolean setContextArgumentIfPossible(final PageParameters pageParameters) {
         final String paramContext = PageParameterNames.ACTION_PARAM_CONTEXT.getFrom(pageParameters);
         if (paramContext == null) {
             return false;
@@ -274,7 +273,7 @@ public class ActionModel extends ModelAb
         }
 
         try {
-            oid = oidStringifier.deString(mapEntry.getValue());
+            oid = RootOidDefault.deStringEncoded(mapEntry.getValue());
         } catch (final Exception e) {
             return false;
         }

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java Wed Aug 15 21:15:39 2012
@@ -22,14 +22,9 @@ package org.apache.isis.viewer.wicket.mo
 import java.io.Serializable;
 import java.util.Map;
 
-import com.google.common.collect.Maps;
-
-import org.apache.wicket.PageParameters;
-
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
 import org.apache.isis.core.metamodel.adapter.oid.RootOid;
-import org.apache.isis.core.metamodel.adapter.oid.stringable.OidStringifier;
 import org.apache.isis.core.metamodel.consent.Consent;
 import org.apache.isis.core.metamodel.spec.ObjectSpecId;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
@@ -38,6 +33,9 @@ import org.apache.isis.runtimes.dflt.run
 import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
 import org.apache.isis.viewer.wicket.model.mementos.PageParameterNames;
 import org.apache.isis.viewer.wicket.model.mementos.PropertyMemento;
+import org.apache.wicket.PageParameters;
+
+import com.google.common.collect.Maps;
 
 /**
  * Backing model to represent a {@link ObjectAdapter}.
@@ -60,7 +58,7 @@ public class EntityModel extends ModelAb
      * Factory method for creating {@link PageParameters} to represent an
      * entity.
      */
-    public static PageParameters createPageParameters(final ObjectAdapter adapter, final OidStringifier oidStringifier) {
+    public static PageParameters createPageParameters(final ObjectAdapter adapter) {
 
         final PageParameters pageParameters = new PageParameters();
 

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/appactions/cssmenu/AppActionsCssMenuFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/appactions/cssmenu/AppActionsCssMenuFactory.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/appactions/cssmenu/AppActionsCssMenuFactory.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/appactions/cssmenu/AppActionsCssMenuFactory.java Wed Aug 15 21:15:39 2012
@@ -22,18 +22,13 @@ package org.apache.isis.viewer.wicket.ui
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.wicket.Component;
-import org.apache.wicket.model.IModel;
-
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.oid.stringable.OidStringifier;
 import org.apache.isis.core.metamodel.facets.named.NamedFacet;
 import org.apache.isis.core.metamodel.spec.ActionType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionContainer.Contributed;
 import org.apache.isis.core.progmodel.facets.actions.notinservicemenu.NotInServiceMenuFacet;
-import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
 import org.apache.isis.viewer.wicket.model.models.ApplicationActionsModel;
 import org.apache.isis.viewer.wicket.ui.ComponentFactory;
@@ -43,6 +38,8 @@ import org.apache.isis.viewer.wicket.ui.
 import org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuItem.Builder;
 import org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuLinkFactory;
 import org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuPanel;
+import org.apache.wicket.Component;
+import org.apache.wicket.model.IModel;
 
 /**
  * {@link ComponentFactory} for a {@link CssMenuPanel} to represent the
@@ -120,9 +117,4 @@ public class AppActionsCssMenuFactory ex
     private CssMenuLinkFactory getLinkFactory() {
         return cssMenuLinkFactory;
     }
-
-    static OidStringifier getOidStringifier() {
-        return IsisContext.getPersistenceSession().getOidGenerator().getOidStringifier();
-    }
-
 }

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/appactions/cssmenu/AppActionsCssMenuLinkFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/appactions/cssmenu/AppActionsCssMenuLinkFactory.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/appactions/cssmenu/AppActionsCssMenuLinkFactory.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/appactions/cssmenu/AppActionsCssMenuLinkFactory.java Wed Aug 15 21:15:39 2012
@@ -40,7 +40,7 @@ class AppActionsCssMenuLinkFactory imple
 
     @Override
     public LinkAndLabel newLink(final ObjectAdapterMemento adapterMemento, final ObjectAction action, final String linkId) {
-        final PageParameters pageParameters = ActionModel.createPageParameters(adapterMemento.getObjectAdapter(), action, AppActionsCssMenuFactory.getOidStringifier(), null, ActionModel.SingleResultsMode.REDIRECT);
+        final PageParameters pageParameters = ActionModel.createPageParameters(adapterMemento.getObjectAdapter(), action, null, ActionModel.SingleResultsMode.REDIRECT);
 
         final Class<? extends Page> pageClass = getPageClassRegistry().getPageClass(PageType.ACTION);
 

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/action/EntityActionLinkFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/action/EntityActionLinkFactory.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/action/EntityActionLinkFactory.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/action/EntityActionLinkFactory.java Wed Aug 15 21:15:39 2012
@@ -19,14 +19,7 @@
 
 package org.apache.isis.viewer.wicket.ui.components.entity.blocks.action;
 
-import org.apache.wicket.Application;
-import org.apache.wicket.Page;
-import org.apache.wicket.PageParameters;
-import org.apache.wicket.markup.html.link.BookmarkablePageLink;
-import org.apache.wicket.markup.html.link.Link;
-
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.oid.stringable.OidStringifier;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
@@ -43,6 +36,11 @@ import org.apache.isis.viewer.wicket.ui.
 import org.apache.isis.viewer.wicket.ui.pages.PageClassRegistry;
 import org.apache.isis.viewer.wicket.ui.pages.PageClassRegistryAccessor;
 import org.apache.isis.viewer.wicket.ui.pages.PageType;
+import org.apache.wicket.Application;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.markup.html.link.Link;
 
 public final class EntityActionLinkFactory implements CssMenuLinkFactory {
 
@@ -78,7 +76,7 @@ public final class EntityActionLinkFacto
         final ObjectAdapter adapter = adapterMemento.getObjectAdapter();
         final ObjectAdapter contextAdapter = summaryPanel.getEntityModel().getObject();
 
-        final PageParameters pageParameters = ActionModel.createPageParameters(adapter, action, getOidStringifier(), contextAdapter, ActionModel.SingleResultsMode.REDIRECT);
+        final PageParameters pageParameters = ActionModel.createPageParameters(adapter, action, contextAdapter, ActionModel.SingleResultsMode.REDIRECT);
         final Class<? extends Page> pageClass = getPageClassRegistry().getPageClass(PageType.ACTION);
         return newBookmarkablePageLink(linkId, pageClass, pageParameters);
     }
@@ -119,9 +117,6 @@ public final class EntityActionLinkFacto
         return IsisContext.getPersistenceSession();
     }
 
-    protected OidStringifier getOidStringifier() {
-        return getPersistenceSession().getOidGenerator().getOidStringifier();
-    }
 
     // ///////////////////////////////////////////////////////////////////
     // Convenience

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/dropdownchoices/DropDownChoicesForObjectAdapterMementos.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/dropdownchoices/DropDownChoicesForObjectAdapterMementos.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/dropdownchoices/DropDownChoicesForObjectAdapterMementos.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/dropdownchoices/DropDownChoicesForObjectAdapterMementos.java Wed Aug 15 21:15:39 2012
@@ -21,16 +21,12 @@ package org.apache.isis.viewer.wicket.ui
 
 import java.util.List;
 
-import org.apache.wicket.markup.html.form.DropDownChoice;
-import org.apache.wicket.markup.html.form.IChoiceRenderer;
-import org.apache.wicket.model.IModel;
-
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
 import org.apache.isis.core.metamodel.adapter.oid.RootOid;
-import org.apache.isis.core.metamodel.adapter.oid.stringable.OidStringifier;
-import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
-import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
 import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.IChoiceRenderer;
+import org.apache.wicket.model.IModel;
 
 public class DropDownChoicesForObjectAdapterMementos extends DropDownChoice<ObjectAdapterMemento> {
 
@@ -46,15 +42,8 @@ public class DropDownChoicesForObjectAda
         @Override
         public String getIdValue(final ObjectAdapterMemento nom, final int index) {
             final Oid oid = nom.getObjectAdapter().getOid();
-            return getOidStringifier().enString((RootOid) oid);
-        }
-
-        protected OidStringifier getOidStringifier() {
-            return getPersistenceSession().getOidGenerator().getOidStringifier();
-        }
-
-        protected PersistenceSession getPersistenceSession() {
-            return IsisContext.getPersistenceSession();
+            RootOid rootOid = (RootOid) oid;
+            return rootOid.enString();
         }
     }
 

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/EntityLink.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/EntityLink.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/EntityLink.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/EntityLink.java Wed Aug 15 21:15:39 2012
@@ -361,7 +361,7 @@ public class EntityLink extends FormComp
     }
 
     private void addOrReplaceLink(final ObjectAdapter adapter) {
-        final PageParameters pageParameters = EntityModel.createPageParameters(adapter, getOidStringifier());
+        final PageParameters pageParameters = EntityModel.createPageParameters(adapter);
         final Class<? extends Page> pageClass = getPageClassRegistry().getPageClass(PageType.ENTITY);
         final BookmarkablePageLink<EntityPage> link = new BookmarkablePageLink<EntityPage>(ID_ENTITY_LINK, pageClass, pageParameters);
         label = new Label(ID_ENTITY_TITLE, adapter.titleString());

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/formcomponent/FormComponentPanelAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/formcomponent/FormComponentPanelAbstract.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/formcomponent/FormComponentPanelAbstract.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/formcomponent/FormComponentPanelAbstract.java Wed Aug 15 21:15:39 2012
@@ -21,18 +21,10 @@ package org.apache.isis.viewer.wicket.ui
 
 import java.util.List;
 
-import org.apache.wicket.Component;
-import org.apache.wicket.MarkupContainer;
-import org.apache.wicket.Session;
-import org.apache.wicket.markup.html.form.FormComponent;
-import org.apache.wicket.markup.html.form.FormComponentPanel;
-import org.apache.wicket.model.IModel;
-
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.authentication.AuthenticationSessionProvider;
 import org.apache.isis.core.commons.authentication.AuthenticationSessionProviderAware;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.oid.stringable.OidStringifier;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor;
 import org.apache.isis.viewer.wicket.model.isis.PersistenceSessionProvider;
@@ -44,6 +36,12 @@ import org.apache.isis.viewer.wicket.ui.
 import org.apache.isis.viewer.wicket.ui.pages.PageClassRegistry;
 import org.apache.isis.viewer.wicket.ui.pages.PageClassRegistryAccessor;
 import org.apache.isis.viewer.wicket.ui.util.Components;
+import org.apache.wicket.Component;
+import org.apache.wicket.MarkupContainer;
+import org.apache.wicket.Session;
+import org.apache.wicket.markup.html.form.FormComponent;
+import org.apache.wicket.markup.html.form.FormComponentPanel;
+import org.apache.wicket.model.IModel;
 
 /**
  * Convenience adapter for {@link FormComponent}s that are implemented using the
@@ -161,10 +159,6 @@ public abstract class FormComponentPanel
         return IsisContext.getPersistenceSession().getServices();
     }
 
-    protected OidStringifier getOidStringifier() {
-        return IsisContext.getPersistenceSession().getOidGenerator().getOidStringifier();
-    }
-
     
     // /////////////////////////////////////////////////
     // *Provider impl.

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java Wed Aug 15 21:15:39 2012
@@ -23,15 +23,6 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.wicket.PageParameters;
-import org.apache.wicket.RestartResponseAtInterceptPageException;
-import org.apache.wicket.markup.MarkupStream;
-import org.apache.wicket.markup.html.WebPage;
-import org.apache.wicket.markup.html.internal.HtmlHeaderContainer;
-import org.apache.wicket.markup.html.link.Link;
-import org.apache.wicket.model.IModel;
-
-import org.apache.isis.core.metamodel.adapter.oid.stringable.OidStringifier;
 import org.apache.isis.core.metamodel.services.ServicesInjectorSpi;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
@@ -43,6 +34,13 @@ import org.apache.isis.viewer.wicket.ui.
 import org.apache.isis.viewer.wicket.ui.app.registry.ComponentFactoryRegistry;
 import org.apache.isis.viewer.wicket.ui.app.registry.ComponentFactoryRegistryAccessor;
 import org.apache.isis.viewer.wicket.ui.pages.login.WicketSignInPage;
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.RestartResponseAtInterceptPageException;
+import org.apache.wicket.markup.MarkupStream;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.internal.HtmlHeaderContainer;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.model.IModel;
 
 /**
  * Convenience adapter for {@link WebPage}s built up using {@link ComponentType}
@@ -157,10 +155,6 @@ public abstract class PageAbstract exten
         return IsisContext.getPersistenceSession();
     }
 
-    protected OidStringifier getOidStringifier() {
-        return getPersistenceSession().getOidGenerator().getOidStringifier();
-    }
-
     protected SpecificationLoaderSpi getSpecificationLoader() {
         return IsisContext.getSpecificationLoader();
     }

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java Wed Aug 15 21:15:39 2012
@@ -52,7 +52,7 @@ public class ActionPage extends PageAbst
     }
 
     private IModel<?> buildModel() {
-        return ActionModel.createForPersistent(getPageParameters(), getOidStringifier());
+        return ActionModel.createForPersistent(getPageParameters());
     }
 
 }

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/FormAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/FormAbstract.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/FormAbstract.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/FormAbstract.java Wed Aug 15 21:15:39 2012
@@ -21,25 +21,22 @@ package org.apache.isis.viewer.wicket.ui
 
 import java.util.List;
 
-import org.apache.wicket.ResourceReference;
-import org.apache.wicket.markup.html.IHeaderContributor;
-import org.apache.wicket.markup.html.IHeaderResponse;
-import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.model.IModel;
-
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.authentication.AuthenticationSessionProvider;
 import org.apache.isis.core.commons.authentication.AuthenticationSessionProviderAware;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.oid.stringable.OidStringifier;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
-import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor;
 import org.apache.isis.viewer.wicket.model.isis.PersistenceSessionProvider;
 import org.apache.isis.viewer.wicket.ui.app.registry.ComponentFactoryRegistry;
 import org.apache.isis.viewer.wicket.ui.app.registry.ComponentFactoryRegistryAccessor;
 import org.apache.isis.viewer.wicket.ui.pages.PageClassRegistry;
 import org.apache.isis.viewer.wicket.ui.pages.PageClassRegistryAccessor;
+import org.apache.wicket.ResourceReference;
+import org.apache.wicket.markup.html.IHeaderContributor;
+import org.apache.wicket.markup.html.IHeaderResponse;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.IModel;
 
 public abstract class FormAbstract<T> extends Form<T> implements IHeaderContributor, ComponentFactoryRegistryAccessor, PageClassRegistryAccessor, AuthenticationSessionProvider, PersistenceSessionProvider {
 
@@ -111,10 +108,6 @@ public abstract class FormAbstract<T> ex
         return IsisContext.getPersistenceSession().getServices();
     }
 
-    protected OidStringifier getOidStringifier() {
-        return IsisContext.getPersistenceSession().getOidGenerator().getOidStringifier();
-    }
-
     // /////////////////////////////////////////////////
     // *Provider impl.
     // /////////////////////////////////////////////////

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/PanelAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/PanelAbstract.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/PanelAbstract.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/PanelAbstract.java Wed Aug 15 21:15:39 2012
@@ -21,28 +21,26 @@ package org.apache.isis.viewer.wicket.ui
 
 import java.util.List;
 
-import com.google.inject.Inject;
-
-import org.apache.wicket.Component;
-import org.apache.wicket.ResourceReference;
-import org.apache.wicket.Session;
-import org.apache.wicket.markup.html.IHeaderContributor;
-import org.apache.wicket.markup.html.IHeaderResponse;
-import org.apache.wicket.markup.html.panel.Panel;
-import org.apache.wicket.model.IModel;
-
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.authentication.AuthenticationSessionProvider;
 import org.apache.isis.core.commons.authentication.AuthenticationSessionProviderAware;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
-import org.apache.isis.core.metamodel.adapter.oid.stringable.OidStringifier;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor;
 import org.apache.isis.viewer.wicket.model.isis.PersistenceSessionProvider;
 import org.apache.isis.viewer.wicket.ui.ComponentType;
 import org.apache.isis.viewer.wicket.ui.app.registry.ComponentFactoryRegistry;
 import org.apache.isis.viewer.wicket.ui.util.Components;
+import org.apache.wicket.Component;
+import org.apache.wicket.ResourceReference;
+import org.apache.wicket.Session;
+import org.apache.wicket.markup.html.IHeaderContributor;
+import org.apache.wicket.markup.html.IHeaderResponse;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+
+import com.google.inject.Inject;
 
 /**
  * Convenience adapter for {@link Panel}s built up using {@link ComponentType}s.
@@ -170,10 +168,6 @@ public abstract class PanelAbstract<T ex
         return IsisContext.getPersistenceSession().getServices();
     }
 
-    protected OidStringifier getOidStringifier() {
-        return IsisContext.getPersistenceSession().getOidGenerator().getOidStringifier();
-    }
-
     // /////////////////////////////////////////////////
     // Dependency Injection
     // /////////////////////////////////////////////////

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/test/java/org/apache/isis/viewer/wicket/ui/fixtures/SystemFixtures.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/test/java/org/apache/isis/viewer/wicket/ui/fixtures/SystemFixtures.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/test/java/org/apache/isis/viewer/wicket/ui/fixtures/SystemFixtures.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/test/java/org/apache/isis/viewer/wicket/ui/fixtures/SystemFixtures.java Wed Aug 15 21:15:39 2012
@@ -19,15 +19,12 @@
 
 package org.apache.isis.viewer.wicket.ui.fixtures;
 
-import org.apache.wicket.markup.html.link.Link;
-import org.jmock.Expectations;
-import org.jmock.Mockery;
-
-import org.apache.isis.core.metamodel.adapter.oid.RootOid;
-import org.apache.isis.core.metamodel.adapter.oid.stringable.OidStringifier;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
 import org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuLinkFactory;
+import org.apache.wicket.markup.html.link.Link;
+import org.jmock.Expectations;
+import org.jmock.Mockery;
 
 public final class SystemFixtures {
 
@@ -37,15 +34,6 @@ public final class SystemFixtures {
         this.context = context;
     }
 
-    public void enstringOid(final OidStringifier mockOidStringifier, final RootOid mockOid, final String returns) {
-        context.checking(new Expectations() {
-            {
-                allowing(mockOidStringifier).enString(mockOid);
-                will(returnValue(returns));
-            }
-        });
-    }
-
     public <T> void newLink(final CssMenuLinkFactory mockLinkBuilder, final String linkId, final ObjectAdapterMemento adapterMemento, final ObjectAction noAction, final Link<T> returns) {
         context.checking(new Expectations() {
             {

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/ConverterForObjectAdapter.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/ConverterForObjectAdapter.java?rev=1373632&r1=1373631&r2=1373632&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/ConverterForObjectAdapter.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/ConverterForObjectAdapter.java Wed Aug 15 21:15:39 2012
@@ -21,16 +21,14 @@ package org.apache.isis.viewer.wicket.vi
 
 import java.util.Locale;
 
-import org.apache.wicket.util.convert.IConverter;
-
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
 import org.apache.isis.core.metamodel.adapter.oid.RootOid;
-import org.apache.isis.core.metamodel.adapter.oid.stringable.OidStringifier;
+import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
-import org.apache.isis.runtimes.dflt.runtime.system.persistence.AdapterManagerSpi;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
+import org.apache.wicket.util.convert.IConverter;
 
 /**
  * Implementation of a Wicket {@link IConverter} for {@link ObjectAdapter}s,
@@ -41,18 +39,17 @@ public class ConverterForObjectAdapter i
     private static final long serialVersionUID = 1L;
 
     /**
-     * Converts {@link OidStringifier stringified} {@link Oid} to
+     * Converts string representation of {@link Oid} to
      * {@link ObjectAdapter}.
      */
     @Override
     public Object convertToObject(final String value, final Locale locale) {
-        final Oid oid = getOidStringifier().deString(value);
+        final Oid oid = RootOidDefault.deStringEncoded(value);
         return getAdapterManager().getAdapterFor(oid);
     }
 
     /**
-     * Converts {@link ObjectAdapter} to {@link OidStringifier stringified}
-     * {@link Oid}.
+     * Converts {@link ObjectAdapter} to string representation of {@link Oid}.
      */
     @Override
     public String convertToString(final Object object, final Locale locale) {
@@ -62,17 +59,15 @@ public class ConverterForObjectAdapter i
             // values don't have an Oid
             return null;
         }
-        return getOidStringifier().enString((RootOid) oid);
+        
+        RootOid rootOid = (RootOid) oid;
+        return rootOid.enString();
     }
 
     protected AdapterManager getAdapterManager() {
         return getPersistenceSession().getAdapterManager();
     }
 
-    protected OidStringifier getOidStringifier() {
-        return getPersistenceSession().getOidGenerator().getOidStringifier();
-    }
-
     protected PersistenceSession getPersistenceSession() {
         return IsisContext.getPersistenceSession();
     }



Mime
View raw message