incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1300397 - in /incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql: AbstractMapper.java ObjectMappingLookup.java jdbc/JdbcConnector.java
Date Tue, 13 Mar 2012 23:01:27 GMT
Author: danhaywood
Date: Tue Mar 13 23:01:27 2012
New Revision: 1300397

URL: http://svn.apache.org/viewvc?rev=1300397&view=rev
Log:
ISIS-188: sql obj store code tidy up (no functional change)

Modified:
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/AbstractMapper.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/ObjectMappingLookup.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/jdbc/JdbcConnector.java

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/AbstractMapper.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/AbstractMapper.java?rev=1300397&r1=1300396&r2=1300397&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/AbstractMapper.java
(original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/AbstractMapper.java
Tue Mar 13 23:01:27 2012
@@ -28,7 +28,7 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.runtimes.dflt.objectstores.sql.SqlOid.State;
 
 public abstract class AbstractMapper {
-    private FieldMappingLookup objectMapperLookup;
+    private FieldMappingLookup fieldMappingLookup;
     private final Hashtable<String, PrimaryKeyMapper> keyMapping = new Hashtable<String,
PrimaryKeyMapper>();
 
     public abstract void createTables(final DatabaseConnector connector);
@@ -40,15 +40,15 @@ public abstract class AbstractMapper {
     public final void shutdown() {
     }
 
-    public void startup(final DatabaseConnector connector, final FieldMappingLookup objectMapperLookup)
{
-        this.objectMapperLookup = objectMapperLookup;
+    public void startup(final DatabaseConnector connector, final FieldMappingLookup fieldMappingLookup)
{
+        this.fieldMappingLookup = fieldMappingLookup;
         if (needsTables(connector)) {
             createTables(connector);
         }
     }
 
     protected FieldMappingLookup getFieldMappingLookup() {
-        return objectMapperLookup;
+        return fieldMappingLookup;
     }
 
     // TODO remove

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=1300397&r1=1300396&r2=1300397&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
Tue Mar 13 23:01:27 2012
@@ -43,10 +43,11 @@ public class ObjectMappingLookup impleme
     private FieldMappingLookup fieldMappingLookup;
 
     public ObjectMapping getMapping(final ObjectSpecification spec, final DatabaseConnector
connection) {
+    	String fullName = spec.getFullIdentifier();
         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(fullName, 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/jdbc/JdbcConnector.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/jdbc/JdbcConnector.java?rev=1300397&r1=1300396&r2=1300397&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/jdbc/JdbcConnector.java
(original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/jdbc/JdbcConnector.java
Tue Mar 13 23:01:27 2012
@@ -236,7 +236,7 @@ public class JdbcConnector extends Abstr
                             // "undone"
                             final LocalDate localDate = (LocalDate) value;
                             final int millisOffset = -DateTimeZone.getDefault().getOffset(null);
-                            final Date javaDate = localDate.toDateTimeAtStartOfDay(DateTimeZone.forOffsetMillis(millisOffset)).toDate();
+                            final java.util.Date javaDate = localDate.toDateTimeAtStartOfDay(DateTimeZone.forOffsetMillis(millisOffset)).toDate();
 
                             statement.setObject(i, javaDate, java.sql.Types.DATE);
                         }



Mime
View raw message