incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1234456 [4/17] - in /incubator/isis/trunk/framework/runtimes: dflt/bytecode/dflt/src/main/java/org/apache/isis/runtimes/dflt/bytecode/dflt/classsubstitutor/ dflt/bytecode/dflt/src/main/java/org/apache/isis/runtimes/dflt/bytecode/dflt/objec...
Date Sun, 22 Jan 2012 07:36:26 GMT
Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/JsonStateReaderTest.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/file/JsonStateReaderTest.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/JsonStateReaderTest.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/JsonStateReaderTest.java Sun Jan 22 07:36:07 2012
@@ -18,6 +18,8 @@
  */
 package org.apache.isis.runtimes.dflt.objectstores.nosql.file;
 
+import static org.junit.Assert.assertEquals;
+
 import java.util.ArrayList;
 import java.util.List;
 
@@ -25,30 +27,16 @@ import org.apache.isis.runtimes.dflt.obj
 import org.junit.Before;
 import org.junit.Test;
 
-import static org.junit.Assert.assertEquals;
-
-
 public class JsonStateReaderTest {
-    
+
     private JsonStateReader reader;
 
     @Before
     public void setup() {
-        reader = new JsonStateReader("{" + 
-                "\"_encrypt\": \"etc1\"," +
-                "\"_id\": \"#2\"," +
-                "\"_type\": \"com.planchaser.ClassName\"," +
-                "\"_time\": \"ddmmyy\"," +
-                "\"_user\": \"fred\"," +
-                "\"_version\": \"2\"," +
-                "\"field-1\": \"1234\"," +
-                "\"field-2\": \"data\"," +
-                "\"field-3\": null," +
-                "\"list\": [{}, {}]," +
-                "\"aggregate\": {\"_id\": \"#3\"}," +
-                "}");
+        reader = new JsonStateReader("{" + "\"_encrypt\": \"etc1\"," + "\"_id\": \"#2\"," + "\"_type\": \"com.planchaser.ClassName\"," + "\"_time\": \"ddmmyy\"," + "\"_user\": \"fred\"," + "\"_version\": \"2\"," + "\"field-1\": \"1234\"," + "\"field-2\": \"data\"," + "\"field-3\": null,"
+                + "\"list\": [{}, {}]," + "\"aggregate\": {\"_id\": \"#3\"}," + "}");
     }
-    
+
     @Test
     public void readEncryptionType() throws Exception {
         assertEquals("etc1", reader.readEncrytionType());
@@ -63,17 +51,17 @@ public class JsonStateReaderTest {
     public void readObjectType() throws Exception {
         assertEquals("com.planchaser.ClassName", reader.readObjectType());
     }
-    
+
     @Test
     public void readTime() throws Exception {
         assertEquals("ddmmyy", reader.readTime());
     }
-    
+
     @Test
     public void readUser() throws Exception {
         assertEquals("fred", reader.readUser());
     }
-    
+
     @Test
     public void readVersion() throws Exception {
         assertEquals("2", reader.readVersion());
@@ -106,15 +94,14 @@ public class JsonStateReaderTest {
 
     @Test
     public void readList() throws Exception {
-        List<StateReader> collection = reader.readCollection("list");
+        final List<StateReader> collection = reader.readCollection("list");
         assertEquals(2, collection.size());
-//        assertEquals(null, reader.readField("field-4"));
-    }    
+        // assertEquals(null, reader.readField("field-4"));
+    }
 
     @Test
     public void readAggregate() throws Exception {
-        StateReader aggregate = reader.readAggregate("aggregate");
+        final StateReader aggregate = reader.readAggregate("aggregate");
         assertEquals("#3", aggregate.readId());
     }
 }
-

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/JsonStateWriterTest.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/file/JsonStateWriterTest.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/JsonStateWriterTest.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/JsonStateWriterTest.java Sun Jan 22 07:36:07 2012
@@ -18,6 +18,8 @@
  */
 package org.apache.isis.runtimes.dflt.objectstores.nosql.file;
 
+import static org.junit.Assert.assertEquals;
+
 import java.util.ArrayList;
 import java.util.List;
 
@@ -25,9 +27,6 @@ import org.apache.isis.runtimes.dflt.obj
 import org.junit.Before;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
-
-
 public class JsonStateWriterTest {
 
     private JsonStateWriter writer;
@@ -78,26 +77,26 @@ public class JsonStateWriterTest {
 
     @Test
     public void addAggregate() throws Exception {
-        StateWriter aggregate = writer.addAggregate("#4");
+        final StateWriter aggregate = writer.addAggregate("#4");
         aggregate.writeField("number", "string-data");
         assertEquals("{\"#4\": {\"number\": \"string-data\"}}", writer.getData());
     }
 
     @Test
     public void elementData() throws Exception {
-        List<StateWriter> elements = new ArrayList<StateWriter>();
-        StateWriter elementWriter1 = writer.createElementWriter();
+        final List<StateWriter> elements = new ArrayList<StateWriter>();
+        final StateWriter elementWriter1 = writer.createElementWriter();
         elementWriter1.writeField("number", "1");
         elements.add(elementWriter1);
-        StateWriter elementWriter2 = writer.createElementWriter();
+        final StateWriter elementWriter2 = writer.createElementWriter();
         elementWriter2.writeField("number", "4");
         elements.add(elementWriter2);
-        
+
         writer.writeCollection("coll", elements);
-        
+
         assertEquals("{\"coll\": [\n    {\"number\": \"1\"},\n    {\"number\": \"4\"}\n]}", writer.getData());
     }
-    
+
     @Test
     public void requestData() throws Exception {
         writer.writeType("com.planchase.ClassName");

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/DataWriterTest.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/file/server/DataWriterTest.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/DataWriterTest.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/DataWriterTest.java Sun Jan 22 07:36:07 2012
@@ -68,8 +68,7 @@ public class DataWriterTest {
         final DataFileWriter writer = new DataFileWriter(files);
         writer.writeData();
 
-        BufferedReader reader =
-            new BufferedReader(new FileReader(TARGET_DIRECTORY + FULLY_QUALIFIED_CLASSNAME + "/1023.data"));
+        BufferedReader reader = new BufferedReader(new FileReader(TARGET_DIRECTORY + FULLY_QUALIFIED_CLASSNAME + "/1023.data"));
         Assert.assertEquals("org.domain.Class 1023 2", reader.readLine());
         Assert.assertEquals("{data1}", reader.readLine());
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/FileServerTest.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/file/server/FileServerTest.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/FileServerTest.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/file/server/FileServerTest.java Sun Jan 22 07:36:07 2012
@@ -19,17 +19,6 @@
 
 package org.apache.isis.runtimes.dflt.objectstores.nosql.file.server;
 
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.InputStream;
-
-import org.apache.isis.core.commons.lang.IoUtils;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
 import static org.apache.isis.core.commons.matchers.IsisMatchers.existsAndNotEmpty;
 import static org.hamcrest.Matchers.containsString;
 import static org.hamcrest.Matchers.equalTo;
@@ -42,6 +31,17 @@ import static org.junit.Assert.assertNot
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.InputStream;
+
+import org.apache.isis.core.commons.lang.IoUtils;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
 public class FileServerTest {
     private FileServerProcessor server;
     private File logFile1;
@@ -106,8 +106,7 @@ public class FileServerTest {
         final ServerConnection connection = new ServerConnection(in, out);
         server.process(connection);
 
-        assertThat(out.toString(),
-            is(containsString("stream ended prematurely while reading header, aborting request")));
+        assertThat(out.toString(), is(containsString("stream ended prematurely while reading header, aborting request")));
     }
 
     @Test
@@ -128,9 +127,7 @@ public class FileServerTest {
         assertFalse(file1.exists());
         assertFalse(file2.exists());
 
-        final InputStream in =
-            IoUtils
-                .asUtf8ByteStream("W\nIorg.domain.Class 1025 null 1  \n{data1}\n\nIorg.domain.Class 1026 null 1\n{data2}\n\n\n");
+        final InputStream in = IoUtils.asUtf8ByteStream("W\nIorg.domain.Class 1025 null 1  \n{data1}\n\nIorg.domain.Class 1026 null 1\n{data2}\n\n\n");
         final ServerConnection connection = new ServerConnection(in, out);
         server.process(connection);
 
@@ -147,8 +144,7 @@ public class FileServerTest {
         fileWriter.write(originalData);
         fileWriter.close();
 
-        final ServerConnection connection =
-            new ServerConnection(IoUtils.asUtf8ByteStream("W\nUorg.domain.Class 1026 21 22 \n{data2}\n\n\n"), out);
+        final ServerConnection connection = new ServerConnection(IoUtils.asUtf8ByteStream("W\nUorg.domain.Class 1026 21 22 \n{data2}\n\n\n"), out);
         server.process(connection);
 
         assertThat(out.toString(), is(equalTo("ok\n")));
@@ -163,19 +159,15 @@ public class FileServerTest {
         fileWriter.write(originalData);
         fileWriter.close();
 
-        final ServerConnection connection =
-            new ServerConnection(IoUtils.asUtf8ByteStream("W\nUorg.domain.Class 1026 19 21 \n{data2}\n\n\n"), out);
+        final ServerConnection connection = new ServerConnection(IoUtils.asUtf8ByteStream("W\nUorg.domain.Class 1026 19 21 \n{data2}\n\n\n"), out);
         server.process(connection);
 
-        assertThat(
-            out.toString(),
-            is(equalTo("error\nmismatch between FileContent version (19) and DataReader version (21)\n")));
+        assertThat(out.toString(), is(equalTo("error\nmismatch between FileContent version (19) and DataReader version (21)\n")));
     }
 
     @Test
     public void writeCreatesLogFile() throws Exception {
-        final ServerConnection connection =
-            new ServerConnection(IoUtils.asUtf8ByteStream("W\nIorg.domain.Class 1025 6 7\n{data1}\n\n\n"), out);
+        final ServerConnection connection = new ServerConnection(IoUtils.asUtf8ByteStream("W\nIorg.domain.Class 1025 6 7\n{data1}\n\n\n"), out);
         server.process(connection);
 
         assertThat(out.toString(), is(equalTo("ok\n")));
@@ -188,8 +180,7 @@ public class FileServerTest {
     public void readNonExistingFileThrowsException() throws Exception {
         final File file1 = new File("target/test/org.domain.Class", "2020.data");
         file1.delete();
-        final ServerConnection connection =
-            new ServerConnection(IoUtils.asUtf8ByteStream("Rorg.domain.Class 2020\n\n"), out);
+        final ServerConnection connection = new ServerConnection(IoUtils.asUtf8ByteStream("Rorg.domain.Class 2020\n\n"), out);
         server.process(connection);
 
         final String string = out.toString();
@@ -218,8 +209,7 @@ public class FileServerTest {
         fileWriter.write("type 1025 1\n{data1}");
         fileWriter.close();
 
-        final ServerConnection connection =
-            new ServerConnection(IoUtils.asUtf8ByteStream("Rorg.domain.Class 2025\n\n"), out);
+        final ServerConnection connection = new ServerConnection(IoUtils.asUtf8ByteStream("Rorg.domain.Class 2025\n\n"), out);
         server.process(connection);
 
         assertThat(out.toString(), is(equalTo("ok\n{data1}\n\n")));
@@ -227,12 +217,10 @@ public class FileServerTest {
 
     @Test
     public void ReadFailIfEndsEarly() throws Exception {
-        final ServerConnection connection =
-            new ServerConnection(IoUtils.asUtf8ByteStream("Rorg.domain.Class 2025\n"), out);
+        final ServerConnection connection = new ServerConnection(IoUtils.asUtf8ByteStream("Rorg.domain.Class 2025\n"), out);
         server.process(connection);
 
-        assertThat(out.toString(),
-            is(containsString("stream ended prematurely while reading end of command, aborting request")));
+        assertThat(out.toString(), is(containsString("stream ended prematurely while reading end of command, aborting request")));
     }
 
     @Test
@@ -242,8 +230,7 @@ public class FileServerTest {
         fileWriter.write("type 1025 1\n{data1}");
         fileWriter.close();
 
-        final ServerConnection connection =
-            new ServerConnection(IoUtils.asUtf8ByteStream("Rorg.domain.Class 2025\n\n"), out);
+        final ServerConnection connection = new ServerConnection(IoUtils.asUtf8ByteStream("Rorg.domain.Class 2025\n\n"), out);
         server.process(connection);
 
         assertThat(out.toString(), is(equalTo("ok\n{data1}\n\n")));
@@ -256,8 +243,7 @@ public class FileServerTest {
         fileWriter.write("type 1025 1\n{data1}");
         fileWriter.close();
 
-        final ServerConnection connection =
-            new ServerConnection(IoUtils.asUtf8ByteStream("Rorg.domain.Class 2025\n\n"), out);
+        final ServerConnection connection = new ServerConnection(IoUtils.asUtf8ByteStream("Rorg.domain.Class 2025\n\n"), out);
         server.process(connection);
 
         assertThat(out.toString(), is(equalTo("ok\n{data1}\n\n")));
@@ -265,8 +251,7 @@ public class FileServerTest {
 
     @Test
     public void hasNoInstances() throws Exception {
-        final ServerConnection connection =
-            new ServerConnection(IoUtils.asUtf8ByteStream("Iorg.domain.None\n\n"), out);
+        final ServerConnection connection = new ServerConnection(IoUtils.asUtf8ByteStream("Iorg.domain.None\n\n"), out);
         server.process(connection);
 
         assertThat(out.toString(), is(equalTo("ok false\n")));
@@ -279,8 +264,7 @@ public class FileServerTest {
         fileWriter.write("type 1025 1\n{data1}");
         fileWriter.close();
 
-        final ServerConnection connection =
-            new ServerConnection(IoUtils.asUtf8ByteStream("Iorg.domain.Class\n\n"), out);
+        final ServerConnection connection = new ServerConnection(IoUtils.asUtf8ByteStream("Iorg.domain.Class\n\n"), out);
         server.process(connection);
 
         assertThat(out.toString(), is(equalTo("ok true\n")));

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/DemoMongo.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/mongo/DemoMongo.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/DemoMongo.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/DemoMongo.java Sun Jan 22 07:36:07 2012
@@ -37,7 +37,8 @@ public class DemoMongo {
         }
 
         /*
-         * Mongo m = new Mongo( "localhost" ); Mongo m = new Mongo( "localhost" , 27017 );
+         * Mongo m = new Mongo( "localhost" ); Mongo m = new Mongo( "localhost"
+         * , 27017 );
          */
         m.dropDatabase("mydb");
 
@@ -48,7 +49,8 @@ public class DemoMongo {
 
         final DB db = m.getDB("mydb");
         /*
-         * DBCollection coll = db.getCollection("testCollection1"); coll = db.getCollection("testCollection2");
+         * DBCollection coll = db.getCollection("testCollection1"); coll =
+         * db.getCollection("testCollection2");
          */
 
         final DBCollection coll = db.getCollection("testCollection1");

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoDbTest.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/mongo/MongoDbTest.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoDbTest.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoDbTest.java Sun Jan 22 07:36:07 2012
@@ -60,7 +60,8 @@ public class MongoDbTest {
             m.dropDatabase("testdb");
             testDb = m.getDB("testdb");
         } catch (final Exception e) {
-            assumeThat(true, is(false)); // ignore if no MongoDB instance to connect to
+            assumeThat(true, is(false)); // ignore if no MongoDB instance to
+                                         // connect to
             return;
         }
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoStateReaderTest.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/mongo/MongoStateReaderTest.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoStateReaderTest.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoStateReaderTest.java Sun Jan 22 07:36:07 2012
@@ -49,7 +49,8 @@ public class MongoStateReaderTest {
         try {
             m.dropDatabase("mydb");
         } catch (final Exception e) {
-            assumeThat(true, is(false));// ie ignore test because we've had an exception
+            assumeThat(true, is(false));// ie ignore test because we've had an
+                                        // exception
             return;
         }
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/AbstractFieldMappingFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/AbstractFieldMappingFactory.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/AbstractFieldMappingFactory.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/AbstractFieldMappingFactory.java Sun Jan 22 07:36:07 2012
@@ -27,12 +27,12 @@ import org.apache.isis.runtimes.dflt.run
 
 public abstract class AbstractFieldMappingFactory implements FieldMappingFactory {
 
-    protected String getTypeOverride(ObjectSpecification object, final ObjectAssociation field, final String type) {
+    protected String getTypeOverride(final ObjectSpecification object, final ObjectAssociation field, final String type) {
         // isis.persistor.sql.automapper.default
         final IsisConfiguration configParameters = IsisContext.getConfiguration();
-        String find = object.getShortIdentifier() + "." + field.getId();
+        final String find = object.getShortIdentifier() + "." + field.getId();
         final String property = SqlObjectStore.BASE_NAME + ".automapper.type." + find;
-        String dataType = configParameters.getString(property, type);
+        final String dataType = configParameters.getString(property, type);
         return dataType;
     }
 }

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/CollectionMapper.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/CollectionMapper.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/CollectionMapper.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/CollectionMapper.java Sun Jan 22 07:36:07 2012
@@ -24,8 +24,7 @@ import org.apache.isis.core.metamodel.ad
 
 public interface CollectionMapper {
 
-    public void loadInternalCollection(final DatabaseConnector connector, final ObjectAdapter parent,
-        final boolean makeResolved);
+    public void loadInternalCollection(final DatabaseConnector connector, final ObjectAdapter parent, final boolean makeResolved);
 
     public void saveInternalCollection(final DatabaseConnector connector, final ObjectAdapter parent);
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/DatabaseConnector.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/DatabaseConnector.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/DatabaseConnector.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/DatabaseConnector.java Sun Jan 22 07:36:07 2012
@@ -23,7 +23,8 @@ import org.apache.isis.core.commons.debu
 
 public interface DatabaseConnector {
     /*
-     * @deprecated Results callStoredProcedure(String name, Parameter[] parameters);
+     * @deprecated Results callStoredProcedure(String name, Parameter[]
+     * parameters);
      */
     void close();
 
@@ -31,7 +32,8 @@ public interface DatabaseConnector {
 
     void delete(String sql);
 
-    // MultipleResults executeStoredProcedure(String name, Parameter[] parameters);
+    // MultipleResults executeStoredProcedure(String name, Parameter[]
+    // parameters);
 
     boolean hasTable(String tableName);
 
@@ -44,7 +46,8 @@ public interface DatabaseConnector {
     Results select(String sql);
 
     /**
-     * Updates the database using the specified sql statement, and returns the number of rows affected.
+     * Updates the database using the specified sql statement, and returns the
+     * number of rows affected.
      */
     int update(String sql);
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/Defaults.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/Defaults.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/Defaults.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/Defaults.java Sun Jan 22 07:36:07 2012
@@ -21,13 +21,12 @@ package org.apache.isis.runtimes.dflt.ob
 
 import java.util.Calendar;
 
-import org.joda.time.DateTimeZone;
-
 import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.joda.time.DateTimeZone;
 
 /**
- * Provides objectstore defaults. Most significantly, maintains the object store default TimeZone, and maintains
- * Calendar.
+ * Provides objectstore defaults. Most significantly, maintains the object store
+ * default TimeZone, and maintains Calendar.
  * 
  * 
  * @version $Rev$ $Date$
@@ -43,7 +42,7 @@ public class Defaults {
      *            by default, @link {@link SqlObjectStore#BASE_NAME}
      * @param isisConfiguration
      */
-    public static void initialise(String propertiesBase, IsisConfiguration isisConfiguration) {
+    public static void initialise(final String propertiesBase, final IsisConfiguration isisConfiguration) {
         Defaults.propertiesBase = propertiesBase; // "isis.persistor.sql"
         setTimeZone(DateTimeZone.UTC);
 
@@ -71,14 +70,13 @@ public class Defaults {
      * @param property
      * @return
      */
-    protected static String getStringProperty(String propertiesBase, final IsisConfiguration configParameters,
-        String property) {
+    protected static String getStringProperty(final String propertiesBase, final IsisConfiguration configParameters, final String property) {
         return configParameters.getString(propertiesBase + ".default." + property, property);
     }
 
     /**
-     * Returns a string value by looking up "isis.persistor.sql.default.XXXX", returning the specified default, if no
-     * value was found.
+     * Returns a string value by looking up "isis.persistor.sql.default.XXXX",
+     * returning the specified default, if no value was found.
      * 
      * @param propertiesBase
      * @param configParameters
@@ -86,14 +84,13 @@ public class Defaults {
      * @param defaultValue
      * @return
      */
-    protected static String getStringProperty(String propertiesBase, final IsisConfiguration configParameters,
-        String property, String defaultValue) {
+    protected static String getStringProperty(final String propertiesBase, final IsisConfiguration configParameters, final String property, final String defaultValue) {
         return configParameters.getString(propertiesBase + ".default." + property, defaultValue);
     }
 
     /**
-     * Returns an integer value by looking up "isis.persistor.sql.default.XXXX", returning the specified default, if no
-     * value was found.
+     * Returns an integer value by looking up "isis.persistor.sql.default.XXXX",
+     * returning the specified default, if no value was found.
      * 
      * @param propertiesBase
      * @param configParameters
@@ -101,8 +98,7 @@ public class Defaults {
      * @param defaultValue
      * @return
      */
-    protected static int getIntProperty(String propertiesBase, final IsisConfiguration configParameters,
-        String property, int defaultValue) {
+    protected static int getIntProperty(final String propertiesBase, final IsisConfiguration configParameters, final String property, final int defaultValue) {
         return configParameters.getInteger(propertiesBase + ".default." + property, defaultValue);
     }
 
@@ -145,7 +141,7 @@ public class Defaults {
     // {{ Primary Key label, defaults to "pk_id"
     private static String pkIdLabel;
 
-    public static void setPkIdLabel(String pkIdLabel) {
+    public static void setPkIdLabel(final String pkIdLabel) {
         Defaults.pkIdLabel = pkIdLabel;
     }
 
@@ -158,7 +154,7 @@ public class Defaults {
     // {{ Id Column, defaults to "id"
     private static String idColumn;
 
-    public static void setIdColumn(String idColumn) {
+    public static void setIdColumn(final String idColumn) {
         Defaults.idColumn = idColumn;
     }
 
@@ -199,9 +195,11 @@ public class Defaults {
     static String TYPE_DEFAULT;
 
     /**
-     * Default SQL data types used to define the fields in the database. By providing this method, we allow the user an
-     * opportunity to override these types by specifying alternatives in sql.properties (or which ever). For example,
-     * Postgresql does not know about DATETIME, but can use TIMESTAMP instead.
+     * Default SQL data types used to define the fields in the database. By
+     * providing this method, we allow the user an opportunity to override these
+     * types by specifying alternatives in sql.properties (or which ever). For
+     * example, Postgresql does not know about DATETIME, but can use TIMESTAMP
+     * instead.
      * 
      * @param dataTypes
      * @param baseName
@@ -289,7 +287,7 @@ public class Defaults {
     // {{ Versioning
     private static boolean useVersioning;
 
-    public static void useVersioning(boolean useVersioning) {
+    public static void useVersioning(final boolean useVersioning) {
         Defaults.useVersioning = useVersioning;
     }
 
@@ -297,12 +295,11 @@ public class Defaults {
         return useVersioning;
     }
 
-    public static boolean useVersioning(String shortIdentifier) {
+    public static boolean useVersioning(final String shortIdentifier) {
         if (useVersioning() == false) {
             return false;
         }
-        final String useVersioningProperty =
-            getStringProperty(propertiesBase, isisConfiguration, "versioning." + shortIdentifier, "true");
+        final String useVersioningProperty = getStringProperty(propertiesBase, isisConfiguration, "versioning." + shortIdentifier, "true");
         return (useVersioningProperty.compareToIgnoreCase("true") == 0);
     }
     // }}

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/FieldMappingLookup.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/FieldMappingLookup.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/FieldMappingLookup.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/FieldMappingLookup.java Sun Jan 22 07:36:07 2012
@@ -22,8 +22,6 @@ package org.apache.isis.runtimes.dflt.ob
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.log4j.Logger;
-
 import org.apache.isis.core.commons.exceptions.NotYetImplementedException;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
@@ -33,17 +31,16 @@ import org.apache.isis.runtimes.dflt.obj
 import org.apache.isis.runtimes.dflt.objectstores.sql.mapping.ObjectReferenceMapping;
 import org.apache.isis.runtimes.dflt.objectstores.sql.mapping.ObjectReferenceMappingFactory;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
+import org.apache.log4j.Logger;
 
 public class FieldMappingLookup {
     private static final Logger LOG = Logger.getLogger(FieldMappingLookup.class);
-    private final Map<ObjectSpecification, FieldMappingFactory> fieldMappings =
-        new HashMap<ObjectSpecification, FieldMappingFactory>();
-    private final Map<ObjectSpecification, ObjectReferenceMappingFactory> referenceMappings =
-        new HashMap<ObjectSpecification, ObjectReferenceMappingFactory>();
+    private final Map<ObjectSpecification, FieldMappingFactory> fieldMappings = new HashMap<ObjectSpecification, FieldMappingFactory>();
+    private final Map<ObjectSpecification, ObjectReferenceMappingFactory> referenceMappings = new HashMap<ObjectSpecification, ObjectReferenceMappingFactory>();
     private FieldMappingFactory referenceFieldMappingfactory;
     private ObjectReferenceMappingFactory objectReferenceMappingfactory;
 
-    public FieldMapping createMapping(ObjectSpecification object, final ObjectAssociation field) {
+    public FieldMapping createMapping(final ObjectSpecification object, final ObjectAssociation field) {
         final ObjectSpecification spec = field.getSpecification();
         FieldMappingFactory factory = fieldMappings.get(spec);
         if (factory != null) {
@@ -57,7 +54,8 @@ public class FieldMappingLookup {
             addFieldMappingFactory(spec, factory);
             return factory.createFieldMapping(object, field);
             // } else {
-            // throw new IsisException("No mapper for " + spec + " (no default mapper)");
+            // throw new IsisException("No mapper for " + spec +
+            // " (no default mapper)");
         }
     }
 
@@ -75,9 +73,11 @@ public class FieldMappingLookup {
         } else {// if (true /* TODO test for reference */) {
             factory = objectReferenceMappingfactory;
             // add(spec, factory);
-            return factory.createReferenceMapping(columnName, spec); // TODO: here
+            return factory.createReferenceMapping(columnName, spec); // TODO:
+                                                                     // here
             // } else {
-            // throw new IsisException("No mapper for " + spec + " (no default mapper)");
+            // throw new IsisException("No mapper for " + spec +
+            // " (no default mapper)");
         }
     }
 
@@ -91,8 +91,7 @@ public class FieldMappingLookup {
         fieldMappings.put(specification, mapper);
     }
 
-    public void addReferenceMappingFactory(final ObjectSpecification specification,
-        final ObjectReferenceMappingFactory mapper) {
+    public void addReferenceMappingFactory(final ObjectSpecification specification, final ObjectReferenceMappingFactory mapper) {
         LOG.debug("add mapper " + mapper + " for " + specification);
         referenceMappings.put(specification, mapper);
     }

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/ObjectMapping.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/ObjectMapping.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/ObjectMapping.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/ObjectMapping.java Sun Jan 22 07:36:07 2012
@@ -36,8 +36,7 @@ public interface ObjectMapping {
 
     Vector<ObjectAdapter> getInstances(DatabaseConnector connector, ObjectSpecification spec, String title);
 
-    Vector<ObjectAdapter> getInstances(DatabaseConnector connector, ObjectSpecification spec,
-        PersistenceQueryFindByPattern query);
+    Vector<ObjectAdapter> getInstances(DatabaseConnector connector, ObjectSpecification spec, PersistenceQueryFindByPattern query);
 
     ObjectAdapter getObject(DatabaseConnector connector, Oid oid, ObjectSpecification hint);
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/ObjectMappingFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/ObjectMappingFactory.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/ObjectMappingFactory.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/ObjectMappingFactory.java Sun Jan 22 07:36:07 2012
@@ -20,6 +20,5 @@
 package org.apache.isis.runtimes.dflt.objectstores.sql;
 
 public interface ObjectMappingFactory {
-    ObjectMapping createMapper(String className, String propertiesBase, FieldMappingLookup fieldMapperLookup,
-        ObjectMappingLookup objectMapperLookup);
+    ObjectMapping createMapper(String className, String propertiesBase, FieldMappingLookup fieldMapperLookup, ObjectMappingLookup objectMapperLookup);
 }

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/ObjectMappingLookup.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/ObjectMappingLookup.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/ObjectMappingLookup.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/ObjectMappingLookup.java Sun Jan 22 07:36:07 2012
@@ -45,8 +45,7 @@ public class ObjectMappingLookup impleme
         ObjectMapping mapping = mappings.get(spec);
         if (mapping == null) {
             final String propertiesBase = SqlObjectStore.BASE_NAME + ".automapper.default";
-            mapping =
-                objectMappingFactory.createMapper(spec.getFullIdentifier(), propertiesBase, fieldMappingLookup, this);
+            mapping = objectMappingFactory.createMapper(spec.getFullIdentifier(), propertiesBase, fieldMappingLookup, this);
             add(spec, mapping, connection);
         }
         LOG.debug("  mapper for " + spec.getSingularName() + " -> " + mapping);

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/Sql.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/Sql.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/Sql.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/Sql.java Sun Jan 22 07:36:07 2012
@@ -61,9 +61,11 @@ public class Sql {
         return name.replace(' ', '_').toLowerCase();
 
         /*
-         * int length = name.length(); StringBuffer convertedName = new StringBuffer(length); for (int i = 0; i <
-         * length; i++) { char ch = name.charAt(i); if (ch == ' ') { i++; //ch = name.charAt(i);
-         * //Character.toUpperCase(ch); ch = '_'; } convertedName.append(ch); } return convertedName.toString();
+         * int length = name.length(); StringBuffer convertedName = new
+         * StringBuffer(length); for (int i = 0; i < length; i++) { char ch =
+         * name.charAt(i); if (ch == ' ') { i++; //ch = name.charAt(i);
+         * //Character.toUpperCase(ch); ch = '_'; } convertedName.append(ch); }
+         * return convertedName.toString();
          */
     }
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlExecutionContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlExecutionContext.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlExecutionContext.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlExecutionContext.java Sun Jan 22 07:36:07 2012
@@ -27,8 +27,7 @@ import org.apache.isis.runtimes.dflt.run
 public class SqlExecutionContext implements PersistenceCommandContext {
     private final DatabaseConnector connection;
 
-    public SqlExecutionContext(final DatabaseConnector connection, final IsisTransactionManager transactionManager,
-        final MessageBroker messageBroker, final UpdateNotifier updateNotifier) {
+    public SqlExecutionContext(final DatabaseConnector connection, final IsisTransactionManager transactionManager, final MessageBroker messageBroker, final UpdateNotifier updateNotifier) {
         this.connection = connection;
     }
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlObjectStore.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlObjectStore.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlObjectStore.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlObjectStore.java Sun Jan 22 07:36:07 2012
@@ -22,8 +22,6 @@ package org.apache.isis.runtimes.dflt.ob
 import java.util.List;
 import java.util.Vector;
 
-import org.apache.log4j.Logger;
-
 import org.apache.isis.core.commons.debug.DebugBuilder;
 import org.apache.isis.core.commons.debug.DebugString;
 import org.apache.isis.core.commons.exceptions.IsisException;
@@ -47,6 +45,7 @@ import org.apache.isis.runtimes.dflt.run
 import org.apache.isis.runtimes.dflt.runtime.system.transaction.IsisTransactionManager;
 import org.apache.isis.runtimes.dflt.runtime.system.transaction.MessageBroker;
 import org.apache.isis.runtimes.dflt.runtime.system.transaction.UpdateNotifier;
+import org.apache.log4j.Logger;
 
 public final class SqlObjectStore implements ObjectStore {
 
@@ -196,12 +195,12 @@ public final class SqlObjectStore implem
                 LOG.debug("  save object " + object);
                 if (object.getSpecification().isCollectionOrIsAggregated()) {
 
-                    ObjectAdapter parent = object.getAggregateRoot();
+                    final ObjectAdapter parent = object.getAggregateRoot();
                     LOG.debug("change to internal collection being persisted through parent");
 
-                    Oid oid = object.getOid();
+                    final Oid oid = object.getOid();
                     if (oid instanceof AggregatedOid) {
-                        AggregatedOid aoid = (AggregatedOid) oid;
+                        final AggregatedOid aoid = (AggregatedOid) oid;
                         final ObjectMapping mapping2 = objectMappingLookup.getMapping(parent, connection);
 
                         if (mapping2.saveCollection(connection, parent, aoid.getId()) == false) {
@@ -212,19 +211,24 @@ public final class SqlObjectStore implem
                     } else {
                         throw new NotYetImplementedException(object.toString());
                     }
-                    // / ObjectAssociation assoc = parent.getSpecification().getAssociation(aoid.getId());
+                    // / ObjectAssociation assoc =
+                    // parent.getSpecification().getAssociation(aoid.getId());
 
                     // / ObjectAdapter realObject = assoc.get(parent);
 
-                    // for (final CollectionMapper collectionMapper : collectionMappers) {
-                    // collectionMapper.saveInternalCollection(connector, object);
+                    // for (final CollectionMapper collectionMapper :
+                    // collectionMappers) {
+                    // collectionMapper.saveInternalCollection(connector,
+                    // object);
                     // }
                     // /}
 
-                    // TODO a better plan would be ask the mapper to save the collection
+                    // TODO a better plan would be ask the mapper to save the
+                    // collection
                     // -saveCollection(parent,collection)
 
-                    // mapperLookup.getMapper(connection, parent).save(connection, parent);
+                    // mapperLookup.getMapper(connection,
+                    // parent).save(connection, parent);
                     // connectionPool.release(connection);
 
                     // throw new NotYetImplementedException(object.toString());
@@ -276,8 +280,7 @@ public final class SqlObjectStore implem
         final IsisTransactionManager transactionManager = IsisContext.getTransactionManager();
         final MessageBroker messageBroker = IsisContext.getMessageBroker();
         final UpdateNotifier updateNotifier = IsisContext.getUpdateNotifier();
-        final SqlExecutionContext context =
-            new SqlExecutionContext(connector, transactionManager, messageBroker, updateNotifier);
+        final SqlExecutionContext context = new SqlExecutionContext(connector, transactionManager, messageBroker, updateNotifier);
         try {
             for (final PersistenceCommand command : commands) {
                 command.execute(context);
@@ -325,18 +328,17 @@ public final class SqlObjectStore implem
         return instanceArray;
     }
 
-    private void addSpecQueryInstances(ObjectSpecification specification, DatabaseConnector connector,
-        PersistenceQueryFindByPattern query, Vector<ObjectAdapter> matchingInstances) {
+    private void addSpecQueryInstances(final ObjectSpecification specification, final DatabaseConnector connector, final PersistenceQueryFindByPattern query, final Vector<ObjectAdapter> matchingInstances) {
 
         if (specification.isAbstract() == false) {
             final ObjectMapping mapper = objectMappingLookup.getMapping(specification, connector);
-            Vector<ObjectAdapter> instances = mapper.getInstances(connector, specification, query);
+            final Vector<ObjectAdapter> instances = mapper.getInstances(connector, specification, query);
             matchingInstances.addAll(instances);
 
         }
         if (specification.hasSubclasses()) {
             final List<ObjectSpecification> subclasses = specification.subclasses();
-            for (ObjectSpecification subclassSpec : subclasses) {
+            for (final ObjectSpecification subclassSpec : subclasses) {
                 addSpecQueryInstances(subclassSpec, connector, query, matchingInstances);
             }
         }
@@ -360,8 +362,7 @@ public final class SqlObjectStore implem
         return instanceArray;
     }
 
-    private void addSpecInstances(ObjectSpecification spec, DatabaseConnector connector,
-        Vector<ObjectAdapter> matchingInstances) {
+    private void addSpecInstances(final ObjectSpecification spec, final DatabaseConnector connector, final Vector<ObjectAdapter> matchingInstances) {
 
         if (spec.isAbstract() == false) {
             final ObjectMapping mapper = objectMappingLookup.getMapping(spec, connector);
@@ -371,7 +372,7 @@ public final class SqlObjectStore implem
 
         if (spec.hasSubclasses()) {
             final List<ObjectSpecification> subclasses = spec.subclasses();
-            for (ObjectSpecification subclassSpec : subclasses) {
+            for (final ObjectSpecification subclassSpec : subclasses) {
                 addSpecInstances(subclassSpec, connector, matchingInstances);
             }
         }

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlOid.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlOid.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlOid.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlOid.java Sun Jan 22 07:36:07 2012
@@ -177,8 +177,7 @@ public final class SqlOid implements Oid
 
     @Override
     public String toString() {
-        return (isTransient() ? "T" : "") + "OID#" + primaryKey.stringValue() + "/" + className
-            + (previous == null ? "" : "+");
+        return (isTransient() ? "T" : "") + "OID#" + primaryKey.stringValue() + "/" + className + (previous == null ? "" : "+");
     }
 
 }

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlOidGenerator.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlOidGenerator.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlOidGenerator.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlOidGenerator.java Sun Jan 22 07:36:07 2012
@@ -43,8 +43,7 @@ public class SqlOidGenerator extends Oid
 
         public synchronized long nextPersistentId(final DatabaseConnectorPool connectionPool) {
             if (lastId > newBatchAt) {
-                throw new SqlObjectStoreException("ID exception, last id (" + lastId + ") past new batch boundary ("
-                    + newBatchAt + ")");
+                throw new SqlObjectStoreException("ID exception, last id (" + lastId + ") past new batch boundary (" + newBatchAt + ")");
             }
             if (lastId == newBatchAt) {
                 prepareNewBatch(connectionPool);
@@ -65,8 +64,7 @@ public class SqlOidGenerator extends Oid
                     db.update("insert into " + tableName + " values (" + newBatchAt + ")");
                     LOG.debug("Initial ID batch created, from " + lastId + " to " + newBatchAt);
                 } else {
-                    if (db.update("update " + tableName + " set " + numberColumn + " = " + numberColumn + " + "
-                        + BATCH_SIZE) != 1) {
+                    if (db.update("update " + tableName + " set " + numberColumn + " = " + numberColumn + " + " + BATCH_SIZE) != 1) {
                         throw new SqlObjectStoreException("failed to update serial id table; no rows updated");
                     }
                     final Results rs = db.select("select " + numberColumn + " from " + tableName);

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlPersistenceSessionFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlPersistenceSessionFactory.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlPersistenceSessionFactory.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlPersistenceSessionFactory.java Sun Jan 22 07:36:07 2012
@@ -24,8 +24,7 @@ import org.apache.isis.runtimes.dflt.run
 
 public class SqlPersistenceSessionFactory extends PersistenceSessionFactoryDelegating {
 
-    public SqlPersistenceSessionFactory(final DeploymentType deploymentType,
-        final SqlPersistorInstaller sqlPersistorInstaller) {
+    public SqlPersistenceSessionFactory(final DeploymentType deploymentType, final SqlPersistorInstaller sqlPersistorInstaller) {
         super(deploymentType, sqlPersistorInstaller);
     }
 }

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlPersistorInstaller.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlPersistorInstaller.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlPersistorInstaller.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlPersistorInstaller.java Sun Jan 22 07:36:07 2012
@@ -42,8 +42,7 @@ public class SqlPersistorInstaller exten
     }
 
     @Override
-    protected ObjectStore createObjectStore(final IsisConfiguration configuration,
-        final ObjectAdapterFactory objectFactory, final AdapterManager adapterManager) {
+    protected ObjectStore createObjectStore(final IsisConfiguration configuration, final ObjectAdapterFactory objectFactory, final AdapterManager adapterManager) {
 
         if (objectStore == null) {
             final FieldMappingLookup fieldMappingLookup = new FieldMappingLookup();
@@ -89,7 +88,7 @@ public class SqlPersistorInstaller exten
      * 
      * 
      * 
-     * @Override protected AdapterManagerExtended createAdapterManager(final IsisConfiguration configuration) { return
-     * new XmlAdapterManager(); }
+     * @Override protected AdapterManagerExtended createAdapterManager(final
+     * IsisConfiguration configuration) { return new XmlAdapterManager(); }
      */
 }

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/TitleMapping.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/TitleMapping.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/TitleMapping.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/TitleMapping.java Sun Jan 22 07:36:07 2012
@@ -62,8 +62,7 @@ public class TitleMapping {
         sql.append(Sql.escapeAndQuoteValue(titleString));
     }
 
-    public void appendUpdateAssignment(final DatabaseConnector connector, final StringBuffer sql,
-        final ObjectAdapter object) {
+    public void appendUpdateAssignment(final DatabaseConnector connector, final StringBuffer sql, final ObjectAdapter object) {
         sql.append(column);
         sql.append(" = ");
         appendInsertValues(connector, sql, object);

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AbstractAutoMapper.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AbstractAutoMapper.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AbstractAutoMapper.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AbstractAutoMapper.java Sun Jan 22 07:36:07 2012
@@ -24,8 +24,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.log4j.Logger;
-
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.exceptions.NotYetImplementedException;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -43,6 +41,7 @@ import org.apache.isis.runtimes.dflt.obj
 import org.apache.isis.runtimes.dflt.objectstores.sql.mapping.FieldMapping;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.AdapterManager;
+import org.apache.log4j.Logger;
 
 public abstract class AbstractAutoMapper extends AbstractMapper {
     private static final Logger LOG = Logger.getLogger(AbstractAutoMapper.class);
@@ -52,13 +51,11 @@ public abstract class AbstractAutoMapper
     final FieldMappingLookup lookup;
     final ObjectMappingLookup objectMapperLookup;
 
-    protected AbstractAutoMapper(final String className, final String parameterBase, final FieldMappingLookup lookup,
-        final ObjectMappingLookup objectMapperLookup) {
+    protected AbstractAutoMapper(final String className, final String parameterBase, final FieldMappingLookup lookup, final ObjectMappingLookup objectMapperLookup) {
         specification = IsisContext.getSpecificationLoader().loadSpecification(className);
         if (specification.getProperties() == null || specification.getProperties().size() == 0) {
             if (specification.isAbstract() == false) {
-                throw new SqlObjectStoreException(specification.getFullIdentifier() + " has no fields: "
-                    + specification);
+                throw new SqlObjectStoreException(specification.getFullIdentifier() + " has no fields: " + specification);
             }
         }
         this.className = className;
@@ -67,8 +64,7 @@ public abstract class AbstractAutoMapper
         this.objectMapperLookup = objectMapperLookup;
     }
 
-    protected AbstractAutoMapper(final FieldMappingLookup lookup, final AbstractAutoMapper abstractAutoMapper,
-        String className) {
+    protected AbstractAutoMapper(final FieldMappingLookup lookup, final AbstractAutoMapper abstractAutoMapper, final String className) {
 
         this.className = className;
         specification = IsisContext.getSpecificationLoader().loadSpecification(className);
@@ -91,8 +87,7 @@ public abstract class AbstractAutoMapper
     protected List<FieldMapping> fieldMappings = new ArrayList<FieldMapping>();
     protected Map<ObjectAssociation, FieldMapping> fieldMappingLookup = new HashMap<ObjectAssociation, FieldMapping>();
 
-    private void setUpFieldMappers(final FieldMappingLookup lookup, final ObjectMappingLookup objectMapperLookup,
-        final String className, final String parameterBase) {
+    private void setUpFieldMappers(final FieldMappingLookup lookup, final ObjectMappingLookup objectMapperLookup, final String className, final String parameterBase) {
         final IsisConfiguration configParameters = IsisContext.getConfiguration();
         table = configParameters.getString(parameterBase + ".table." + className);
         if (table == null) {
@@ -106,23 +101,23 @@ public abstract class AbstractAutoMapper
         if (configParameters.getBoolean(parameterBase + "all-fields", true)) {
             setupFullMapping(lookup, objectMapperLookup, className, configParameters, parameterBase);
         } else {
-            // setupSpecifiedMapping(specification, configParameters, parameterBase);
+            // setupSpecifiedMapping(specification, configParameters,
+            // parameterBase);
         }
 
         LOG.info("table mapping: " + table + " (" + columnList(fieldMappings) + ")");
     }
 
-    protected String getTableNameFromSpecification(ObjectSpecification objectSpecification) {
+    protected String getTableNameFromSpecification(final ObjectSpecification objectSpecification) {
         return Sql.tableIdentifier(Sql.sqlName(Defaults.getTablePrefix() + objectSpecification.getShortIdentifier()));
     }
 
     protected List<ObjectAssociation> fields = new ArrayList<ObjectAssociation>();
 
-    protected void getExtraFields(List<ObjectAssociation> fields) {
+    protected void getExtraFields(final List<ObjectAssociation> fields) {
     }
 
-    private void setupFullMapping(final FieldMappingLookup lookup, final ObjectMappingLookup objectMapperLookup,
-        final String className, final IsisConfiguration configParameters, final String parameterBase) {
+    private void setupFullMapping(final FieldMappingLookup lookup, final ObjectMappingLookup objectMapperLookup, final String className, final IsisConfiguration configParameters, final String parameterBase) {
 
         fields.addAll(specification.getAssociations());
 
@@ -151,26 +146,32 @@ public abstract class AbstractAutoMapper
             } else if (field.isOneToManyAssociation()) {
                 oneToManyProperties[collectionFieldNo] = field;
 
-                // TODO: Replace "new ForeignKeyCollectionMapper" with a factory method(?) to allow a different
+                // TODO: Replace "new ForeignKeyCollectionMapper" with a factory
+                // method(?) to allow a different
                 // default CollectionMapper
 
-                // TODO: I think the default order should be changed - and I think I (KAM) have dropped support for the
-                // original "association-table" implementation. This means the current checks are misleading.
+                // TODO: I think the default order should be changed - and I
+                // think I (KAM) have dropped support for the
+                // original "association-table" implementation. This means the
+                // current checks are misleading.
                 final String type = subset.getString(field.getId());
                 if (type == null || type.equals("association-table")) {
-                    // collectionMappers[collectionFieldNo] = new AutoCollectionMapper(specification,
+                    // collectionMappers[collectionFieldNo] = new
+                    // AutoCollectionMapper(specification,
                     // oneToManyProperties[collectionFieldNo], lookup);
                     // collectionMappers[collectionFieldNo] = new
-                    // ForeignKeyCollectionMapper(oneToManyProperties[collectionFieldNo], parameterBase, lookup,
+                    // ForeignKeyCollectionMapper(oneToManyProperties[collectionFieldNo],
+                    // parameterBase, lookup,
                     // objectMapperLookup);
 
                     CollectionMapper collectionMapper = null;
 
                     // Trying to detect recursion, here.
-                    // Let ForeignKeyInChildCollectionMapper find itself when a field is a collection of the current
+                    // Let ForeignKeyInChildCollectionMapper find itself when a
+                    // field is a collection of the current
                     // field type.
                     if (this instanceof ForeignKeyInChildCollectionMapper) {
-                        ForeignKeyInChildCollectionMapper mc = (ForeignKeyInChildCollectionMapper) this;
+                        final ForeignKeyInChildCollectionMapper mc = (ForeignKeyInChildCollectionMapper) this;
 
                         if (mc.priorField == field) {
                             collectionMapper = mc;
@@ -178,19 +179,15 @@ public abstract class AbstractAutoMapper
                     }
 
                     if (collectionMapper == null) {
-                        // TODO: Polymorphism - is it sufficient for the collectionMapper to handle the subclasses?
+                        // TODO: Polymorphism - is it sufficient for the
+                        // collectionMapper to handle the subclasses?
                         final ObjectSpecification fieldSpecification = field.getSpecification();
                         if (fieldSpecification.hasSubclasses() || fieldSpecification.isAbstract()) {
                             // PolymorphicForeignKeyInChildCollectionBaseMapper
                             // Or PolymorphicForeignKeyInChildCollectionMapper
-                            collectionMapper =
-                                new PolymorphicForeignKeyInChildCollectionBaseMapper(
-                                    oneToManyProperties[collectionFieldNo], parameterBase, lookup, objectMapperLookup,
-                                    this, field);
+                            collectionMapper = new PolymorphicForeignKeyInChildCollectionBaseMapper(oneToManyProperties[collectionFieldNo], parameterBase, lookup, objectMapperLookup, this, field);
                         } else {
-                            ForeignKeyInChildCollectionMapper mapper =
-                                new ForeignKeyInChildCollectionMapper(oneToManyProperties[collectionFieldNo],
-                                    parameterBase, lookup, objectMapperLookup, this, field);
+                            final ForeignKeyInChildCollectionMapper mapper = new ForeignKeyInChildCollectionMapper(oneToManyProperties[collectionFieldNo], parameterBase, lookup, objectMapperLookup, this, field);
                             mapper.setUpFieldMappers();
                             collectionMapper = mapper;
                         }
@@ -206,8 +203,10 @@ public abstract class AbstractAutoMapper
                         throw new SqlObjectStoreException("Expected property " + property);
                     }
                     /*
-                     * collectionMappers[collectionFieldNo] = new ForeignKeyCollectionMapper(elementType,
-                     * oneToManyProperties[collectionFieldNo], parameterBase, lookup, objectMapperLookup);
+                     * collectionMappers[collectionFieldNo] = new
+                     * ForeignKeyCollectionMapper(elementType,
+                     * oneToManyProperties[collectionFieldNo], parameterBase,
+                     * lookup, objectMapperLookup);
                      */
                 } else {
                     // TODO use other mappers where necessary
@@ -233,31 +232,43 @@ public abstract class AbstractAutoMapper
     }
 
     /*
-     * private void setupSpecifiedMapping( final ObjectSpecification specification, final IsisConfiguration
-     * configParameters, final String parameterBase) { IsisConfiguration columnMappings =
-     * IsisContext.getConfiguration().createSubset(parameterBase + "column"); int columnsSize = columnMappings.size();
-     * // columnNames = new String[columnsSize]; oneToOneProperties = new ObjectAssociation[columnsSize];
+     * private void setupSpecifiedMapping( final ObjectSpecification
+     * specification, final IsisConfiguration configParameters, final String
+     * parameterBase) { IsisConfiguration columnMappings =
+     * IsisContext.getConfiguration().createSubset(parameterBase + "column");
+     * int columnsSize = columnMappings.size(); // columnNames = new
+     * String[columnsSize]; oneToOneProperties = new
+     * ObjectAssociation[columnsSize];
      * 
-     * int i = 0; for (Enumeration names = columnMappings.propertyNames(); names.hasMoreElements(); i++) { String
-     * columnName = (String) names.nextElement(); String fieldName = columnMappings.getString(columnName);
-     * oneToOneProperties[i] = specification.getAssociation(fieldName); // columnNames[i] = columnName; }
+     * int i = 0; for (Enumeration names = columnMappings.propertyNames();
+     * names.hasMoreElements(); i++) { String columnName = (String)
+     * names.nextElement(); String fieldName =
+     * columnMappings.getString(columnName); oneToOneProperties[i] =
+     * specification.getAssociation(fieldName); // columnNames[i] = columnName;
+     * }
      * 
-     * IsisConfiguration collectionMappings = IsisContext.getConfiguration().createSubset( parameterBase +
-     * "collection"); int collectionsSize = collectionMappings.size(); collectionMappers = new
-     * AutoCollectionMapper[collectionsSize]; oneToManyProperties = new ObjectAssociation[collectionsSize];
+     * IsisConfiguration collectionMappings =
+     * IsisContext.getConfiguration().createSubset( parameterBase +
+     * "collection"); int collectionsSize = collectionMappings.size();
+     * collectionMappers = new AutoCollectionMapper[collectionsSize];
+     * oneToManyProperties = new ObjectAssociation[collectionsSize];
      * 
-     * int j = 0; for (Enumeration names = collectionMappings.propertyNames(); names.hasMoreElements(); j++) { String
-     * propertyName = (String) names.nextElement(); String collectionName = collectionMappings.getString(propertyName);
-     * String type = collectionMappings.getString(collectionName);
+     * int j = 0; for (Enumeration names = collectionMappings.propertyNames();
+     * names.hasMoreElements(); j++) { String propertyName = (String)
+     * names.nextElement(); String collectionName =
+     * collectionMappings.getString(propertyName); String type =
+     * collectionMappings.getString(collectionName);
      * 
-     * oneToManyProperties[j] = specification.getAssociation(collectionName); if (type.equals("auto")) {
-     * collectionMappers[j] = new AutoCollectionMapper(this, specification, oneToManyProperties[j], getLookup()); } else
-     * { // TODO use other mappers where necessary // new ReversedAutoAssociationMapper(specification, collectionName,
+     * oneToManyProperties[j] = specification.getAssociation(collectionName); if
+     * (type.equals("auto")) { collectionMappers[j] = new
+     * AutoCollectionMapper(this, specification, oneToManyProperties[j],
+     * getLookup()); } else { // TODO use other mappers where necessary // new
+     * ReversedAutoAssociationMapper(specification, collectionName,
      * parameterBase);
      * 
      * throw new NotYetImplementedException(); } } }
      */
-    protected String columnList(List<FieldMapping> fieldMappings) {
+    protected String columnList(final List<FieldMapping> fieldMappings) {
         final StringBuffer sql = new StringBuffer();
         for (final FieldMapping mapping : fieldMappings) {
             if (sql.length() > 0) {
@@ -294,8 +305,7 @@ public abstract class AbstractAutoMapper
 
     @Override
     public String toString() {
-        return "AbstractAutoMapper [table=" + table + ",noColumns=" + fieldMappings.size() + ",specification="
-            + specification.getFullIdentifier() + "]";
+        return "AbstractAutoMapper [table=" + table + ",noColumns=" + fieldMappings.size() + ",specification=" + specification.getFullIdentifier() + "]";
     }
 
     protected String values(final DatabaseConnector connector, final ObjectAdapter object) {

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AutoCollectionMapper.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AutoCollectionMapper.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AutoCollectionMapper.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AutoCollectionMapper.java Sun Jan 22 07:36:07 2012
@@ -22,8 +22,6 @@ package org.apache.isis.runtimes.dflt.ob
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.log4j.Logger;
-
 import org.apache.isis.core.commons.debug.DebugBuilder;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.ResolveState;
@@ -41,6 +39,7 @@ import org.apache.isis.runtimes.dflt.obj
 import org.apache.isis.runtimes.dflt.objectstores.sql.jdbc.JdbcObjectReferenceMapping;
 import org.apache.isis.runtimes.dflt.objectstores.sql.mapping.ObjectReferenceMapping;
 import org.apache.isis.runtimes.dflt.runtime.persistence.PersistorUtil;
+import org.apache.log4j.Logger;
 
 public class AutoCollectionMapper extends AbstractMapper implements CollectionMapper {
     private static final Logger LOG = Logger.getLogger(AutoCollectionMapper.class);
@@ -49,8 +48,7 @@ public class AutoCollectionMapper extend
     private final ObjectReferenceMapping elementMapping;
     private final IdMapping idMapping;
 
-    public AutoCollectionMapper(final ObjectSpecification specification, final ObjectAssociation field,
-        final FieldMappingLookup lookup) {
+    public AutoCollectionMapper(final ObjectSpecification specification, final ObjectAssociation field, final FieldMappingLookup lookup) {
         this.field = field;
 
         final ObjectSpecification spec = field.getFacet(TypeOfFacet.class).valueSpec();
@@ -82,8 +80,7 @@ public class AutoCollectionMapper extend
     }
 
     @Override
-    public void loadInternalCollection(final DatabaseConnector connector, final ObjectAdapter parent,
-        final boolean makeResolved) {
+    public void loadInternalCollection(final DatabaseConnector connector, final ObjectAdapter parent, final boolean makeResolved) {
         final ObjectAdapter collection = field.get(parent);
         if (collection.getResolveState().canChangeTo(ResolveState.RESOLVING)) {
             LOG.debug("loading internal collection " + field);

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AutoMapper.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AutoMapper.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AutoMapper.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AutoMapper.java Sun Jan 22 07:36:07 2012
@@ -23,8 +23,6 @@ import java.lang.reflect.Method;
 import java.util.List;
 import java.util.Vector;
 
-import org.apache.log4j.Logger;
-
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.core.commons.debug.DebugBuilder;
 import org.apache.isis.core.commons.debug.DebuggableWithTitle;
@@ -56,6 +54,7 @@ import org.apache.isis.runtimes.dflt.run
 import org.apache.isis.runtimes.dflt.runtime.persistence.query.PersistenceQueryFindByPattern;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.AdapterManager;
+import org.apache.log4j.Logger;
 
 public class AutoMapper extends AbstractAutoMapper implements ObjectMapping, DebuggableWithTitle {
     private static final Logger LOG = Logger.getLogger(AutoMapper.class);
@@ -65,8 +64,7 @@ public class AutoMapper extends Abstract
     private final boolean useVersioning;
     final AdapterManager adapterManager;
 
-    public AutoMapper(final String className, final String parameterBase, final FieldMappingLookup lookup,
-        final ObjectMappingLookup objectMapperLookup) {
+    public AutoMapper(final String className, final String parameterBase, final FieldMappingLookup lookup, final ObjectMappingLookup objectMapperLookup) {
         super(className, parameterBase, lookup, objectMapperLookup);
         idMapping = lookup.createIdMapping();
         versionMapping = lookup.createVersionMapping();
@@ -169,8 +167,7 @@ public class AutoMapper extends Abstract
     }
 
     @Override
-    public Vector<ObjectAdapter> getInstances(final DatabaseConnector connector, final ObjectSpecification spec,
-        final PersistenceQueryFindByPattern query) {
+    public Vector<ObjectAdapter> getInstances(final DatabaseConnector connector, final ObjectSpecification spec, final PersistenceQueryFindByPattern query) {
         final Vector<ObjectAdapter> instances = new Vector<ObjectAdapter>();
 
         final StringBuffer sql = createSelectStatement();
@@ -179,11 +176,12 @@ public class AutoMapper extends Abstract
         int foundFields = 0;
         final ObjectAdapter pattern = query.getPattern();
 
-        // for all fields in the query.getPattern, build a SQL select clause for this spec.
+        // for all fields in the query.getPattern, build a SQL select clause for
+        // this spec.
         final Object o = pattern.getObject();
         final ObjectSpecification patternSpec = pattern.getSpecification();
         final List<ObjectAssociation> patternAssociations = patternSpec.getAssociations();
-        for (ObjectAssociation patternAssoc : patternAssociations) {
+        for (final ObjectAssociation patternAssoc : patternAssociations) {
             final Method method;
             final Identifier identifier = patternAssoc.getIdentifier();
             final String memberName = identifier.getMemberName();
@@ -193,14 +191,14 @@ public class AutoMapper extends Abstract
                 if (true) {
                     final ObjectAdapter field = patternAssoc.get(pattern);
                     if (field != null) {
-                        String id = patternAssoc.getId();
+                        final String id = patternAssoc.getId();
                         try {
-                            ObjectAssociation oa = spec.getAssociation(id);
-                            NotPersistedFacet fc = oa.getFacet(NotPersistedFacet.class);
+                            final ObjectAssociation oa = spec.getAssociation(id);
+                            final NotPersistedFacet fc = oa.getFacet(NotPersistedFacet.class);
                             if (fc != null) {
                                 continue;
                             }
-                        } catch (ObjectSpecificationException e) {
+                        } catch (final ObjectSpecificationException e) {
                             // this is OK
                         }
 
@@ -217,14 +215,16 @@ public class AutoMapper extends Abstract
                         if (fieldMapping != null) {
                             fieldMapping.appendWhereClause(connector, sql, pattern);
                         } else {
-                            // Have to use getXXX method if the fieldMapping is null..
+                            // Have to use getXXX method if the fieldMapping is
+                            // null..
                             final ObjectSpecification specification = patternAssoc.getSpecification();
 
                             method = o.getClass().getMethod("get" + methodName, (Class<?>[]) null);
                             final Object res = InvokeUtils.invoke(method, o);
 
                             if (specification.isValue()) {
-                                // If the property (memberName) is a value type, use the value.
+                                // If the property (memberName) is a value type,
+                                // use the value.
                                 final String fieldName = Sql.sqlFieldName(identifier.getMemberName());
                                 sql.append(fieldName + "=?");
                                 connector.addToQueryValues(res);
@@ -235,9 +235,9 @@ public class AutoMapper extends Abstract
                         foundFields++;
                     }
                 }
-            } catch (SecurityException e) {
+            } catch (final SecurityException e) {
                 LOG.debug(e.getMessage());
-            } catch (NoSuchMethodException e) {
+            } catch (final NoSuchMethodException e) {
                 LOG.info("Unable to invode method: get" + methodName + " in getInstances");
                 LOG.debug(e.getMessage());
             }
@@ -249,8 +249,7 @@ public class AutoMapper extends Abstract
     }
 
     @Override
-    public Vector<ObjectAdapter> getInstances(final DatabaseConnector connector, final ObjectSpecification spec,
-        final String title) {
+    public Vector<ObjectAdapter> getInstances(final DatabaseConnector connector, final ObjectSpecification spec, final String title) {
         final Vector<ObjectAdapter> instances = new Vector<ObjectAdapter>();
 
         final StringBuffer sql = createSelectStatement();
@@ -294,7 +293,8 @@ public class AutoMapper extends Abstract
         sql.append(" from " + table);
         return sql;
     } /*
-       * if (whereClause != null) { sql.append(" WHERE "); sql.append(whereClause); } else if (whereClause != null) {
+       * if (whereClause != null) { sql.append(" WHERE ");
+       * sql.append(whereClause); } else if (whereClause != null) {
        * sql.append(" WHERE "); idMapping.appendWhereClause(sql, oid); }
        */
 
@@ -310,8 +310,8 @@ public class AutoMapper extends Abstract
             mapping.initializeField(object, rs);
         }
         /*
-         * for (int i = 0; i < oneToManyProperties.length; i++) { /* Need to set up collection to be a ghost before we
-         * access as below
+         * for (int i = 0; i < oneToManyProperties.length; i++) { /* Need to set
+         * up collection to be a ghost before we access as below
          */
         // CollectionAdapter collection = (CollectionAdapter)
         /*
@@ -329,8 +329,7 @@ public class AutoMapper extends Abstract
         }
     }
 
-    private void loadInstancesToVector(final DatabaseConnector connector, final ObjectSpecification cls,
-        final String selectStatment, Vector<ObjectAdapter> instances) {
+    private void loadInstancesToVector(final DatabaseConnector connector, final ObjectSpecification cls, final String selectStatment, final Vector<ObjectAdapter> instances) {
         LOG.debug("loading instances from SQL " + table);
 
         try {
@@ -342,8 +341,9 @@ public class AutoMapper extends Abstract
                 instances.addElement(instance);
             }
             rs.close();
-        } catch (SqlObjectStoreException e) {
-            // Invalid SELECT means no object found.. don't worry about it, here.
+        } catch (final SqlObjectStoreException e) {
+            // Invalid SELECT means no object found.. don't worry about it,
+            // here.
         }
     }
 
@@ -379,14 +379,12 @@ public class AutoMapper extends Abstract
             }
         } else {
             rs.close();
-            throw new SqlObjectStoreException("Unable to load data from " + table + " with id "
-                + idMapping.primaryKey(object.getOid()));
+            throw new SqlObjectStoreException("Unable to load data from " + table + " with id " + idMapping.primaryKey(object.getOid()));
         }
     }
 
     @Override
-    public void resolveCollection(final DatabaseConnector connector, final ObjectAdapter object,
-        final ObjectAssociation field) {
+    public void resolveCollection(final DatabaseConnector connector, final ObjectAdapter object, final ObjectAssociation field) {
         if (collectionMappers.length > 0) {
             final DatabaseConnector secondConnector = connector.getConnectionPool().acquire();
             for (final CollectionMapper collectionMapper : collectionMappers) {
@@ -445,11 +443,11 @@ public class AutoMapper extends Abstract
     }
 
     @Override
-    public boolean saveCollection(DatabaseConnector connection, ObjectAdapter parent, String fieldName) {
+    public boolean saveCollection(final DatabaseConnector connection, final ObjectAdapter parent, final String fieldName) {
         int i = 0;
-        for (String collectionFieldName : collectionMapperFields) {
+        for (final String collectionFieldName : collectionMapperFields) {
             if (collectionFieldName.equals(fieldName)) {
-                CollectionMapper fieldMapper = collectionMappers[i];
+                final CollectionMapper fieldMapper = collectionMappers[i];
                 fieldMapper.saveInternalCollection(connection, parent);
                 return true;
             }
@@ -460,8 +458,7 @@ public class AutoMapper extends Abstract
 
     @Override
     public String toString() {
-        return "AutoMapper [table=" + table + ",id=" + idMapping + ",noColumns=" + fieldMappings.size()
-            + ",specification=" + specification.getFullIdentifier() + "]";
+        return "AutoMapper [table=" + table + ",id=" + idMapping + ",noColumns=" + fieldMappings.size() + ",specification=" + specification.getFullIdentifier() + "]";
     }
 
     @Override

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AutoMapperFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AutoMapperFactory.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AutoMapperFactory.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AutoMapperFactory.java Sun Jan 22 07:36:07 2012
@@ -26,8 +26,7 @@ import org.apache.isis.runtimes.dflt.obj
 
 public class AutoMapperFactory implements ObjectMappingFactory {
     @Override
-    public ObjectMapping createMapper(final String className, final String propertiesBase,
-        final FieldMappingLookup lookup, final ObjectMappingLookup objectMapperLookup) {
+    public ObjectMapping createMapper(final String className, final String propertiesBase, final FieldMappingLookup lookup, final ObjectMappingLookup objectMapperLookup) {
         return new AutoMapper(className, propertiesBase, lookup, objectMapperLookup);
     }
 }



Mime
View raw message