incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1098935 [7/20] - in /incubator/isis/trunk/runtimes/dflt: bytecode/dflt/src/main/java/org/apache/isis/runtimes/dflt/bytecode/dflt/classsubstitutor/ bytecode/dflt/src/main/java/org/apache/isis/runtimes/dflt/bytecode/dflt/objectfactory/ bytec...
Date Tue, 03 May 2011 06:22:23 GMT
Modified: incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectfactory/ObjectFactoryAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectfactory/ObjectFactoryAbstract.java?rev=1098935&r1=1098934&r2=1098935&view=diff
==============================================================================
--- incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectfactory/ObjectFactoryAbstract.java (original)
+++ incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectfactory/ObjectFactoryAbstract.java Tue May  3 06:22:09 2011
@@ -17,11 +17,10 @@
  *  under the License.
  */
 
+package org.apache.isis.runtimes.dflt.runtime.persistence.objectfactory;
+
+import java.lang.reflect.Modifier;
 
-package org.apache.isis.runtimes.dflt.runtime.persistence.objectfactory;
-
-import java.lang.reflect.Modifier;
-
 import org.apache.isis.core.metamodel.services.ServicesInjector;
 import org.apache.isis.core.metamodel.spec.ObjectInstantiationException;
 import org.apache.isis.core.metamodel.spec.SpecificationLoader;
@@ -29,107 +28,103 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.ObjectFactory;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
-
-/**
- * Abstract adapter for {@link ObjectFactory}.
- * 
- * <p>
- * Implementation note: rather than use the <tt>*Aware</tt> interfaces, we
- * instead look up dependencies from the {@link IsisContext}. This is
- * necessary, for the {@link PersistenceSession} at least, because class
- * enhancers may hold a reference to the factory as part of the generated
- * bytecode. Since the {@link PersistenceSession} could change over the lifetime
- * of the instance (eg when using the {@link InMemoryObjectStore}), we must
- * always look the {@link PersistenceSession} from the
- * {@link IsisContext}. The same applies to the {@link ServicesInjector}.
- * 
- * <p>
- * In theory it would be possible to cache the {@link SpecificationLoader} and
- * inject using {@link SpecificationLoaderAware}, but since we are already using
- * the {@link IsisContext}, decided instead to use the same approach throughout.
- */
-public abstract class ObjectFactoryAbstract implements ObjectFactory {
-
-	private final Mode mode;
-
-	public enum Mode {
-		/**
-		 * Fail if no {@link ObjectAdapterPersistor} has been injected.
-		 */
-		STRICT,
-		/**
-		 * Ignore if no {@link ObjectAdapterPersistor} has been injected (intended
-		 * for testing only).
-		 */
-		RELAXED
-	}
-
-	public ObjectFactoryAbstract() {
-		this(Mode.STRICT);
-	}
-
-	public ObjectFactoryAbstract(Mode mode) {
-		this.mode = mode;
-	}
-
-	public <T> T instantiate(Class<T> cls) throws ObjectInstantiationException {
-
-		if (mode == Mode.STRICT && getServicesInjector() == null) {
-			throw new IllegalStateException(
-					"ServicesInjector has not been injected into ObjectFactory");
-		}
-		if (Modifier.isAbstract(cls.getModifiers())) {
-			throw new ObjectInstantiationException(
-					"Cannot create an instance of an abstract class: " + cls);
-		}
-		T newInstance = doInstantiate(cls);
-
-		if (getServicesInjector() != null) {
-			getServicesInjector().injectDependencies(newInstance);
-		}
-		return newInstance;
-	}
-
-	// /////////////////////////////////////////////////////////////////
-	// open, close
-	// /////////////////////////////////////////////////////////////////
-
-	/**
-	 * Default implementation does nothing.
-	 */
-	public void open() {
-	}
-
-	/**
-	 * Default implementation does nothing.
-	 */
-	public void close() {
-	}
-
-	// /////////////////////////////////////////////////////////////////
-	// doInstantiate
-	// /////////////////////////////////////////////////////////////////
-
-	/**
-	 * Hook method for subclasses to override.
-	 */
-	protected abstract <T> T doInstantiate(Class<T> cls)
-			throws ObjectInstantiationException;
-
-	// /////////////////////////////////////////////////////////////////
-	// Dependencies (looked up from context)
-	// /////////////////////////////////////////////////////////////////
-
-	protected SpecificationLoader getSpecificationLoader() {
-		return IsisContext.getSpecificationLoader();
-	}
-
-	protected PersistenceSession getPersistenceSession() {
-		return IsisContext.getPersistenceSession();
-	}
-
-	protected ServicesInjector getServicesInjector() {
-		return getPersistenceSession().getServicesInjector();
-	}
-
-}
+
+/**
+ * Abstract adapter for {@link ObjectFactory}.
+ * 
+ * <p>
+ * Implementation note: rather than use the <tt>*Aware</tt> interfaces, we instead look up dependencies from the
+ * {@link IsisContext}. This is necessary, for the {@link PersistenceSession} at least, because class enhancers may hold
+ * a reference to the factory as part of the generated bytecode. Since the {@link PersistenceSession} could change over
+ * the lifetime of the instance (eg when using the {@link InMemoryObjectStore}), we must always look the
+ * {@link PersistenceSession} from the {@link IsisContext}. The same applies to the {@link ServicesInjector}.
+ * 
+ * <p>
+ * In theory it would be possible to cache the {@link SpecificationLoader} and inject using
+ * {@link SpecificationLoaderAware}, but since we are already using the {@link IsisContext}, decided instead to use the
+ * same approach throughout.
+ */
+public abstract class ObjectFactoryAbstract implements ObjectFactory {
+
+    private final Mode mode;
+
+    public enum Mode {
+        /**
+         * Fail if no {@link ObjectAdapterPersistor} has been injected.
+         */
+        STRICT,
+        /**
+         * Ignore if no {@link ObjectAdapterPersistor} has been injected (intended for testing only).
+         */
+        RELAXED
+    }
+
+    public ObjectFactoryAbstract() {
+        this(Mode.STRICT);
+    }
+
+    public ObjectFactoryAbstract(final Mode mode) {
+        this.mode = mode;
+    }
+
+    @Override
+    public <T> T instantiate(final Class<T> cls) throws ObjectInstantiationException {
+
+        if (mode == Mode.STRICT && getServicesInjector() == null) {
+            throw new IllegalStateException("ServicesInjector has not been injected into ObjectFactory");
+        }
+        if (Modifier.isAbstract(cls.getModifiers())) {
+            throw new ObjectInstantiationException("Cannot create an instance of an abstract class: " + cls);
+        }
+        final T newInstance = doInstantiate(cls);
+
+        if (getServicesInjector() != null) {
+            getServicesInjector().injectDependencies(newInstance);
+        }
+        return newInstance;
+    }
+
+    // /////////////////////////////////////////////////////////////////
+    // open, close
+    // /////////////////////////////////////////////////////////////////
+
+    /**
+     * Default implementation does nothing.
+     */
+    @Override
+    public void open() {
+    }
+
+    /**
+     * Default implementation does nothing.
+     */
+    @Override
+    public void close() {
+    }
+
+    // /////////////////////////////////////////////////////////////////
+    // doInstantiate
+    // /////////////////////////////////////////////////////////////////
+
+    /**
+     * Hook method for subclasses to override.
+     */
+    protected abstract <T> T doInstantiate(Class<T> cls) throws ObjectInstantiationException;
+
+    // /////////////////////////////////////////////////////////////////
+    // Dependencies (looked up from context)
+    // /////////////////////////////////////////////////////////////////
+
+    protected SpecificationLoader getSpecificationLoader() {
+        return IsisContext.getSpecificationLoader();
+    }
+
+    protected PersistenceSession getPersistenceSession() {
+        return IsisContext.getPersistenceSession();
+    }
+
+    protected ServicesInjector getServicesInjector() {
+        return getPersistenceSession().getServicesInjector();
+    }
+
+}

Modified: incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectfactory/ObjectResolver.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectfactory/ObjectResolver.java?rev=1098935&r1=1098934&r2=1098935&view=diff
==============================================================================
--- incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectfactory/ObjectResolver.java (original)
+++ incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectfactory/ObjectResolver.java Tue May  3 06:22:09 2011
@@ -17,12 +17,10 @@
  *  under the License.
  */
 
-
 package org.apache.isis.runtimes.dflt.runtime.persistence.objectfactory;
 
 public interface ObjectResolver {
 
-	void resolve(Object domainObject, String propertyName);
-
+    void resolve(Object domainObject, String propertyName);
 
 }

Modified: incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/IsisStoreDelegating.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/IsisStoreDelegating.java?rev=1098935&r1=1098934&r2=1098935&view=diff
==============================================================================
--- incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/IsisStoreDelegating.java (original)
+++ incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/IsisStoreDelegating.java Tue May  3 06:22:09 2011
@@ -17,11 +17,10 @@
  *  under the License.
  */
 
+package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore;
+
+import java.util.List;
 
-package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore;
-
-import java.util.List;
-
 import org.apache.isis.core.commons.debug.DebugBuilder;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
@@ -32,146 +31,162 @@ import org.apache.isis.runtimes.dflt.run
 import org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.transaction.PersistenceCommand;
 import org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.transaction.SaveObjectCommand;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceQuery;
-
-/**
- * Implementation that simply delegates to underlying {@link ObjectStore}.
- * 
- * <p>
- * Useful for quickly writing decorating implementations.
- */
-public abstract class IsisStoreDelegating implements ObjectStore {
-    
-    private final ObjectStore underlying;
-    private final String name;
-
-    public IsisStoreDelegating(final ObjectStore underlying, final String name) {
-        this.underlying = underlying;
-        this.name = name;
-    }
-
-    
-    //////////////////////////////////////////////////
-    // name
-    //////////////////////////////////////////////////
-
-    public String name() {
-        return name + "(" + underlying.name() + ")";
-    }
-
-    //////////////////////////////////////////////////
-    // init, shutdown, reset, isInitialized
-    //////////////////////////////////////////////////
-
-    public void open() {
-        underlying.open();
-    }
-
-    public void close() {
-        underlying.close();
-    }
-    
-    public void reset() {
-        underlying.reset();
-    }
-
-    public boolean isFixturesInstalled() {
-        return underlying.isFixturesInstalled();
-    }
-
-
-    //////////////////////////////////////////////////
-    // createXxxCommands
-    //////////////////////////////////////////////////
-
-    public CreateObjectCommand createCreateObjectCommand(ObjectAdapter object) {
-        return underlying.createCreateObjectCommand(object);
-    }
-
-    public DestroyObjectCommand createDestroyObjectCommand(ObjectAdapter object) {
-        return underlying.createDestroyObjectCommand(object);
-    }
-
-    public SaveObjectCommand createSaveObjectCommand(ObjectAdapter object) {
-        return underlying.createSaveObjectCommand(object);
-    }
-
-    //////////////////////////////////////////////////
-    // execute
-    //////////////////////////////////////////////////
-
-    public void execute(final List<PersistenceCommand> commands) {
-        underlying.execute(commands);
-    }
-
-    
-    //////////////////////////////////////////////////
-    // TransactionManagement
-    //////////////////////////////////////////////////
-    
-    public void startTransaction() {
-        underlying.startTransaction();
-    }
-    
-    public void endTransaction() {
-        underlying.endTransaction();
-    }
-
-    public void abortTransaction() {
-        underlying.abortTransaction();
-    }
-    
-    //////////////////////////////////////////////////
-    // getObject, resolveImmediately, resolveField
-    //////////////////////////////////////////////////
-
-    public ObjectAdapter getObject(Oid oid, ObjectSpecification hint) {
-        return underlying.getObject(oid, hint);
-    }
-
-    public void resolveField(ObjectAdapter object, ObjectAssociation field) {
-        underlying.resolveField(object, field);
-    }
-
-    public void resolveImmediately(ObjectAdapter object) {
-        underlying.resolveImmediately(object);
-    }
-
-    
-    //////////////////////////////////////////////////
-    // getInstances, hasInstances
-    //////////////////////////////////////////////////
-
-    public ObjectAdapter[] getInstances(PersistenceQuery persistenceQuery) {
-        return underlying.getInstances(persistenceQuery);
-    }
-
-    public boolean hasInstances(ObjectSpecification specification) {
-        return underlying.hasInstances(specification);
-    }
-
-        
-    //////////////////////////////////////////////////
-    // services
-    //////////////////////////////////////////////////
-
-    public Oid getOidForService(String name) {
-        return underlying.getOidForService(name);
-    }
-
-    public void registerService(String name, Oid oid) {
-        underlying.registerService(name, oid);
-    }
-
-    //////////////////////////////////////////////////
-    // debug
-    //////////////////////////////////////////////////
-
-    public void debugData(DebugBuilder debug) {
-        underlying.debugData(debug);
-    }
-
-    public String debugTitle() {
-        return underlying.debugTitle();
-    }
-
-}
+
+/**
+ * Implementation that simply delegates to underlying {@link ObjectStore}.
+ * 
+ * <p>
+ * Useful for quickly writing decorating implementations.
+ */
+public abstract class IsisStoreDelegating implements ObjectStore {
+
+    private final ObjectStore underlying;
+    private final String name;
+
+    public IsisStoreDelegating(final ObjectStore underlying, final String name) {
+        this.underlying = underlying;
+        this.name = name;
+    }
+
+    // ////////////////////////////////////////////////
+    // name
+    // ////////////////////////////////////////////////
+
+    @Override
+    public String name() {
+        return name + "(" + underlying.name() + ")";
+    }
+
+    // ////////////////////////////////////////////////
+    // init, shutdown, reset, isInitialized
+    // ////////////////////////////////////////////////
+
+    @Override
+    public void open() {
+        underlying.open();
+    }
+
+    @Override
+    public void close() {
+        underlying.close();
+    }
+
+    @Override
+    public void reset() {
+        underlying.reset();
+    }
+
+    @Override
+    public boolean isFixturesInstalled() {
+        return underlying.isFixturesInstalled();
+    }
+
+    // ////////////////////////////////////////////////
+    // createXxxCommands
+    // ////////////////////////////////////////////////
+
+    @Override
+    public CreateObjectCommand createCreateObjectCommand(final ObjectAdapter object) {
+        return underlying.createCreateObjectCommand(object);
+    }
+
+    @Override
+    public DestroyObjectCommand createDestroyObjectCommand(final ObjectAdapter object) {
+        return underlying.createDestroyObjectCommand(object);
+    }
+
+    @Override
+    public SaveObjectCommand createSaveObjectCommand(final ObjectAdapter object) {
+        return underlying.createSaveObjectCommand(object);
+    }
+
+    // ////////////////////////////////////////////////
+    // execute
+    // ////////////////////////////////////////////////
+
+    @Override
+    public void execute(final List<PersistenceCommand> commands) {
+        underlying.execute(commands);
+    }
+
+    // ////////////////////////////////////////////////
+    // TransactionManagement
+    // ////////////////////////////////////////////////
+
+    @Override
+    public void startTransaction() {
+        underlying.startTransaction();
+    }
+
+    @Override
+    public void endTransaction() {
+        underlying.endTransaction();
+    }
+
+    @Override
+    public void abortTransaction() {
+        underlying.abortTransaction();
+    }
+
+    // ////////////////////////////////////////////////
+    // getObject, resolveImmediately, resolveField
+    // ////////////////////////////////////////////////
+
+    @Override
+    public ObjectAdapter getObject(final Oid oid, final ObjectSpecification hint) {
+        return underlying.getObject(oid, hint);
+    }
+
+    @Override
+    public void resolveField(final ObjectAdapter object, final ObjectAssociation field) {
+        underlying.resolveField(object, field);
+    }
+
+    @Override
+    public void resolveImmediately(final ObjectAdapter object) {
+        underlying.resolveImmediately(object);
+    }
+
+    // ////////////////////////////////////////////////
+    // getInstances, hasInstances
+    // ////////////////////////////////////////////////
+
+    @Override
+    public ObjectAdapter[] getInstances(final PersistenceQuery persistenceQuery) {
+        return underlying.getInstances(persistenceQuery);
+    }
+
+    @Override
+    public boolean hasInstances(final ObjectSpecification specification) {
+        return underlying.hasInstances(specification);
+    }
+
+    // ////////////////////////////////////////////////
+    // services
+    // ////////////////////////////////////////////////
+
+    @Override
+    public Oid getOidForService(final String name) {
+        return underlying.getOidForService(name);
+    }
+
+    @Override
+    public void registerService(final String name, final Oid oid) {
+        underlying.registerService(name, oid);
+    }
+
+    // ////////////////////////////////////////////////
+    // debug
+    // ////////////////////////////////////////////////
+
+    @Override
+    public void debugData(final DebugBuilder debug) {
+        underlying.debugData(debug);
+    }
+
+    @Override
+    public String debugTitle() {
+        return underlying.debugTitle();
+    }
+
+}

Modified: incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/IsisStoreLogger.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/IsisStoreLogger.java?rev=1098935&r1=1098934&r2=1098935&view=diff
==============================================================================
--- incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/IsisStoreLogger.java (original)
+++ incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/IsisStoreLogger.java Tue May  3 06:22:09 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore;
 
 import java.util.List;
@@ -39,7 +38,6 @@ import org.apache.isis.runtimes.dflt.run
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceQuery;
 import org.apache.isis.runtimes.dflt.runtime.transaction.ObjectPersistenceException;
 
-
 public class IsisStoreLogger extends Logger implements ObjectStore {
     private final ObjectStore decorated;
 
@@ -52,30 +50,36 @@ public class IsisStoreLogger extends Log
         this.decorated = decorated;
     }
 
+    @Override
     public CreateObjectCommand createCreateObjectCommand(final ObjectAdapter object) {
         log("create object " + object);
         return decorated.createCreateObjectCommand(object);
     }
 
+    @Override
     public void registerService(final String name, final Oid oid) {
         log("register service " + name + " as " + oid);
         decorated.registerService(name, oid);
     }
 
+    @Override
     public DestroyObjectCommand createDestroyObjectCommand(final ObjectAdapter object) {
         log("destroy object " + object);
         return decorated.createDestroyObjectCommand(object);
     }
 
+    @Override
     public SaveObjectCommand createSaveObjectCommand(final ObjectAdapter object) {
         log("save object " + object);
         return decorated.createSaveObjectCommand(object);
     }
 
+    @Override
     public void debugData(final DebugBuilder debug) {
         decorated.debugData(debug);
     }
 
+    @Override
     public String debugTitle() {
         return decorated.debugTitle();
     }
@@ -85,84 +89,99 @@ public class IsisStoreLogger extends Log
         return decorated.getClass();
     }
 
+    @Override
     public ObjectAdapter[] getInstances(final PersistenceQuery criteria) throws ObjectPersistenceException,
-            UnsupportedFindException {
+        UnsupportedFindException {
         log("get instances matching " + criteria);
         return decorated.getInstances(criteria);
     }
 
+    @Override
     public ObjectAdapter getObject(final Oid oid, final ObjectSpecification hint) throws ObjectNotFoundException,
-            ObjectPersistenceException {
+        ObjectPersistenceException {
         final ObjectAdapter object = decorated.getObject(oid, hint);
         log("get object for " + oid + " (of type " + hint.getShortIdentifier() + ")", object.getObject());
         return object;
     }
 
+    @Override
     public Oid getOidForService(final String name) {
         final Oid oid = decorated.getOidForService(name);
         log("get OID for service " + name + ": " + oid);
         return oid;
     }
 
-    public boolean hasInstances(final ObjectSpecification specification)
-            throws ObjectPersistenceException {
+    @Override
+    public boolean hasInstances(final ObjectSpecification specification) throws ObjectPersistenceException {
         final boolean hasInstances = decorated.hasInstances(specification);
         log("has instances of " + specification.getShortIdentifier(), "" + hasInstances);
         return hasInstances;
     }
 
+    @Override
     public boolean isFixturesInstalled() {
         final boolean isInitialized = decorated.isFixturesInstalled();
         log("is initialized: " + isInitialized);
         return isInitialized;
     }
 
+    @Override
     public void open() throws IsisConfigurationException, InstanceCreationException, ObjectPersistenceException {
         log("opening " + name());
         decorated.open();
     }
 
+    @Override
     public String name() {
         return decorated.name();
     }
 
+    @Override
     public void reset() {
         log("reset");
         decorated.reset();
     }
 
-    public void resolveField(final ObjectAdapter object, final ObjectAssociation field) throws ObjectPersistenceException {
+    @Override
+    public void resolveField(final ObjectAdapter object, final ObjectAssociation field)
+        throws ObjectPersistenceException {
         log("resolve eagerly object in field " + field + " of " + object);
         decorated.resolveField(object, field);
     }
 
+    @Override
     public void resolveImmediately(final ObjectAdapter object) throws ObjectPersistenceException {
         log("resolve immediately: " + object);
         decorated.resolveImmediately(object);
     }
 
+    @Override
     public void execute(final List<PersistenceCommand> commands) throws ObjectPersistenceException {
         log("execute commands");
         int i = 0;
-        for (PersistenceCommand command: commands) {
+        for (final PersistenceCommand command : commands) {
             log("  " + (i++) + " " + command);
         }
         decorated.execute(commands);
     }
 
+    @Override
     public void close() throws ObjectPersistenceException {
         log("closing " + decorated);
         decorated.close();
     }
 
+    @Override
     public void startTransaction() {
         decorated.startTransaction();
     }
 
+    @Override
     public void endTransaction() {
         decorated.endTransaction();
     }
-    
+
+    @Override
     public void abortTransaction() {
         decorated.abortTransaction();
     }

Modified: incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/ObjectStore.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/ObjectStore.java?rev=1098935&r1=1098934&r2=1098935&view=diff
==============================================================================
--- incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/ObjectStore.java (original)
+++ incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/ObjectStore.java Tue May  3 06:22:09 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore;
 
 public interface ObjectStore extends ObjectStorePersistence, ObjectStoreTransactionManagement {

Modified: incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/ObjectStorePersistence.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/ObjectStorePersistence.java?rev=1098935&r1=1098934&r2=1098935&view=diff
==============================================================================
--- incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/ObjectStorePersistence.java (original)
+++ incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/ObjectStorePersistence.java Tue May  3 06:22:09 2011
@@ -38,7 +38,6 @@ import org.apache.isis.runtimes.dflt.run
 
 public interface ObjectStorePersistence extends DebuggableWithTitle, SessionScopedComponent {
 
-
     /**
      * The name of this component.
      */

Modified: incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/ObjectStoreTransactionManagement.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/ObjectStoreTransactionManagement.java?rev=1098935&r1=1098934&r2=1098935&view=diff
==============================================================================
--- incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/ObjectStoreTransactionManagement.java (original)
+++ incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/ObjectStoreTransactionManagement.java Tue May  3 06:22:09 2011
@@ -17,49 +17,42 @@
  *  under the License.
  */
 
+package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore;
+
+import java.util.List;
 
-package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore;
-
-import java.util.List;
-
 import org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.transaction.ObjectStoreTransaction;
 import org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.transaction.ObjectStoreTransactionManager;
 import org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.transaction.PersistenceCommand;
 import org.apache.isis.runtimes.dflt.runtime.system.transaction.IsisTransactionManager;
-
-
-/**
- * Interface for the {@link IsisTransactionManager} to interact with the
- * {@link ObjectStore}.
- */
-public interface ObjectStoreTransactionManagement {
-
-    /**
-     * Used by the {@link ObjectStoreTransactionManager} to tell the underlying
-     * {@link ObjectStore} to start a transaction.
-     */
-    void startTransaction();
-
-    /**
-     * Used by the current {@link ObjectStoreTransaction} to flush changes to
-     * the {@link ObjectStore} (either via a {@link IsisTransactionManager#flushTransaction()}
-     * or a {@link IsisTransactionManager#endTransaction()}).
-     */
-    void execute(List<PersistenceCommand> unmodifiableList);
-
-    /**
-     * Used by the {@link ObjectStoreTransactionManager} to tell the underlying
-     * {@link ObjectStore} to commit a transaction.
-     */
-    void endTransaction();
-
-    /**
-     * Used by the {@link ObjectStoreTransactionManager} to tell the underlying
-     * {@link ObjectStore} to abort a transaction.
-     */
-    void abortTransaction();
-
-
-}
-
-
+
+/**
+ * Interface for the {@link IsisTransactionManager} to interact with the {@link ObjectStore}.
+ */
+public interface ObjectStoreTransactionManagement {
+
+    /**
+     * Used by the {@link ObjectStoreTransactionManager} to tell the underlying {@link ObjectStore} to start a
+     * transaction.
+     */
+    void startTransaction();
+
+    /**
+     * Used by the current {@link ObjectStoreTransaction} to flush changes to the {@link ObjectStore} (either via a
+     * {@link IsisTransactionManager#flushTransaction()} or a {@link IsisTransactionManager#endTransaction()}).
+     */
+    void execute(List<PersistenceCommand> unmodifiableList);
+
+    /**
+     * Used by the {@link ObjectStoreTransactionManager} to tell the underlying {@link ObjectStore} to commit a
+     * transaction.
+     */
+    void endTransaction();
+
+    /**
+     * Used by the {@link ObjectStoreTransactionManager} to tell the underlying {@link ObjectStore} to abort a
+     * transaction.
+     */
+    void abortTransaction();
+
+}

Modified: incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/PersistenceSessionObjectStore.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/PersistenceSessionObjectStore.java?rev=1098935&r1=1098934&r2=1098935&view=diff
==============================================================================
--- incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/PersistenceSessionObjectStore.java (original)
+++ incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/PersistenceSessionObjectStore.java Tue May  3 06:22:09 2011
@@ -131,9 +131,9 @@ public class PersistenceSessionObjectSto
      */
     @Override
     public boolean isFixturesInstalled() {
-        PersistenceSessionFactory persistenceSessionFactory = getPersistenceSessionFactory();
+        final PersistenceSessionFactory persistenceSessionFactory = getPersistenceSessionFactory();
         if (persistenceSessionFactory instanceof FixturesInstalledFlag) {
-            FixturesInstalledFlag fixturesInstalledFlag = (FixturesInstalledFlag) persistenceSessionFactory;
+            final FixturesInstalledFlag fixturesInstalledFlag = (FixturesInstalledFlag) persistenceSessionFactory;
             if (fixturesInstalledFlag.isFixturesInstalled() == null) {
                 fixturesInstalledFlag.setFixturesInstalled(objectStore.isFixturesInstalled());
             }
@@ -170,7 +170,7 @@ public class PersistenceSessionObjectSto
         ensureThatArg(oid, is(notNullValue()));
         ensureThatArg(hintSpec, is(notNullValue()));
 
-        ObjectAdapter adapter = getAdapterManager().getAdapterFor(oid);
+        final ObjectAdapter adapter = getAdapterManager().getAdapterFor(oid);
         if (adapter != null) {
             return adapter;
         }
@@ -217,8 +217,8 @@ public class PersistenceSessionObjectSto
             resolveImmediatelyFromPersistenceLayer(adapter);
             if (LOG.isInfoEnabled()) {
                 // don't log object - its toString() may use the unresolved field, or unresolved collection
-                LOG.info("resolved: " + adapter.getSpecification().getShortIdentifier() + " " + resolveState.code() + " "
-                    + adapter.getOid());
+                LOG.info("resolved: " + adapter.getSpecification().getShortIdentifier() + " " + resolveState.code()
+                    + " " + adapter.getOid());
             }
         }
     }
@@ -263,9 +263,9 @@ public class PersistenceSessionObjectSto
         if (LOG.isInfoEnabled()) {
             // don't log object - it's toString() may use the unresolved field
             // or unresolved collection
-            LOG.info("resolve field " + objectAdapter.getSpecification().getShortIdentifier() + "." + field.getId() + ": "
-                + referenceAdapter.getSpecification().getShortIdentifier() + " " + referenceAdapter.getResolveState().code()
-                + " " + referenceAdapter.getOid());
+            LOG.info("resolve field " + objectAdapter.getSpecification().getShortIdentifier() + "." + field.getId()
+                + ": " + referenceAdapter.getSpecification().getShortIdentifier() + " "
+                + referenceAdapter.getResolveState().code() + " " + referenceAdapter.getOid());
         }
         resolveFieldFromPersistenceLayer(objectAdapter, field);
     }
@@ -384,7 +384,7 @@ public class PersistenceSessionObjectSto
 
             @Override
             public void execute() {
-                SaveObjectCommand saveObjectCommand = objectStore.createSaveObjectCommand(adapter);
+                final SaveObjectCommand saveObjectCommand = objectStore.createSaveObjectCommand(adapter);
                 getTransactionManager().addCommand(saveObjectCommand);
             }
 
@@ -430,7 +430,8 @@ public class PersistenceSessionObjectSto
             @Override
             public void execute() {
                 if (adapter.getVersion() == null) {
-                    throw new ObjectPersistenceException("Object to be deleted does not have a version (maybe it should be resolved first): " + adapter);
+                    throw new ObjectPersistenceException(
+                        "Object to be deleted does not have a version (maybe it should be resolved first): " + adapter);
                 }
                 final DestroyObjectCommand command = objectStore.createDestroyObjectCommand(adapter);
                 getTransactionManager().addCommand(command);

Modified: incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/PersistAlgorithm.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/PersistAlgorithm.java?rev=1098935&r1=1098934&r2=1098935&view=diff
==============================================================================
--- incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/PersistAlgorithm.java (original)
+++ incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/PersistAlgorithm.java Tue May  3 06:22:09 2011
@@ -17,14 +17,12 @@
  *  under the License.
  */
 
+package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm;
 
-package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm;
-
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-
-
-public interface PersistAlgorithm {
-    public void makePersistent(final ObjectAdapter object, final ToPersistObjectSet adders);
-
-    public String name();
-}
+
+public interface PersistAlgorithm {
+    public void makePersistent(final ObjectAdapter object, final ToPersistObjectSet adders);
+
+    public String name();
+}

Modified: incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/PersistAlgorithmAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/PersistAlgorithmAbstract.java?rev=1098935&r1=1098934&r2=1098935&view=diff
==============================================================================
--- incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/PersistAlgorithmAbstract.java (original)
+++ incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/PersistAlgorithmAbstract.java Tue May  3 06:22:09 2011
@@ -17,94 +17,81 @@
  *  under the License.
  */
 
+package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm;
 
-package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm;
-
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.ResolveState;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.runtimes.dflt.runtime.persistence.NotPersistableException;
-
-
-public abstract class PersistAlgorithmAbstract implements PersistAlgorithm {
-
-    
-
-    //////////////////////////////////////////////////////////////////
-    // init, shutdown
-    //////////////////////////////////////////////////////////////////
-
-    public void init() {}
-
-    public void shutdown() {}
-
-
-    //////////////////////////////////////////////////////////////////
-    // helpers
-    //////////////////////////////////////////////////////////////////
-
-    /**
-     * Whether the persist algorithm should skip over this object.
-     * 
-     * <p>
-     * There are various reasons why an object should not be persisted:
-     * <ul>
-     * <li>it is already persisted
-     * <li>its {@link ObjectSpecification specification} indicates instances of its
-     * type should not be persisted.
-     * <li>it is {@link ResolveState#VALUE standalone}
-     * <li>it is a {@link ObjectSpecification#isService() service}.
-     * </ul>
-     * 
-     * <p>
-     * Implementation note: the only reason that this method has not been combined with
-     * the weaker check in {@link #alreadyPersistedOrNotPersistable(ObjectAdapter)} is because of 
-     * existing code that throws an exception if the latter is not fulfilled.  
-     * <b><i>REVIEW: should try to combine and remove the other method</i></b>. 
-     */
-    protected boolean alreadyPersistedOrNotPersistableOrServiceOrStandalone(final ObjectAdapter adapter) {
-        return objectIsStandalone(adapter) || 
-               objectSpecIsService(adapter) ||
-               alreadyPersistedOrNotPersistable(adapter); 
-    }
-
-    /**
-     * If has a {@link ResolveState} that is already persisted or has a
-     * {@link ObjectSpecification specification} that indicates instances of its
-     * type should not be persisted.
-     * 
-     * @see #alreadyPersistedOrNotPersistableOrServiceOrStandalone(ObjectAdapter)
-     */
-    protected boolean alreadyPersistedOrNotPersistable(final ObjectAdapter adapter) {
-        return adapter.isPersistent() || 
-               objectSpecNotPersistable(adapter);
-    }
-
-
-    /**
-     * As per {@link #alreadyPersistedOrNotPersistable(ObjectAdapter)}, ensures object can be
-     * persisted else throws {@link NotPersistableException}. 
-     */
-    protected void assertObjectNotPersistentAndPersistable(final ObjectAdapter object) {
-        if (alreadyPersistedOrNotPersistable(object)) {
-            throw new NotPersistableException(
-                    "can't make object persistent - either already persistent, " +
-                    "or transient only: " + object);
-        }
-    }
-
-
-    private boolean objectIsStandalone(final ObjectAdapter adapter) {
-        return adapter.getResolveState().isValue();
-    }
-
-    private boolean objectSpecNotPersistable(final ObjectAdapter adapter) {
-        return !adapter.getSpecification().persistability().isPersistable() || adapter.isAggregated();
-    }
-
-    private boolean objectSpecIsService(final ObjectAdapter adapter) {
-        return adapter.getSpecification().isService();
-    }
-
-
-}
+
+public abstract class PersistAlgorithmAbstract implements PersistAlgorithm {
+
+    // ////////////////////////////////////////////////////////////////
+    // init, shutdown
+    // ////////////////////////////////////////////////////////////////
+
+    public void init() {
+    }
+
+    public void shutdown() {
+    }
+
+    // ////////////////////////////////////////////////////////////////
+    // helpers
+    // ////////////////////////////////////////////////////////////////
+
+    /**
+     * Whether the persist algorithm should skip over this object.
+     * 
+     * <p>
+     * There are various reasons why an object should not be persisted:
+     * <ul>
+     * <li>it is already persisted
+     * <li>its {@link ObjectSpecification specification} indicates instances of its type should not be persisted.
+     * <li>it is {@link ResolveState#VALUE standalone}
+     * <li>it is a {@link ObjectSpecification#isService() service}.
+     * </ul>
+     * 
+     * <p>
+     * Implementation note: the only reason that this method has not been combined with the weaker check in
+     * {@link #alreadyPersistedOrNotPersistable(ObjectAdapter)} is because of existing code that throws an exception if
+     * the latter is not fulfilled. <b><i>REVIEW: should try to combine and remove the other method</i></b>.
+     */
+    protected boolean alreadyPersistedOrNotPersistableOrServiceOrStandalone(final ObjectAdapter adapter) {
+        return objectIsStandalone(adapter) || objectSpecIsService(adapter) || alreadyPersistedOrNotPersistable(adapter);
+    }
+
+    /**
+     * If has a {@link ResolveState} that is already persisted or has a {@link ObjectSpecification specification} that
+     * indicates instances of its type should not be persisted.
+     * 
+     * @see #alreadyPersistedOrNotPersistableOrServiceOrStandalone(ObjectAdapter)
+     */
+    protected boolean alreadyPersistedOrNotPersistable(final ObjectAdapter adapter) {
+        return adapter.isPersistent() || objectSpecNotPersistable(adapter);
+    }
+
+    /**
+     * As per {@link #alreadyPersistedOrNotPersistable(ObjectAdapter)}, ensures object can be persisted else throws
+     * {@link NotPersistableException}.
+     */
+    protected void assertObjectNotPersistentAndPersistable(final ObjectAdapter object) {
+        if (alreadyPersistedOrNotPersistable(object)) {
+            throw new NotPersistableException("can't make object persistent - either already persistent, "
+                + "or transient only: " + object);
+        }
+    }
+
+    private boolean objectIsStandalone(final ObjectAdapter adapter) {
+        return adapter.getResolveState().isValue();
+    }
+
+    private boolean objectSpecNotPersistable(final ObjectAdapter adapter) {
+        return !adapter.getSpecification().persistability().isPersistable() || adapter.isAggregated();
+    }
+
+    private boolean objectSpecIsService(final ObjectAdapter adapter) {
+        return adapter.getSpecification().isService();
+    }
+
+}

Modified: incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/ToPersistObjectSet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/ToPersistObjectSet.java?rev=1098935&r1=1098934&r2=1098935&view=diff
==============================================================================
--- incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/ToPersistObjectSet.java (original)
+++ incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/ToPersistObjectSet.java Tue May  3 06:22:09 2011
@@ -17,23 +17,21 @@
  *  under the License.
  */
 
+package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm;
 
-package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm;
-
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
-
-
-/**
- * Set of {@link ObjectAdapter}s that require persisting.
- * 
- * <p>
- * Is consumed by {@link PersistAlgorithm}, and is ultimately implemented by {@link PersistenceSession}.
- */
-public interface ToPersistObjectSet {
-
-    void addPersistedObject(ObjectAdapter object);
-
-    void remapAsPersistent(final ObjectAdapter object);
-
-}
+
+/**
+ * Set of {@link ObjectAdapter}s that require persisting.
+ * 
+ * <p>
+ * Is consumed by {@link PersistAlgorithm}, and is ultimately implemented by {@link PersistenceSession}.
+ */
+public interface ToPersistObjectSet {
+
+    void addPersistedObject(ObjectAdapter object);
+
+    void remapAsPersistent(final ObjectAdapter object);
+
+}

Modified: incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/dflt/DefaultPersistAlgorithm.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/dflt/DefaultPersistAlgorithm.java?rev=1098935&r1=1098934&r2=1098935&view=diff
==============================================================================
--- incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/dflt/DefaultPersistAlgorithm.java (original)
+++ incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/dflt/DefaultPersistAlgorithm.java Tue May  3 06:22:09 2011
@@ -17,13 +17,10 @@
  *  under the License.
  */
 
+package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm.dflt;
 
-package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm.dflt;
-
 import java.util.List;
 
-import org.apache.log4j.Logger;
-
 import org.apache.isis.core.commons.lang.ToString;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.ResolveState;
@@ -36,80 +33,79 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm.PersistAlgorithmAbstract;
 import org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm.ToPersistObjectSet;
 import org.apache.isis.runtimes.dflt.runtime.transaction.ObjectPersistenceException;
-
-
-public class DefaultPersistAlgorithm extends PersistAlgorithmAbstract {
-    private static final Logger LOG = Logger.getLogger(DefaultPersistAlgorithm.class);
-
+import org.apache.log4j.Logger;
+
+public class DefaultPersistAlgorithm extends PersistAlgorithmAbstract {
+    private static final Logger LOG = Logger.getLogger(DefaultPersistAlgorithm.class);
+
     @Override
-    public String name() {
-        return "Simple Bottom Up Persistence Walker";
-    }
-
+    public String name() {
+        return "Simple Bottom Up Persistence Walker";
+    }
+
     @Override
-    public void makePersistent(final ObjectAdapter object, final ToPersistObjectSet toPersistObjectSet) {
-        if (object.getSpecification().isCollection()) {
-            LOG.info("persist " + object);
-            if (object.getResolveState() == ResolveState.GHOST) {
-                object.changeState(ResolveState.RESOLVING);
-                object.changeState(ResolveState.RESOLVED);
-            } else if (object.getResolveState() == ResolveState.TRANSIENT) {
-                object.changeState(ResolveState.RESOLVED);
-            }
-            final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(object);
-            for (ObjectAdapter element: facet.iterable(object)) {
-                persist(element, toPersistObjectSet);
-            }
-        } else {
-            assertObjectNotPersistentAndPersistable(object);
-            persist(object, toPersistObjectSet);
-        }
-    }
-
-    protected void persist(final ObjectAdapter object, final ToPersistObjectSet toPersistObjectSet) {
-        if (alreadyPersistedOrNotPersistableOrServiceOrStandalone(object)) {
-            return;
-        }
-        
-        final List<ObjectAssociation> fields = object.getSpecification().getAssociations();
-        if (!object.getSpecification().isEncodeable() && fields.size() > 0) {
-            LOG.info("make persistent " + object);
-            CallbackUtils.callCallback(object, PersistingCallbackFacet.class);
-            toPersistObjectSet.remapAsPersistent(object);
-            object.changeState(ResolveState.SERIALIZING_RESOLVED); 
-            
-            for (int i = 0; i < fields.size(); i++) {
-                final ObjectAssociation field = fields.get(i);
-                if (field.isNotPersisted()) {
-                    continue;
-                }
-                if (field.isOneToManyAssociation()) {
-                    final ObjectAdapter collection = field.get(object);
-                    if (collection == null) {
-                        throw new ObjectPersistenceException(
-                                "Collection " + field.getName() + 
-                                " does not exist in " + object.getSpecification().getFullIdentifier());
-                    }
-                    makePersistent(collection, toPersistObjectSet);
-                } else {
-                    final ObjectAdapter fieldValue = field.get(object);
-                    if (fieldValue == null) {
-                        continue;
-                    }
-                    persist(fieldValue, toPersistObjectSet);
-                }
-            }
-            toPersistObjectSet.addPersistedObject(object);
-            CallbackUtils.callCallback(object, PersistedCallbackFacet.class);
-            object.changeState(ResolveState.SERIALIZING_RESOLVED.getEndState()); 
-        }
-        
-    }
-
-    @Override
-    public String toString() {
-        final ToString toString = new ToString(this);
-        return toString.toString();
-    }
-
-}
+    public void makePersistent(final ObjectAdapter object, final ToPersistObjectSet toPersistObjectSet) {
+        if (object.getSpecification().isCollection()) {
+            LOG.info("persist " + object);
+            if (object.getResolveState() == ResolveState.GHOST) {
+                object.changeState(ResolveState.RESOLVING);
+                object.changeState(ResolveState.RESOLVED);
+            } else if (object.getResolveState() == ResolveState.TRANSIENT) {
+                object.changeState(ResolveState.RESOLVED);
+            }
+            final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(object);
+            for (final ObjectAdapter element : facet.iterable(object)) {
+                persist(element, toPersistObjectSet);
+            }
+        } else {
+            assertObjectNotPersistentAndPersistable(object);
+            persist(object, toPersistObjectSet);
+        }
+    }
+
+    protected void persist(final ObjectAdapter object, final ToPersistObjectSet toPersistObjectSet) {
+        if (alreadyPersistedOrNotPersistableOrServiceOrStandalone(object)) {
+            return;
+        }
+
+        final List<ObjectAssociation> fields = object.getSpecification().getAssociations();
+        if (!object.getSpecification().isEncodeable() && fields.size() > 0) {
+            LOG.info("make persistent " + object);
+            CallbackUtils.callCallback(object, PersistingCallbackFacet.class);
+            toPersistObjectSet.remapAsPersistent(object);
+            object.changeState(ResolveState.SERIALIZING_RESOLVED);
+
+            for (int i = 0; i < fields.size(); i++) {
+                final ObjectAssociation field = fields.get(i);
+                if (field.isNotPersisted()) {
+                    continue;
+                }
+                if (field.isOneToManyAssociation()) {
+                    final ObjectAdapter collection = field.get(object);
+                    if (collection == null) {
+                        throw new ObjectPersistenceException("Collection " + field.getName() + " does not exist in "
+                            + object.getSpecification().getFullIdentifier());
+                    }
+                    makePersistent(collection, toPersistObjectSet);
+                } else {
+                    final ObjectAdapter fieldValue = field.get(object);
+                    if (fieldValue == null) {
+                        continue;
+                    }
+                    persist(fieldValue, toPersistObjectSet);
+                }
+            }
+            toPersistObjectSet.addPersistedObject(object);
+            CallbackUtils.callCallback(object, PersistedCallbackFacet.class);
+            object.changeState(ResolveState.SERIALIZING_RESOLVED.getEndState());
+        }
+
+    }
+
+    @Override
+    public String toString() {
+        final ToString toString = new ToString(this);
+        return toString.toString();
+    }
+
+}

Modified: incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/package-info.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/package-info.java?rev=1098935&r1=1098934&r2=1098935&view=diff
==============================================================================
--- incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/package-info.java (original)
+++ incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/package-info.java Tue May  3 06:22:09 2011
@@ -17,24 +17,23 @@
  *  under the License.
  */
 
-
-/**
- * This interface is used by the {@link org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession} and
- * is generally not intended to be implemented directly.  
- * 
- * <p>
- * The {@link PersistAlgorithm} defines how persistence-by-reachability is enacted.  This only
- * applies to the <tt>ObjectStorePersistor</tt> implementation, but has been brought up into
- * <tt>architecture</tt> module because it is very much a peer of the other helper objects
- * that influence the {@link org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession}'s behaviour, such
- * as {@link ClassSubstitutor} and {@link org.apache.isis.runtimes.dflt.runtime.system.persistence.OidGenerator}. 
- * 
- * <p>
- * Since there is a close dependency between the {@link org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession}
- * and the {@link PersistAlgorithm} implementation, it is the job of the {@link org.apache.isis.runtimes.dflt.runtime.installerregistry.installerapi.PersistenceMechanismInstaller} to
- * ensure that the correct {@link PersistAlgorithm} is setup.
- * 
- * @see org.apache.isis.metamodel.specloader.classsubstitutor.classsubstitor.ClassSubstitutor.ClassStrategy
- * @see org.apache.isis.runtimes.dflt.runtime.system.persistence.OidGenerator
- */
+/**
+ * This interface is used by the {@link org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession} and
+ * is generally not intended to be implemented directly.  
+ * 
+ * <p>
+ * The {@link PersistAlgorithm} defines how persistence-by-reachability is enacted.  This only
+ * applies to the <tt>ObjectStorePersistor</tt> implementation, but has been brought up into
+ * <tt>architecture</tt> module because it is very much a peer of the other helper objects
+ * that influence the {@link org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession}'s behaviour, such
+ * as {@link ClassSubstitutor} and {@link org.apache.isis.runtimes.dflt.runtime.system.persistence.OidGenerator}. 
+ * 
+ * <p>
+ * Since there is a close dependency between the {@link org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession}
+ * and the {@link PersistAlgorithm} implementation, it is the job of the {@link org.apache.isis.runtimes.dflt.runtime.installerregistry.installerapi.PersistenceMechanismInstaller} to
+ * ensure that the correct {@link PersistAlgorithm} is setup.
+ * 
+ * @see org.apache.isis.metamodel.specloader.classsubstitutor.classsubstitor.ClassSubstitutor.ClassStrategy
+ * @see org.apache.isis.runtimes.dflt.runtime.system.persistence.OidGenerator
+ */
 package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm;
\ No newline at end of file

Modified: incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/topdown/TopDownPersistAlgorithm.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/topdown/TopDownPersistAlgorithm.java?rev=1098935&r1=1098934&r2=1098935&view=diff
==============================================================================
--- incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/topdown/TopDownPersistAlgorithm.java (original)
+++ incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/topdown/TopDownPersistAlgorithm.java Tue May  3 06:22:09 2011
@@ -17,14 +17,11 @@
  *  under the License.
  */
 
+package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm.topdown;
 
-package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm.topdown;
-
 import java.util.Enumeration;
 import java.util.List;
 
-import org.apache.log4j.Logger;
-
 import org.apache.isis.core.commons.lang.ToString;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.ResolveState;
@@ -38,79 +35,77 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm.PersistAlgorithmAbstract;
 import org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm.ToPersistObjectSet;
 import org.apache.isis.runtimes.dflt.runtime.transaction.ObjectPersistenceException;
-
-
-public class TopDownPersistAlgorithm extends PersistAlgorithmAbstract {
-    private static final Logger LOG = Logger.getLogger(TopDownPersistAlgorithm.class);
-
-
-
+import org.apache.log4j.Logger;
+
+public class TopDownPersistAlgorithm extends PersistAlgorithmAbstract {
+    private static final Logger LOG = Logger.getLogger(TopDownPersistAlgorithm.class);
+
     @Override
-    public void makePersistent(final ObjectAdapter object, final ToPersistObjectSet toPersistObjectSet) {
-        if (object.getSpecification().isCollection()) {
-            makeCollectionPersistent(object, toPersistObjectSet);
-        } else {
-            makeObjectPersistent(object, toPersistObjectSet);
-        }
-    }
-
-    private void makeObjectPersistent(final ObjectAdapter object, final ToPersistObjectSet toPersistObjectSet) {
-        if (alreadyPersistedOrNotPersistableOrServiceOrStandalone(object)) {
-            LOG.warn("can't make object persistent - either already persistent, or transient only: " + object);
-            return;
-        }
-
-        final List<ObjectAssociation> fields = object.getSpecification().getAssociations();
-        if (!object.getSpecification().isEncodeable() && fields.size() > 0) {
-            LOG.info("persist " + object);
-            CallbackUtils.callCallback(object, PersistingCallbackFacet.class);
-            toPersistObjectSet.remapAsPersistent(object);
-            toPersistObjectSet.addPersistedObject(object);
-            CallbackUtils.callCallback(object, PersistedCallbackFacet.class);
-
-            for (int i = 0; i < fields.size(); i++) {
-                final ObjectAssociation field = fields.get(i);
-                if (field.isNotPersisted()) {
-                    continue;
-                } else if (field instanceof OneToManyAssociation) {
-                    final ObjectAdapter collection = field.get(object);
-                    if (collection == null) {
-                        throw new ObjectPersistenceException("Collection " + field.getName() + " does not exist in "
-                                + object.getSpecification().getFullIdentifier());
-                    }
-                    makePersistent(collection, toPersistObjectSet);
-                } else {
-                    final ObjectAdapter fieldValue = field.get(object);
-                    if (fieldValue == null) {
-                        continue;
-                    }
-                    makePersistent(fieldValue, toPersistObjectSet);
-                }
-            }
-        }
-    }
-
-    private void makeCollectionPersistent(final ObjectAdapter collection, final ToPersistObjectSet toPersistObjectSet) {
-        LOG.info("persist " + collection);
-        if (collection.getResolveState() == ResolveState.TRANSIENT) {
-            collection.changeState(ResolveState.RESOLVED);
-        }
-        final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(collection);
-        final Enumeration elements = facet.elements(collection);
-        while (elements.hasMoreElements()) {
-            makePersistent((ObjectAdapter) elements.nextElement(), toPersistObjectSet);
-        }
-    }
-
+    public void makePersistent(final ObjectAdapter object, final ToPersistObjectSet toPersistObjectSet) {
+        if (object.getSpecification().isCollection()) {
+            makeCollectionPersistent(object, toPersistObjectSet);
+        } else {
+            makeObjectPersistent(object, toPersistObjectSet);
+        }
+    }
+
+    private void makeObjectPersistent(final ObjectAdapter object, final ToPersistObjectSet toPersistObjectSet) {
+        if (alreadyPersistedOrNotPersistableOrServiceOrStandalone(object)) {
+            LOG.warn("can't make object persistent - either already persistent, or transient only: " + object);
+            return;
+        }
+
+        final List<ObjectAssociation> fields = object.getSpecification().getAssociations();
+        if (!object.getSpecification().isEncodeable() && fields.size() > 0) {
+            LOG.info("persist " + object);
+            CallbackUtils.callCallback(object, PersistingCallbackFacet.class);
+            toPersistObjectSet.remapAsPersistent(object);
+            toPersistObjectSet.addPersistedObject(object);
+            CallbackUtils.callCallback(object, PersistedCallbackFacet.class);
+
+            for (int i = 0; i < fields.size(); i++) {
+                final ObjectAssociation field = fields.get(i);
+                if (field.isNotPersisted()) {
+                    continue;
+                } else if (field instanceof OneToManyAssociation) {
+                    final ObjectAdapter collection = field.get(object);
+                    if (collection == null) {
+                        throw new ObjectPersistenceException("Collection " + field.getName() + " does not exist in "
+                            + object.getSpecification().getFullIdentifier());
+                    }
+                    makePersistent(collection, toPersistObjectSet);
+                } else {
+                    final ObjectAdapter fieldValue = field.get(object);
+                    if (fieldValue == null) {
+                        continue;
+                    }
+                    makePersistent(fieldValue, toPersistObjectSet);
+                }
+            }
+        }
+    }
+
+    private void makeCollectionPersistent(final ObjectAdapter collection, final ToPersistObjectSet toPersistObjectSet) {
+        LOG.info("persist " + collection);
+        if (collection.getResolveState() == ResolveState.TRANSIENT) {
+            collection.changeState(ResolveState.RESOLVED);
+        }
+        final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(collection);
+        final Enumeration elements = facet.elements(collection);
+        while (elements.hasMoreElements()) {
+            makePersistent((ObjectAdapter) elements.nextElement(), toPersistObjectSet);
+        }
+    }
+
     @Override
-    public String name() {
-        return "Simple Top Down Persistence Walker";
-    }
-
-    @Override
-    public String toString() {
-        final ToString toString = new ToString(this);
-        return toString.toString();
-    }
-
-}
+    public String name() {
+        return "Simple Top Down Persistence Walker";
+    }
+
+    @Override
+    public String toString() {
+        final ToString toString = new ToString(this);
+        return toString.toString();
+    }
+
+}

Modified: incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/twopass/TwoPassPersistAlgorithm.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/twopass/TwoPassPersistAlgorithm.java?rev=1098935&r1=1098934&r2=1098935&view=diff
==============================================================================
--- incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/twopass/TwoPassPersistAlgorithm.java (original)
+++ incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/twopass/TwoPassPersistAlgorithm.java Tue May  3 06:22:09 2011
@@ -17,14 +17,11 @@
  *  under the License.
  */
 
+package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm.twopass;
 
-package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm.twopass;
-
 import java.util.Enumeration;
 import java.util.List;
 
-import org.apache.log4j.Logger;
-
 import org.apache.isis.core.commons.lang.ToString;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.ResolveState;
@@ -37,99 +34,93 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
 import org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm.PersistAlgorithmAbstract;
 import org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm.ToPersistObjectSet;
-
-
-public class TwoPassPersistAlgorithm extends PersistAlgorithmAbstract {
-    private static final Logger LOG = Logger.getLogger(TwoPassPersistAlgorithm.class);
-
+import org.apache.log4j.Logger;
+
+public class TwoPassPersistAlgorithm extends PersistAlgorithmAbstract {
+    private static final Logger LOG = Logger.getLogger(TwoPassPersistAlgorithm.class);
+
+    @Override
+    public String name() {
+        return "Two pass,  bottom up persistence walker";
+    }
+
     @Override
-    public String name() {
-        return "Two pass,  bottom up persistence walker";
-    }
-
-
+    public void makePersistent(final ObjectAdapter object, final ToPersistObjectSet toPersistObjectSet) {
+        if (object.getSpecification().isCollection()) {
+            makeCollectionPersistent(object, toPersistObjectSet);
+        } else {
+            makeObjectPersistent(object, toPersistObjectSet);
+        }
+    }
+
+    private void makeObjectPersistent(final ObjectAdapter object, final ToPersistObjectSet toPersistObjectSet) {
+        if (alreadyPersistedOrNotPersistableOrServiceOrStandalone(object)) {
+            return;
+        }
+        final List<ObjectAssociation> fields = object.getSpecification().getAssociations();
+        if (!object.getSpecification().isEncodeable() && fields.size() > 0) {
+            LOG.info("persist " + object);
+            CallbackUtils.callCallback(object, PersistingCallbackFacet.class);
+            toPersistObjectSet.remapAsPersistent(object);
+
+            for (int i = 0; i < fields.size(); i++) {
+                final ObjectAssociation field = fields.get(i);
+                if (field.isNotPersisted()) {
+                    continue;
+                } else if (field.isOneToManyAssociation()) {
+                    // skip in first pass
+                    continue;
+                } else {
+                    final ObjectAdapter fieldValue = field.get(object);
+                    if (fieldValue == null) {
+                        continue;
+                    }
+                    makePersistent(fieldValue, toPersistObjectSet);
+                }
+            }
+
+            for (int i = 0; i < fields.size(); i++) {
+                final ObjectAssociation field = fields.get(i);
+                if (field.isNotPersisted()) {
+                    continue;
+                } else if (field instanceof OneToManyAssociation) {
+                    final ObjectAdapter collection = field.get(object);
+                    makeCollectionPersistent(collection, toPersistObjectSet);
+                    /**
+                     * if (collection == null) { throw new ObjectPersistenceException("Collection " + field.getName() +
+                     * " does not exist in " + object.getSpecification().getFullName()); } makePersistent(collection,
+                     * toPersistObjectSet); final CollectionFacet facet =
+                     * CollectionFacetUtils.getCollectionFacetFromSpec(collection); final Enumeration elements =
+                     * facet.elements(collection); while (elements.hasMoreElements()) { makePersistent((ObjectAdapter)
+                     * elements.nextElement(), toPersistObjectSet); }
+                     */
+                } else {
+                    // skip in second pass
+                    continue;
+                }
+            }
+
+            toPersistObjectSet.addPersistedObject(object);
+            CallbackUtils.callCallback(object, PersistedCallbackFacet.class);
+        }
+    }
+
+    private void makeCollectionPersistent(final ObjectAdapter collection, final ToPersistObjectSet toPersistObjectSet) {
+        LOG.info("persist " + collection);
+        if (collection.getResolveState() == ResolveState.TRANSIENT) {
+            collection.changeState(ResolveState.RESOLVED);
+        }
+        final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(collection);
+        final Enumeration elements = facet.elements(collection);
+        while (elements.hasMoreElements()) {
+            makePersistent((ObjectAdapter) elements.nextElement(), toPersistObjectSet);
+        }
+    }
+
     @Override
-    public void makePersistent(final ObjectAdapter object, final ToPersistObjectSet toPersistObjectSet) {
-        if (object.getSpecification().isCollection()) {
-            makeCollectionPersistent(object, toPersistObjectSet);
-        } else {
-            makeObjectPersistent(object, toPersistObjectSet);
-        }
-    }
-
-    private void makeObjectPersistent(final ObjectAdapter object, final ToPersistObjectSet toPersistObjectSet) {
-        if (alreadyPersistedOrNotPersistableOrServiceOrStandalone(object)) {
-            return;
-        }
-        final List<ObjectAssociation> fields = object.getSpecification().getAssociations();
-        if (!object.getSpecification().isEncodeable() && fields.size() > 0) {
-            LOG.info("persist " + object);
-            CallbackUtils.callCallback(object, PersistingCallbackFacet.class);
-            toPersistObjectSet.remapAsPersistent(object);
-
-            for (int i = 0; i < fields.size(); i++) {
-                final ObjectAssociation field = fields.get(i);
-                if (field.isNotPersisted()) {
-                    continue;
-                } else if (field.isOneToManyAssociation()) {
-                    // skip in first pass
-                    continue;
-                } else {
-                    final ObjectAdapter fieldValue = field.get(object);
-                    if (fieldValue == null) {
-                        continue;
-                    }
-                    makePersistent(fieldValue, toPersistObjectSet);
-                }
-            }
-
-            for (int i = 0; i < fields.size(); i++) {
-                final ObjectAssociation field = fields.get(i);
-                if (field.isNotPersisted()) {
-                    continue;
-                } else if (field instanceof OneToManyAssociation) {
-                    final ObjectAdapter collection = field.get(object);
-                    makeCollectionPersistent(collection, toPersistObjectSet);
-                    /**
-                    if (collection == null) {
-                        throw new ObjectPersistenceException("Collection " + field.getName() + " does not exist in "
-                                + object.getSpecification().getFullName());
-                    }
-                    makePersistent(collection, toPersistObjectSet);
-                    final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(collection);
-                    final Enumeration elements = facet.elements(collection);
-                    while (elements.hasMoreElements()) {
-                        makePersistent((ObjectAdapter) elements.nextElement(), toPersistObjectSet);
-                    }*/
-                } else {
-                    // skip in second pass
-                    continue;
-                }
-            }
-
-            toPersistObjectSet.addPersistedObject(object);
-            CallbackUtils.callCallback(object, PersistedCallbackFacet.class);
-        }
-    }
-
-
-    private void makeCollectionPersistent(final ObjectAdapter collection, final ToPersistObjectSet toPersistObjectSet) {
-        LOG.info("persist " + collection);
-        if (collection.getResolveState() == ResolveState.TRANSIENT) {
-            collection.changeState(ResolveState.RESOLVED);
-        }
-        final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(collection);
-        final Enumeration elements = facet.elements(collection);
-        while (elements.hasMoreElements()) {
-            makePersistent((ObjectAdapter) elements.nextElement(), toPersistObjectSet);
-        }
-    }
-
-
-    @Override
-    public String toString() {
-        final ToString toString = new ToString(this);
-        return toString.toString();
-    }
-
-}
+    public String toString() {
+        final ToString toString = new ToString(this);
+        return toString.toString();
+    }
+
+}

Modified: incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/transaction/CreateObjectCommand.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/transaction/CreateObjectCommand.java?rev=1098935&r1=1098934&r2=1098935&view=diff
==============================================================================
--- incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/transaction/CreateObjectCommand.java (original)
+++ incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/transaction/CreateObjectCommand.java Tue May  3 06:22:09 2011
@@ -17,11 +17,8 @@
  *  under the License.
  */
 
-
 package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.transaction;
 
-
-
 public interface CreateObjectCommand extends PersistenceCommand {
 
 }

Modified: incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/transaction/DestroyObjectCommand.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/transaction/DestroyObjectCommand.java?rev=1098935&r1=1098934&r2=1098935&view=diff
==============================================================================
--- incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/transaction/DestroyObjectCommand.java (original)
+++ incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/transaction/DestroyObjectCommand.java Tue May  3 06:22:09 2011
@@ -17,11 +17,8 @@
  *  under the License.
  */
 
-
 package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.transaction;
 
-
-
 public interface DestroyObjectCommand extends PersistenceCommand {
 
 }



Mime
View raw message