incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1304796 [5/16] - in /incubator/isis/trunk/framework: applib/src/main/java/org/apache/isis/applib/ applib/src/test/java/org/apache/isis/applib/ core/commons/src/main/java/org/apache/isis/core/commons/config/ core/commons/src/main/java/org/a...
Date Sat, 24 Mar 2012 14:01:52 GMT
Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/JsonStateWriter.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/JsonStateWriter.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/JsonStateWriter.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/JsonStateWriter.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/JsonStateWriter.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/JsonStateWriter.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/JsonStateWriter.java Sat Mar 24 14:01:35 2012
@@ -17,35 +17,30 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql.file;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.db.file;
 
-import java.util.ArrayList;
 import java.util.List;
 
+import com.google.common.collect.Lists;
+
 import org.json.JSONException;
 import org.json.JSONObject;
 
 import org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException;
-import org.apache.isis.runtimes.dflt.objectstores.nosql.StateWriter;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.db.StateWriter;
 
 public class JsonStateWriter implements StateWriter {
 
-    // private static final Logger LOG =
-    // Logger.getLogger(FileStateWriter.class);
-
-    private final JSONObject dbObject;
+    private final JSONObject dbObject = new JSONObject();
+    
     private String type;
     private String oid;
     private String currentVersion;
     private String newVersion;
 
-    public JsonStateWriter(final ClientConnection connection, final String specName) {
-        dbObject = new JSONObject();
-    }
-
     @Override
     public StateWriter addAggregate(final String id) {
-        final JsonStateWriter jsonStateWriter = new JsonStateWriter(null, null);
+        final JsonStateWriter jsonStateWriter = new JsonStateWriter();
         try {
             dbObject.put(id, jsonStateWriter.dbObject);
         } catch (final JSONException e) {
@@ -120,12 +115,12 @@ public class JsonStateWriter implements 
 
     @Override
     public StateWriter createElementWriter() {
-        return new JsonStateWriter(null, null);
+        return new JsonStateWriter();
     }
 
     @Override
     public void writeCollection(final String id, final List<StateWriter> elements) {
-        final ArrayList<JSONObject> collection = new ArrayList<JSONObject>();
+        final List<JSONObject> collection = Lists.newArrayList();
         for (final StateWriter writer : elements) {
             collection.add(((JsonStateWriter) writer).dbObject);
         }

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/RemotingException.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/RemotingException.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/RemotingException.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/RemotingException.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/RemotingException.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/RemotingException.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/RemotingException.java Sat Mar 24 14:01:35 2012
@@ -17,7 +17,7 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql.file;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.db.file;
 
 import org.apache.isis.core.commons.exceptions.IsisException;
 

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/DataFileReader.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/DataFileReader.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/DataFileReader.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/DataFileReader.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/DataFileReader.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/DataFileReader.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/DataFileReader.java Sat Mar 24 14:01:35 2012
@@ -17,7 +17,7 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql.file.server;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.db.file.server;
 
 import java.io.BufferedReader;
 import java.io.File;

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/DataFileWriter.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/DataFileWriter.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/DataFileWriter.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/DataFileWriter.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/DataFileWriter.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/DataFileWriter.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/DataFileWriter.java Sat Mar 24 14:01:35 2012
@@ -17,7 +17,7 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql.file.server;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.db.file.server;
 
 import java.io.File;
 import java.io.FileOutputStream;

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/FileContent.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/FileContent.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/FileContent.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/FileContent.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/FileContent.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/FileContent.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/FileContent.java Sat Mar 24 14:01:35 2012
@@ -17,7 +17,7 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql.file.server;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.db.file.server;
 
 import java.io.IOException;
 import java.io.OutputStream;

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/FileServer.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/FileServer.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/FileServer.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/FileServer.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/FileServer.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/FileServer.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/FileServer.java Sat Mar 24 14:01:35 2012
@@ -17,7 +17,7 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql.file.server;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.db.file.server;
 
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/FileServerException.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/FileServerException.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/FileServerException.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/FileServerException.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/FileServerException.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/FileServerException.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/FileServerException.java Sat Mar 24 14:01:35 2012
@@ -17,7 +17,7 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql.file.server;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.db.file.server;
 
 import java.io.IOException;
 

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/FileServerProcessor.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/FileServerProcessor.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/FileServerProcessor.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/FileServerProcessor.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/FileServerProcessor.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/FileServerProcessor.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/FileServerProcessor.java Sat Mar 24 14:01:35 2012
@@ -17,7 +17,7 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql.file.server;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.db.file.server;
 
 import java.io.BufferedReader;
 import java.io.File;

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/Lock.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/Lock.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/Lock.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/Lock.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/Lock.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/Lock.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/Lock.java Sat Mar 24 14:01:35 2012
@@ -17,7 +17,7 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql.file.server;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.db.file.server;
 
 import java.util.ArrayList;
 import java.util.List;

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/LockManager.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/LockManager.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/LockManager.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/LockManager.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/LockManager.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/LockManager.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/LockManager.java Sat Mar 24 14:01:35 2012
@@ -17,7 +17,7 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql.file.server;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.db.file.server;
 
 import java.util.HashMap;
 import java.util.Map;

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/LogRange.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/LogRange.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/LogRange.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/LogRange.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/LogRange.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/LogRange.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/LogRange.java Sat Mar 24 14:01:35 2012
@@ -16,7 +16,7 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.runtimes.dflt.objectstores.nosql.file.server;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.db.file.server;
 
 class LogRange {
     private long first = Long.MAX_VALUE;

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/LogWriter.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/LogWriter.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/LogWriter.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/LogWriter.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/LogWriter.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/LogWriter.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/LogWriter.java Sat Mar 24 14:01:35 2012
@@ -17,7 +17,7 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql.file.server;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.db.file.server;
 
 import java.io.DataOutputStream;
 import java.io.File;

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/ServerConnection.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/ServerConnection.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/ServerConnection.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/ServerConnection.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/ServerConnection.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/ServerConnection.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/ServerConnection.java Sat Mar 24 14:01:35 2012
@@ -17,7 +17,7 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql.file.server;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.db.file.server;
 
 import java.io.BufferedReader;
 import java.io.IOException;
@@ -30,7 +30,7 @@ import java.io.PrintWriter;
 import org.apache.log4j.Logger;
 
 import org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException;
-import org.apache.isis.runtimes.dflt.objectstores.nosql.file.RemotingException;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.db.file.RemotingException;
 
 public class ServerConnection {
 

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/Util.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/Util.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/Util.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/Util.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/Util.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/Util.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/file/server/Util.java Sat Mar 24 14:01:35 2012
@@ -17,7 +17,7 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql.file.server;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.db.file.server;
 
 import java.io.File;
 import java.io.FileFilter;

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/MongoClientCommandContext.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoClientCommandContext.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/MongoClientCommandContext.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/MongoClientCommandContext.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoClientCommandContext.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoClientCommandContext.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/MongoClientCommandContext.java Sat Mar 24 14:01:35 2012
@@ -17,12 +17,12 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql.mongo;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.db.mongo;
 
 import com.mongodb.DB;
 
 import org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlCommandContext;
-import org.apache.isis.runtimes.dflt.objectstores.nosql.StateWriter;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.db.StateWriter;
 
 
 public class MongoClientCommandContext implements NoSqlCommandContext {

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/MongoDb.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoDb.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/MongoDb.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/MongoDb.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoDb.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoDb.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/MongoDb.java Sat Mar 24 14:01:35 2012
@@ -17,7 +17,7 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql.mongo;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.db.mongo;
 
 import java.net.UnknownHostException;
 import java.util.Iterator;
@@ -35,12 +35,12 @@ import com.mongodb.ObjectId;
 
 import org.apache.log4j.Logger;
 
-import org.apache.isis.runtimes.dflt.objectstores.nosql.KeyCreator;
 import org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlCommandContext;
-import org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlDataDatabase;
 import org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException;
-import org.apache.isis.runtimes.dflt.objectstores.nosql.StateReader;
-import org.apache.isis.runtimes.dflt.objectstores.nosql.StateWriter;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.db.NoSqlDataDatabase;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.db.StateReader;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.db.StateWriter;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.keys.KeyCreator;
 import org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.transaction.PersistenceCommand;
 
 public class MongoDb implements NoSqlDataDatabase {

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/MongoPersistorMechanismInstaller.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoPersistorMechanismInstaller.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/MongoPersistorMechanismInstaller.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/MongoPersistorMechanismInstaller.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoPersistorMechanismInstaller.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoPersistorMechanismInstaller.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/MongoPersistorMechanismInstaller.java Sat Mar 24 14:01:35 2012
@@ -17,14 +17,14 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql.mongo;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.db.mongo;
 
 import org.apache.isis.core.commons.config.ConfigurationConstants;
 import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.runtimes.dflt.objectstores.nosql.KeyCreator;
-import org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlDataDatabase;
-import org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlKeyCreator;
-import org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlPersistorMechanismInstaller;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.db.NoSqlDataDatabase;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.db.NoSqlPersistorMechanismInstaller;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.keys.KeyCreator;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.keys.KeyCreatorDefault;
 
 public class MongoPersistorMechanismInstaller extends NoSqlPersistorMechanismInstaller {
 
@@ -43,7 +43,7 @@ public class MongoPersistorMechanismInst
         final String host = configuration.getString(DB_HOST, "localhost");
         final int port = configuration.getInteger(DB_PORT, 0);
         final String name = configuration.getString(DB_NAME, "isis");
-        final KeyCreator keyCreator = new NoSqlKeyCreator();
+        final KeyCreator keyCreator = new KeyCreatorDefault();
         db = new MongoDb(host, port, name, keyCreator);
         return db;
     }

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/MongoStateReader.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoStateReader.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/MongoStateReader.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/MongoStateReader.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoStateReader.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoStateReader.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/MongoStateReader.java Sat Mar 24 14:01:35 2012
@@ -17,7 +17,7 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql.mongo;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.db.mongo;
 
 import java.util.List;
 
@@ -28,7 +28,7 @@ import com.mongodb.DBObject;
 import org.apache.log4j.Logger;
 
 import org.apache.isis.core.commons.exceptions.UnexpectedCallException;
-import org.apache.isis.runtimes.dflt.objectstores.nosql.StateReader;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.db.StateReader;
 import org.apache.isis.runtimes.dflt.runtime.persistence.ObjectNotFoundException;
 
 public class MongoStateReader implements StateReader, PropertyNames {

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/MongoStateWriter.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoStateWriter.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/MongoStateWriter.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/MongoStateWriter.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoStateWriter.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoStateWriter.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/MongoStateWriter.java Sat Mar 24 14:01:35 2012
@@ -17,7 +17,7 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql.mongo;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.db.mongo;
 
 import java.util.List;
 
@@ -28,7 +28,7 @@ import com.mongodb.DBCollection;
 import org.apache.log4j.Logger;
 
 import org.apache.isis.core.commons.exceptions.UnexpectedCallException;
-import org.apache.isis.runtimes.dflt.objectstores.nosql.StateWriter;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.db.StateWriter;
 
 public class MongoStateWriter implements StateWriter, PropertyNames {
     private static final Logger LOG = Logger.getLogger(MongoStateWriter.class);

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/PropertyNames.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/PropertyNames.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/PropertyNames.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/PropertyNames.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/PropertyNames.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/PropertyNames.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/db/mongo/PropertyNames.java Sat Mar 24 14:01:35 2012
@@ -17,7 +17,7 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql.mongo;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.db.mongo;
 
 interface PropertyNames {
     static final String ENCRYPT = "_encrypt";

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/DataEncryption.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/DataEncryption.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/DataEncryption.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/DataEncryption.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/DataEncryption.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/DataEncryption.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/DataEncryption.java Sat Mar 24 14:01:35 2012
@@ -16,15 +16,15 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.runtimes.dflt.objectstores.nosql;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.encryption;
 
 import org.apache.isis.core.commons.config.IsisConfiguration;
 
 public interface DataEncryption {
 
-    String getType();
-
     void init(IsisConfiguration configuration);
+    
+    String getType();
 
     String encrypt(String plainText);
 

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/aes/DataEncryptionAes.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/AesEncryption.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/aes/DataEncryptionAes.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/aes/DataEncryptionAes.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/AesEncryption.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/AesEncryption.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/aes/DataEncryptionAes.java Sat Mar 24 14:01:35 2012
@@ -16,24 +16,24 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.runtimes.dflt.objectstores.nosql.encryption;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.encryption.aes;
 
 import javax.crypto.Cipher;
 import javax.crypto.spec.SecretKeySpec;
 
 import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.runtimes.dflt.objectstores.nosql.DataEncryption;
 import org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.encryption.DataEncryption;
 
 /**
  * NOTE this does not work at the moment
  */
-public class AesEncryption implements DataEncryption {
+public class DataEncryptionAes implements DataEncryption {
 
     private static final String AES = "AES";
     private final byte[] specKey;
 
-    public AesEncryption() {
+    public DataEncryptionAes() {
         specKey = new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 };
     }
 

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/blowfish/DataEncryptionBlowfishAbstract.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/BlowfishEncryptionAbstract.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/blowfish/DataEncryptionBlowfishAbstract.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/blowfish/DataEncryptionBlowfishAbstract.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/BlowfishEncryptionAbstract.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/BlowfishEncryptionAbstract.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/blowfish/DataEncryptionBlowfishAbstract.java Sat Mar 24 14:01:35 2012
@@ -16,16 +16,16 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.runtimes.dflt.objectstores.nosql.encryption;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.encryption.blowfish;
 
 import javax.crypto.Cipher;
 import javax.crypto.spec.SecretKeySpec;
 
 import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.runtimes.dflt.objectstores.nosql.DataEncryption;
 import org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.encryption.DataEncryption;
 
-public abstract class BlowfishEncryptionAbstract implements DataEncryption {
+public abstract class DataEncryptionBlowfishAbstract implements DataEncryption {
 
     private static final String BLOWFISH = "Blowfish";
     private byte[] specKey;

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/blowfish/DataEncryptionBlowfishUsingConfiguration.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/BlowfishEncryptionUsingConfiguration.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/blowfish/DataEncryptionBlowfishUsingConfiguration.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/blowfish/DataEncryptionBlowfishUsingConfiguration.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/BlowfishEncryptionUsingConfiguration.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/BlowfishEncryptionUsingConfiguration.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/blowfish/DataEncryptionBlowfishUsingConfiguration.java Sat Mar 24 14:01:35 2012
@@ -16,13 +16,13 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.runtimes.dflt.objectstores.nosql.encryption;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.encryption.blowfish;
 
 import org.apache.isis.core.commons.config.ConfigurationConstants;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException;
 
-public class BlowfishEncryptionUsingConfiguration extends BlowfishEncryptionAbstract {
+public class DataEncryptionBlowfishUsingConfiguration extends DataEncryptionBlowfishAbstract {
 
     private static final String ENCRYPTION_KEY = ConfigurationConstants.ROOT + "nosql.encryption.blowfish-key";
 

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/blowfish/DataEncryptionBlowfishUsingKeyFile.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/BlowfishEncryptionUsingKeyFile.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/blowfish/DataEncryptionBlowfishUsingKeyFile.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/blowfish/DataEncryptionBlowfishUsingKeyFile.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/BlowfishEncryptionUsingKeyFile.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/BlowfishEncryptionUsingKeyFile.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/blowfish/DataEncryptionBlowfishUsingKeyFile.java Sat Mar 24 14:01:35 2012
@@ -16,7 +16,7 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.runtimes.dflt.objectstores.nosql.encryption;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.encryption.blowfish;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -27,7 +27,7 @@ import org.apache.isis.core.commons.conf
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException;
 
-public class BlowfishEncryptionUsingKeyFile extends BlowfishEncryptionAbstract {
+public class DataEncryptionBlowfishUsingKeyFile extends DataEncryptionBlowfishAbstract {
 
     private static final String ENCRYPTION_KEY_FILE = ConfigurationConstants.ROOT + "nosql.encryption.blowfish-key-file";
 

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/none/DataEncryptionNone.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoEncryption.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/none/DataEncryptionNone.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/none/DataEncryptionNone.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoEncryption.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoEncryption.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/none/DataEncryptionNone.java Sat Mar 24 14:01:35 2012
@@ -16,19 +16,20 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.runtimes.dflt.objectstores.nosql;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.encryption.none;
 
 import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.encryption.DataEncryption;
 
-public class NoEncryption implements DataEncryption {
+public class DataEncryptionNone implements DataEncryption {
 
     @Override
-    public String getType() {
-        return "none";
+    public void init(final IsisConfiguration configuration) {
     }
-
+    
     @Override
-    public void init(final IsisConfiguration configuration) {
+    public String getType() {
+        return "none";
     }
 
     @Override

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/rot13/Rot13Encryption.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/Rot13Encryption.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/rot13/Rot13Encryption.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/rot13/Rot13Encryption.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/Rot13Encryption.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/Rot13Encryption.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/encryption/rot13/Rot13Encryption.java Sat Mar 24 14:01:35 2012
@@ -16,10 +16,10 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.runtimes.dflt.objectstores.nosql.encryption;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.encryption.rot13;
 
 import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.runtimes.dflt.objectstores.nosql.DataEncryption;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.encryption.DataEncryption;
 
 public class Rot13Encryption implements DataEncryption {
 

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/keys/KeyCreator.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/KeyCreator.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/keys/KeyCreator.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/keys/KeyCreator.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/KeyCreator.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/KeyCreator.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/keys/KeyCreator.java Sat Mar 24 14:01:35 2012
@@ -17,11 +17,11 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.keys;
 
 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.stringable.directly.OidWithSpecification;
+import org.apache.isis.core.metamodel.adapter.oid.RootOid;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 
 public interface KeyCreator {
@@ -30,9 +30,9 @@ public interface KeyCreator {
 
     String reference(ObjectAdapter object);
 
-    OidWithSpecification oid(ObjectSpecification objectSpecification, String id);
+    RootOid oid(ObjectSpecification objectSpecification, String id);
 
-    OidWithSpecification oidFromReference(String ref);
+    RootOid oidFromReference(String ref);
 
     ObjectSpecification specificationFromReference(String ref);
 

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/keys/KeyCreatorDefault.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlKeyCreator.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/keys/KeyCreatorDefault.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/keys/KeyCreatorDefault.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlKeyCreator.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlKeyCreator.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/keys/KeyCreatorDefault.java Sat Mar 24 14:01:35 2012
@@ -17,34 +17,39 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.keys;
 
 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.stringable.directly.OidWithSpecification;
+import org.apache.isis.core.metamodel.adapter.oid.RootOid;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.SpecificationLoader;
-import org.apache.isis.runtimes.dflt.runtime.persistence.oidgenerator.simple.SerialOid;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException;
+import org.apache.isis.runtimes.dflt.runtime.persistence.oidgenerator.serial.RootOidDefault;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 
-public class NoSqlKeyCreator implements KeyCreator {
+public class KeyCreatorDefault implements KeyCreator {
 
+    public KeyCreatorDefault() {
+    }
+    
     @Override
     public String key(final Oid oid) {
-        if (oid.isTransient()) {
+        if (!(oid instanceof RootOid)) {
+            throw new NoSqlStoreException("Oid is not a RootOid: " + oid);
+        } 
+        RootOid rootOid = (RootOidDefault) oid;
+        if (rootOid.isTransient()) {
             throw new NoSqlStoreException("Oid is not for a persistent object: " + oid);
         }
-        if (oid instanceof NoSqlOid) {
-            NoSqlOid noSqlOid = (NoSqlOid) oid;
-            final long serialNo = noSqlOid.getSerialNo();
-            return Long.toString(serialNo, 16);
-        } else {
-            throw new NoSqlStoreException("Oid is not a NoSqlOid: " + oid);
-        }
+        return rootOid.getIdentifier();
     }
 
     @Override
     public String reference(final ObjectAdapter adapter) {
+        if(adapter == null) {
+            return null;
+        }
         try {
             return adapter.getSpecification().getFullIdentifier() + "@" + key(adapter.getOid());
         } catch (final NoSqlStoreException e) {
@@ -53,13 +58,13 @@ public class NoSqlKeyCreator implements 
     }
 
     @Override
-    public OidWithSpecification oid(ObjectSpecification objectSpecification, final String id) {
-        final SerialOid serialOid = SerialOid.createPersistent(Long.valueOf(id, 16).longValue());
-        return new NoSqlOid(objectSpecification.getFullIdentifier(), serialOid);
+    public RootOid oid(ObjectSpecification objectSpecification, final String id) {
+        final String objectType = objectSpecification.getObjectType();
+        return RootOidDefault.create(objectType, id);
     }
 
     @Override
-    public OidWithSpecification oidFromReference(final String ref) {
+    public RootOid oidFromReference(final String ref) {
         final ObjectSpecification objectSpecification = specificationFromReference(ref);
         final String id = ref.split("@")[1];
         return oid(objectSpecification, id);

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/versions/VersionCreator.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/VersionCreator.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/versions/VersionCreator.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/versions/VersionCreator.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/VersionCreator.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/VersionCreator.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/versions/VersionCreator.java Sat Mar 24 14:01:35 2012
@@ -17,20 +17,18 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.versions;
 
 import org.apache.isis.core.metamodel.adapter.version.Version;
 
 public interface VersionCreator {
 
+    Version version(String versionString, String user, String time);
     String versionString(Version version);
 
     String timeString(Version version);
 
-    Version version(String versionString, String user, String time);
-
     Version newVersion(String user);
 
     Version nextVersion(Version version);
-
 }

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/versions/VersionCreatorDefault.java (from r1301918, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/SerialNumberVersionCreator.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/versions/VersionCreatorDefault.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/versions/VersionCreatorDefault.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/SerialNumberVersionCreator.java&r1=1301918&r2=1304796&rev=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/SerialNumberVersionCreator.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/versions/VersionCreatorDefault.java Sat Mar 24 14:01:35 2012
@@ -17,14 +17,14 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.nosql;
+package org.apache.isis.runtimes.dflt.objectstores.nosql.versions;
 
 import java.util.Date;
 
 import org.apache.isis.core.metamodel.adapter.version.SerialNumberVersion;
 import org.apache.isis.core.metamodel.adapter.version.Version;
 
-public class SerialNumberVersionCreator implements VersionCreator {
+public class VersionCreatorDefault implements VersionCreator {
 
     @Override
     public String versionString(final Version version) {

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/DestroyObjectCommandImplementationTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/DestroyObjectCommandImplementationTest.java?rev=1304796&r1=1304795&r2=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/DestroyObjectCommandImplementationTest.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/DestroyObjectCommandImplementationTest.java Sat Mar 24 14:01:35 2012
@@ -30,6 +30,9 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2;
 import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2.Mode;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.keys.KeyCreatorDefault;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.versions.VersionCreatorDefault;
+import org.apache.isis.runtimes.dflt.runtime.persistence.oidgenerator.serial.RootOidDefault;
 
 public class DestroyObjectCommandImplementationTest {
 
@@ -43,11 +46,11 @@ public class DestroyObjectCommandImpleme
     @Mock
     private ObjectAdapter adapter;
     @Mock
-    private NoSqlOid sqlOid;
+    private RootOidDefault oid;
     @Mock
-    private SerialNumberVersionCreator versionCreator;
+    private VersionCreatorDefault versionCreator;
     @Mock
-    private NoSqlKeyCreator keyCreator;
+    private KeyCreatorDefault keyCreator;
     @Mock
     private SerialNumberVersion version;
 
@@ -68,7 +71,7 @@ public class DestroyObjectCommandImpleme
             will(returnValue(specification));
             
             allowing(adapter).getOid();
-            will(returnValue(sqlOid));
+            will(returnValue(oid));
 
             allowing(adapter).getVersion();
             will(returnValue(version));
@@ -83,7 +86,7 @@ public class DestroyObjectCommandImpleme
 
         context.checking(new Expectations() {
             {
-                one(keyCreator).key(sqlOid);
+                one(keyCreator).key(oid);
                 will(returnValue(keyStr));
 
                 one(versionCreator).versionString(version);

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlKeyCreatorTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlKeyCreatorTest.java?rev=1304796&r1=1304795&r2=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlKeyCreatorTest.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlKeyCreatorTest.java Sat Mar 24 14:01:35 2012
@@ -21,46 +21,57 @@ package org.apache.isis.runtimes.dflt.ob
 
 import static org.junit.Assert.assertEquals;
 
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
+import org.jmock.auto.Mock;
 import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
 
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.runtimes.dflt.objectstores.dflt.testsystem.TestProxySystemII;
-import org.apache.isis.runtimes.dflt.runtime.persistence.oidgenerator.simple.SerialOid;
-import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
+import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2;
+import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2.Mode;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.keys.KeyCreatorDefault;
+import org.apache.isis.runtimes.dflt.runtime.persistence.oidgenerator.serial.RootOidDefault;
+import org.apache.isis.runtimes.dflt.testsupport.domain.ExamplePojoRepository;
+import org.apache.isis.runtimes.dflt.testsupport.domain.ExamplePojoWithReferences;
+import org.apache.isis.runtimes.embedded.EmbeddedContext;
+import org.apache.isis.runtimes.embedded.IsisMetaModel;
 
 public class NoSqlKeyCreatorTest {
 
-    private final int id = 3;
-    private final String reference = ExampleReferencePojo.class.getName() + "@" + id;
-    private final NoSqlOid oid3 = new NoSqlOid(ExampleReferencePojo.class.getName(), SerialOid.createPersistent(id));
+    @Rule
+    public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
+
+    private final String id = ""+3;
+    private final String reference = ExamplePojoWithReferences.class.getName() + "@" + id;
+    private final RootOidDefault oid3 = RootOidDefault.create("ERP", id);
     
     private ObjectSpecification specification;
     
-    private NoSqlKeyCreator noSqlKeyCreator;
+    private KeyCreatorDefault keyCreatorDefault;
+
+    private IsisMetaModel isisMetaModel;
+
+    @Mock
+    private EmbeddedContext mockEmbeddedContext;
 
     @Before
     public void setup() {
-        Logger.getRootLogger().setLevel(Level.OFF);
-        final TestProxySystemII system = new TestProxySystemII();
-        system.init();
-        specification = IsisContext.getSpecificationLoader().loadSpecification(ExampleReferencePojo.class);
+        isisMetaModel = new IsisMetaModel(mockEmbeddedContext, new ExamplePojoRepository());
+        specification = isisMetaModel.getSpecificationLoader().loadSpecification(ExamplePojoWithReferences.class);
 
-        noSqlKeyCreator = new NoSqlKeyCreator();
+        keyCreatorDefault = new KeyCreatorDefault();
     }
 
     @Test
     public void oid() throws Exception {
-        final NoSqlOid oid = (NoSqlOid) noSqlKeyCreator.oidFromReference(reference);
-        assertEquals(oid3.getSerialNo(), oid.getSerialNo());
-        assertEquals(oid3.getClassName(), oid.getClassName());
+        final RootOidDefault oid = (RootOidDefault) keyCreatorDefault.oidFromReference(reference);
+        assertEquals(oid3.getIdentifier(), oid.getIdentifier());
+        assertEquals(oid3.getObjectType(), oid.getObjectType());
     }
 
     @Test
     public void specification() throws Exception {
-        final ObjectSpecification spec = noSqlKeyCreator.specificationFromReference(reference);
+        final ObjectSpecification spec = keyCreatorDefault.specificationFromReference(reference);
         assertEquals(specification, spec);
     }
 }

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlKeyCreatorTest_reference.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlKeyCreatorTest_reference.java?rev=1304796&r1=1304795&r2=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlKeyCreatorTest_reference.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlKeyCreatorTest_reference.java Sat Mar 24 14:01:35 2012
@@ -31,28 +31,29 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2;
 import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2.Mode;
-import org.apache.isis.runtimes.dflt.runtime.persistence.oidgenerator.simple.SerialOid;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.keys.KeyCreatorDefault;
+import org.apache.isis.runtimes.dflt.runtime.persistence.oidgenerator.serial.RootOidDefault;
 
 public class NoSqlKeyCreatorTest_reference {
 
     @Rule
     public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_ONLY);
 
-
     @Mock
     private ObjectSpecification specification;
     @Mock
     private ObjectAdapter adapter;
     
     private final String className = "com.foo.bar.SomeClass";
-    private final SerialOid serialOid = SerialOid.createPersistent(123);
-    private final NoSqlOid noSqlOid = new NoSqlOid(className, serialOid);
+    private final String objectType = "SCL";
+    
+    private final RootOidDefault rootOidDefault = RootOidDefault.create(objectType, ""+123);
     
-    private NoSqlKeyCreator noSqlKeyCreator;
+    private KeyCreatorDefault keyCreatorDefault;
 
     @Before
     public void setup() {
-        noSqlKeyCreator = new NoSqlKeyCreator();
+        keyCreatorDefault = new KeyCreatorDefault();
         
         context.checking(new Expectations() {
             {
@@ -60,7 +61,7 @@ public class NoSqlKeyCreatorTest_referen
                 will(returnValue(specification));
 
                 allowing(adapter).getOid();
-                will(returnValue(noSqlOid));
+                will(returnValue(rootOidDefault));
 
                 allowing(specification).getFullIdentifier();
                 will(returnValue(className));
@@ -70,7 +71,7 @@ public class NoSqlKeyCreatorTest_referen
 
     @Test
     public void reference() throws Exception {
-        final String expectedReference = className + "@" + Long.toString(serialOid.getSerialNo(), 16);
-        assertEquals(expectedReference, noSqlKeyCreator.reference(adapter));
+        final String expectedReference = objectType + "@" + rootOidDefault.getIdentifier();
+        assertEquals(expectedReference, keyCreatorDefault.reference(adapter));
     }
 }

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlObjectStoreTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlObjectStoreTest.java?rev=1304796&r1=1304795&r2=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlObjectStoreTest.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlObjectStoreTest.java Sat Mar 24 14:01:35 2012
@@ -43,11 +43,20 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2;
 import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2.Mode;
-import org.apache.isis.runtimes.dflt.objectstores.dflt.testsystem.TestProxySystemII;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.db.NoSqlDataDatabase;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.encryption.DataEncryption;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.keys.KeyCreator;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.versions.VersionCreator;
 import org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.transaction.PersistenceCommand;
-import org.apache.isis.runtimes.dflt.runtime.persistence.oidgenerator.simple.SerialOid;
+import org.apache.isis.runtimes.dflt.runtime.persistence.oidgenerator.serial.RootOidDefault;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceQuery;
+import org.apache.isis.runtimes.dflt.testsupport.TestSystem;
+import org.apache.isis.runtimes.dflt.testsupport.domain.ExamplePojo;
+import org.apache.isis.runtimes.dflt.testsupport.domain.ExamplePojoRepository;
+import org.apache.isis.runtimes.dflt.testsupport.domain.ExamplePojoWithReferences;
+import org.apache.isis.runtimes.embedded.EmbeddedContext;
+import org.apache.isis.runtimes.embedded.IsisMetaModel;
 
 public class NoSqlObjectStoreTest {
 
@@ -63,25 +72,31 @@ public class NoSqlObjectStoreTest {
     private VersionCreator versionCreator;
 
     @Mock
-    private ObjectSpecification objectSpecification;
-
-    @Mock
     private PersistenceCommand command;
 
     private ObjectSpecification specification;
     private ObjectAdapter object;
     private NoSqlObjectStore store;
 
+    private final String objectType = "CUS";
+
+    private IsisMetaModel isisMetaModel;
+
+    @Mock
+    private EmbeddedContext mockEmbeddedContext;
+
     @Before
     public void setup() {
         Logger.getRootLogger().setLevel(Level.OFF);
-        final TestProxySystemII system = new TestProxySystemII();
-        system.init();
+        
+        isisMetaModel = new IsisMetaModel(mockEmbeddedContext, new ExamplePojoRepository());
+        specification = isisMetaModel.getSpecificationLoader().loadSpecification(ExamplePojoWithReferences.class);
 
-        specification = IsisContext.getSpecificationLoader().loadSpecification(ExampleReferencePojo.class);
+        
         object = IsisContext.getPersistenceSession().createInstance(specification);
-        ((SerialOid) object.getOid()).setId(3);
-        object.getOid().makePersistent();
+        final RootOidDefault rootOidDefault = (RootOidDefault) object.getOid();
+        
+        rootOidDefault.asPersistent(""+3);
 
         context.checking(new Expectations() {
             {
@@ -161,12 +176,12 @@ public class NoSqlObjectStoreTest {
     public void registerService() throws Exception {
         context.checking(new Expectations() {
             {
-                one(keyCreator).key(SerialOid.createPersistent(4));
+                one(keyCreator).key(RootOidDefault.create(objectType, ""+4));
                 will(returnValue("4"));
                 one(db).addService("service", "4");
             }
         });
-        store.registerService("service", SerialOid.createPersistent(4));
+        store.registerService(RootOidDefault.create(objectType, ""+4));
     }
 
     @Test
@@ -175,10 +190,10 @@ public class NoSqlObjectStoreTest {
             {
                 one(db).getService("service");
                 will(returnValue("4"));
-                one(keyCreator).oid(objectSpecification, "4");
+                one(keyCreator).oid(specification, "4");
             }
         });
-        store.getOidForService(objectSpecification, "service");
+        store.getOidForService(specification);
     }
 
     @Test
@@ -229,12 +244,12 @@ public class NoSqlObjectStoreTest {
 
         context.checking(new Expectations() {
             {
-                one(keyCreator).key(SerialOid.createPersistent(3));
+                one(keyCreator).key(RootOidDefault.create(objectType, ""+3));
                 will(returnValue("3"));
-                one(db).getInstance("3", specification.getFullIdentifier());
+                one(db).getInstance("3", specification.getObjectType());
             }
         });
-        object = IsisContext.getPersistenceSession().recreateAdapter(SerialOid.createPersistent(3), specification);
+        object = IsisContext.getPersistenceSession().recreateAdapter(RootOidDefault.create(objectType, ""+3), specification);
         assertEquals(ResolveState.GHOST, object.getResolveState());
         store.resolveImmediately(object);
         assertEquals(ResolveState.RESOLVED, object.getResolveState());

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlOidGeneratorTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlOidGeneratorTest.java?rev=1304796&r1=1304795&r2=1304796&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlOidGeneratorTest.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlOidGeneratorTest.java Sat Mar 24 14:01:35 2012
@@ -35,6 +35,8 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.metamodel.spec.SpecificationLoader;
 import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2;
 import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2.Mode;
+import org.apache.isis.runtimes.dflt.objectstores.nosql.db.NoSqlDataDatabase;
+import org.apache.isis.runtimes.dflt.runtime.persistence.oidgenerator.serial.RootOidDefault;
 
 public class NoSqlOidGeneratorTest {
 
@@ -50,7 +52,7 @@ public class NoSqlOidGeneratorTest {
     @Mock
     private ObjectSpecification mockSpecification;
     
-    private NoSqlOid oid;
+    private RootOidDefault oid;
     private NoSqlOidGenerator oidGenerator;
 
 
@@ -59,7 +61,6 @@ public class NoSqlOidGeneratorTest {
     public void setup() {
         Logger.getRootLogger().setLevel(Level.OFF);
 
-        // allowingExamplePojoLoadedIntoSpecificationLoader
         context.checking(new Expectations() {{
            allowing(mockSpecificationLoader).loadSpecification(with(ExamplePojo.class));
            will(returnValue(mockSpecification));
@@ -74,7 +75,7 @@ public class NoSqlOidGeneratorTest {
                 return mockSpecificationLoader;
             }
         };
-        oid = oidGenerator.createTransientOid(new ExamplePojo());
+        oid = (RootOidDefault) oidGenerator.createTransientOid(new ExamplePojo());
     }
 
     @Test
@@ -82,10 +83,10 @@ public class NoSqlOidGeneratorTest {
         
         // TODO: REVIEW: how did this ever call db.nextSerialNumberBatch?
         
-        assertEquals(-999, oid.getSerialNo());
+        assertEquals(-999, oid.getIdentifier());
         assertTrue(oid.isTransient());
-        oid = oidGenerator.createTransientOid(new ExamplePojo());
-        assertEquals(-998, oid.getSerialNo());
+        oid = (RootOidDefault) oidGenerator.createTransientOid(new ExamplePojo());
+        assertEquals(-998, oid.getIdentifier());
     }
 
     @Test
@@ -97,9 +98,9 @@ public class NoSqlOidGeneratorTest {
               }
           });
 
-        oidGenerator.convertTransientToPersistentOid(oid);
+        oidGenerator.asPersistent(oid);
         assertFalse(oid.isTransient());
-        assertEquals(1, oid.getSerialNo());
+        assertEquals(1, oid.getIdentifier());
         context.assertIsSatisfied();
     }
 
@@ -112,11 +113,11 @@ public class NoSqlOidGeneratorTest {
             }
         });
 
-        oidGenerator.convertTransientToPersistentOid(oid);
-        oid = oidGenerator.createTransientOid(new ExamplePojo());
-        oidGenerator.convertTransientToPersistentOid(oid);
+        oidGenerator.asPersistent(oid);
+        oid = (RootOidDefault) oidGenerator.createTransientOid(new ExamplePojo());
+        oidGenerator.asPersistent(oid);
         assertFalse(oid.isTransient());
-        assertEquals(2, oid.getSerialNo());
+        assertEquals(2, oid.getIdentifier());
         context.assertIsSatisfied();
     }
 
@@ -129,12 +130,12 @@ public class NoSqlOidGeneratorTest {
             }
         });
 
-        oidGenerator.convertTransientToPersistentOid(oid);
-        oidGenerator.convertTransientToPersistentOid(oid = oidGenerator.createTransientOid(new ExamplePojo()));
-        oidGenerator.convertTransientToPersistentOid(oid = oidGenerator.createTransientOid(new ExamplePojo()));
-        assertEquals(3, oid.getSerialNo());
-        oidGenerator.convertTransientToPersistentOid(oid = oidGenerator.createTransientOid(new ExamplePojo()));
-        assertEquals(4, oid.getSerialNo());
+        oidGenerator.asPersistent(oid);
+        oidGenerator.asPersistent(oid = (RootOidDefault) oidGenerator.createTransientOid(new ExamplePojo()));
+        oidGenerator.asPersistent(oid = (RootOidDefault) oidGenerator.createTransientOid(new ExamplePojo()));
+        assertEquals(3, oid.getIdentifier());
+        oidGenerator.asPersistent(oid = (RootOidDefault) oidGenerator.createTransientOid(new ExamplePojo()));
+        assertEquals(4, oid.getIdentifier());
 
         context.checking(new Expectations() {
             {
@@ -142,9 +143,9 @@ public class NoSqlOidGeneratorTest {
                 will(returnValue(5L));
             }
         });
-        oidGenerator.convertTransientToPersistentOid(oid = oidGenerator.createTransientOid(new ExamplePojo()));
+        oidGenerator.asPersistent(oid = (RootOidDefault) oidGenerator.createTransientOid(new ExamplePojo()));
         assertFalse(oid.isTransient());
-        assertEquals(5, oid.getSerialNo());
+        assertEquals(5, oid.getIdentifier());
         context.assertIsSatisfied();
     }
 



Mime
View raw message