cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1576774 [2/2] - in /cayenne/main/trunk/cayenne-server/src: main/java/org/apache/cayenne/access/ main/java/org/apache/cayenne/access/jdbc/ main/java/org/apache/cayenne/configuration/server/ main/java/org/apache/cayenne/dba/ main/java/org/ap...
Date Wed, 12 Mar 2014 15:13:18 GMT
Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleSQLTemplateAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleSQLTemplateAction.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleSQLTemplateAction.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleSQLTemplateAction.java Wed Mar 12 15:13:16 2014
@@ -44,6 +44,7 @@ import java.util.Map;
 
 import org.apache.cayenne.access.OperationObserver;
 import org.apache.cayenne.access.jdbc.RowDescriptorBuilder;
+import org.apache.cayenne.access.jdbc.RowReaderFactory;
 import org.apache.cayenne.access.jdbc.SQLStatement;
 import org.apache.cayenne.access.jdbc.SQLTemplateAction;
 import org.apache.cayenne.dba.JdbcAdapter;
@@ -58,48 +59,35 @@ class OracleSQLTemplateAction extends SQ
 
     protected DbEntity dbEntity;
 
-    OracleSQLTemplateAction(SQLTemplate query, JdbcAdapter adapter,
-            EntityResolver entityResolver) {
-        super(query, adapter, entityResolver);
+    OracleSQLTemplateAction(SQLTemplate query, JdbcAdapter adapter, EntityResolver entityResolver,
+            RowReaderFactory rowReaderFactory) {
+        super(query, adapter, entityResolver, rowReaderFactory);
         this.dbEntity = query.getMetaData(entityResolver).getDbEntity();
     }
 
     @Override
-    protected void processSelectResult(
-            SQLStatement compiled,
-            Connection connection,
-            Statement statement,
-            ResultSet resultSet,
-            OperationObserver callback,
-            long startTime) throws Exception {
+    protected void processSelectResult(SQLStatement compiled, Connection connection, Statement statement,
+            ResultSet resultSet, OperationObserver callback, long startTime) throws Exception {
 
-        // wrap ResultSet to distinguish between Integer and BigDecimal for Oracle NUMBER
+        // wrap ResultSet to distinguish between Integer and BigDecimal for
+        // Oracle NUMBER
         // columns...
 
         if (compiled.getResultColumns().length == 0) {
             resultSet = new OracleResultSetWrapper(resultSet);
         }
 
-        super.processSelectResult(
-                compiled,
-                connection,
-                statement,
-                resultSet,
-                callback,
-                startTime);
+        super.processSelectResult(compiled, connection, statement, resultSet, callback, startTime);
     }
 
     /**
      * @since 3.0
      */
     @Override
-    protected RowDescriptorBuilder configureRowDescriptorBuilder(
-            SQLStatement compiled,
-            ResultSet resultSet) throws SQLException {
-
-        RowDescriptorBuilder builder = super.configureRowDescriptorBuilder(
-                compiled,
-                resultSet);
+    protected RowDescriptorBuilder configureRowDescriptorBuilder(SQLStatement compiled, ResultSet resultSet)
+            throws SQLException {
+
+        RowDescriptorBuilder builder = super.configureRowDescriptorBuilder(compiled, resultSet);
 
         return builder;
     }
@@ -312,8 +300,7 @@ class OracleSQLTemplateAction extends SQ
             return delegate.getLong(columnName);
         }
 
-        public Object getObject(int columnIndex, Map<String, Class<?>> map)
-                throws SQLException {
+        public Object getObject(int columnIndex, Map<String, Class<?>> map) throws SQLException {
             return delegate.getObject(columnIndex, map);
         }
 
@@ -321,8 +308,7 @@ class OracleSQLTemplateAction extends SQ
             return delegate.getObject(columnIndex);
         }
 
-        public Object getObject(String columnLabel, Map<String, Class<?>> map)
-                throws SQLException {
+        public Object getObject(String columnLabel, Map<String, Class<?>> map) throws SQLException {
             return delegate.getObject(columnLabel, map);
         }
 
@@ -386,8 +372,7 @@ class OracleSQLTemplateAction extends SQ
             return delegate.getTimestamp(columnIndex);
         }
 
-        public Timestamp getTimestamp(String columnName, Calendar cal)
-                throws SQLException {
+        public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException {
             return delegate.getTimestamp(columnName, cal);
         }
 
@@ -503,13 +488,11 @@ class OracleSQLTemplateAction extends SQ
             delegate.updateArray(columnName, x);
         }
 
-        public void updateAsciiStream(int columnIndex, InputStream x, int length)
-                throws SQLException {
+        public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException {
             delegate.updateAsciiStream(columnIndex, x, length);
         }
 
-        public void updateAsciiStream(String columnName, InputStream x, int length)
-                throws SQLException {
+        public void updateAsciiStream(String columnName, InputStream x, int length) throws SQLException {
             delegate.updateAsciiStream(columnName, x, length);
         }
 
@@ -521,13 +504,11 @@ class OracleSQLTemplateAction extends SQ
             delegate.updateBigDecimal(columnName, x);
         }
 
-        public void updateBinaryStream(int columnIndex, InputStream x, int length)
-                throws SQLException {
+        public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException {
             delegate.updateBinaryStream(columnIndex, x, length);
         }
 
-        public void updateBinaryStream(String columnName, InputStream x, int length)
-                throws SQLException {
+        public void updateBinaryStream(String columnName, InputStream x, int length) throws SQLException {
             delegate.updateBinaryStream(columnName, x, length);
         }
 
@@ -563,13 +544,11 @@ class OracleSQLTemplateAction extends SQ
             delegate.updateBytes(columnName, x);
         }
 
-        public void updateCharacterStream(int columnIndex, Reader x, int length)
-                throws SQLException {
+        public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException {
             delegate.updateCharacterStream(columnIndex, x, length);
         }
 
-        public void updateCharacterStream(String columnName, Reader reader, int length)
-                throws SQLException {
+        public void updateCharacterStream(String columnName, Reader reader, int length) throws SQLException {
             delegate.updateCharacterStream(columnName, reader, length);
         }
 
@@ -629,8 +608,7 @@ class OracleSQLTemplateAction extends SQ
             delegate.updateNull(columnName);
         }
 
-        public void updateObject(int columnIndex, Object x, int scale)
-                throws SQLException {
+        public void updateObject(int columnIndex, Object x, int scale) throws SQLException {
             delegate.updateObject(columnIndex, x, scale);
         }
 
@@ -638,8 +616,7 @@ class OracleSQLTemplateAction extends SQ
             delegate.updateObject(columnIndex, x);
         }
 
-        public void updateObject(String columnName, Object x, int scale)
-                throws SQLException {
+        public void updateObject(String columnName, Object x, int scale) throws SQLException {
             delegate.updateObject(columnName, x, scale);
         }
 
@@ -763,8 +740,7 @@ class OracleSQLTemplateAction extends SQ
          * @since 3.0
          */
         // JDBC 4 compatibility under Java 1.5
-        public void updateAsciiStream(int arg0, InputStream arg1, long arg2)
-                throws SQLException {
+        public void updateAsciiStream(int arg0, InputStream arg1, long arg2) throws SQLException {
             throw new UnsupportedOperationException();
         }
 
@@ -772,8 +748,7 @@ class OracleSQLTemplateAction extends SQ
          * @since 3.0
          */
         // JDBC 4 compatibility under Java 1.5
-        public void updateAsciiStream(String arg0, InputStream arg1, long arg2)
-                throws SQLException {
+        public void updateAsciiStream(String arg0, InputStream arg1, long arg2) throws SQLException {
             throw new UnsupportedOperationException();
         }
 
@@ -797,8 +772,7 @@ class OracleSQLTemplateAction extends SQ
          * @since 3.0
          */
         // JDBC 4 compatibility under Java 1.5
-        public void updateBinaryStream(int arg0, InputStream arg1, long arg2)
-                throws SQLException {
+        public void updateBinaryStream(int arg0, InputStream arg1, long arg2) throws SQLException {
             throw new UnsupportedOperationException();
         }
 
@@ -806,8 +780,7 @@ class OracleSQLTemplateAction extends SQ
          * @since 3.0
          */
         // JDBC 4 compatibility under Java 1.5
-        public void updateBinaryStream(String arg0, InputStream arg1, long arg2)
-                throws SQLException {
+        public void updateBinaryStream(String arg0, InputStream arg1, long arg2) throws SQLException {
             throw new UnsupportedOperationException();
         }
 
@@ -839,8 +812,7 @@ class OracleSQLTemplateAction extends SQ
          * @since 3.0
          */
         // JDBC 4 compatibility under Java 1.5
-        public void updateBlob(String arg0, InputStream arg1, long arg2)
-                throws SQLException {
+        public void updateBlob(String arg0, InputStream arg1, long arg2) throws SQLException {
             throw new UnsupportedOperationException();
         }
 
@@ -864,8 +836,7 @@ class OracleSQLTemplateAction extends SQ
          * @since 3.0
          */
         // JDBC 4 compatibility under Java 1.5
-        public void updateCharacterStream(int arg0, Reader arg1, long arg2)
-                throws SQLException {
+        public void updateCharacterStream(int arg0, Reader arg1, long arg2) throws SQLException {
             throw new UnsupportedOperationException();
         }
 
@@ -873,8 +844,7 @@ class OracleSQLTemplateAction extends SQ
          * @since 3.0
          */
         // JDBC 4 compatibility under Java 1.5
-        public void updateCharacterStream(String arg0, Reader arg1, long arg2)
-                throws SQLException {
+        public void updateCharacterStream(String arg0, Reader arg1, long arg2) throws SQLException {
             throw new UnsupportedOperationException();
         }
 
@@ -930,8 +900,7 @@ class OracleSQLTemplateAction extends SQ
          * @since 3.0
          */
         // JDBC 4 compatibility under Java 1.5
-        public void updateNCharacterStream(int arg0, Reader arg1, long arg2)
-                throws SQLException {
+        public void updateNCharacterStream(int arg0, Reader arg1, long arg2) throws SQLException {
             throw new UnsupportedOperationException();
         }
 
@@ -939,8 +908,7 @@ class OracleSQLTemplateAction extends SQ
          * @since 3.0
          */
         // JDBC 4 compatibility under Java 1.5
-        public void updateNCharacterStream(String arg0, Reader arg1, long arg2)
-                throws SQLException {
+        public void updateNCharacterStream(String arg0, Reader arg1, long arg2) throws SQLException {
             throw new UnsupportedOperationException();
         }
 
@@ -1100,8 +1068,7 @@ class OracleSQLTemplateAction extends SQ
          * @since 3.0
          */
         // JDBC 4 compatibility under Java 1.5
-        public void updateSQLXML(String columnLabel, SQLXML xmlObject)
-                throws SQLException {
+        public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException {
             throw new UnsupportedOperationException();
         }
 
@@ -1135,8 +1102,7 @@ class OracleSQLTemplateAction extends SQ
         public String getColumnClassName(int column) throws SQLException {
             String className = delegate.getColumnClassName(column);
 
-            if (BigDecimal.class.getName().equals(className)
-                    && getColumnType(column) == Types.INTEGER) {
+            if (BigDecimal.class.getName().equals(className) && getColumnType(column) == Types.INTEGER) {
                 className = Integer.class.getName();
             }
 
@@ -1165,8 +1131,7 @@ class OracleSQLTemplateAction extends SQ
             // this only detects INTEGER but not BIGINT...
             if (type == Types.NUMERIC) {
                 int precision = delegate.getPrecision(column);
-                if ((precision == 10 || precision == 38)
-                        && delegate.getScale(column) == 0) {
+                if ((precision == 10 || precision == 38) && delegate.getScale(column) == 0) {
                     type = Types.INTEGER;
                 }
             }

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleSelectAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleSelectAction.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleSelectAction.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleSelectAction.java Wed Mar 12 15:13:16 2014
@@ -21,6 +21,7 @@ package org.apache.cayenne.dba.oracle;
 
 import java.sql.Connection;
 
+import org.apache.cayenne.access.jdbc.RowReaderFactory;
 import org.apache.cayenne.access.jdbc.SelectAction;
 import org.apache.cayenne.access.trans.SelectTranslator;
 import org.apache.cayenne.dba.JdbcAdapter;
@@ -32,9 +33,9 @@ import org.apache.cayenne.query.SelectQu
  */
 class OracleSelectAction extends SelectAction {
 
-    public <T> OracleSelectAction(SelectQuery<T> query, JdbcAdapter adapter,
-            EntityResolver entityResolver) {
-        super(query, adapter, entityResolver);
+    public <T> OracleSelectAction(SelectQuery<T> query, JdbcAdapter adapter, EntityResolver entityResolver,
+            RowReaderFactory rowReaderFactory) {
+        super(query, adapter, entityResolver, rowReaderFactory);
     }
 
     @Override

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresActionBuilder.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresActionBuilder.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresActionBuilder.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresActionBuilder.java Wed Mar 12 15:13:16 2014
@@ -19,6 +19,7 @@
 
 package org.apache.cayenne.dba.postgres;
 
+import org.apache.cayenne.access.jdbc.RowReaderFactory;
 import org.apache.cayenne.dba.JdbcActionBuilder;
 import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.map.EntityResolver;
@@ -31,17 +32,17 @@ import org.apache.cayenne.query.SelectQu
  */
 class PostgresActionBuilder extends JdbcActionBuilder {
 
-    public PostgresActionBuilder(JdbcAdapter adapter, EntityResolver resolver) {
-        super(adapter, resolver);
+    public PostgresActionBuilder(JdbcAdapter adapter, EntityResolver resolver, RowReaderFactory rowReaderFactory) {
+        super(adapter, resolver, rowReaderFactory);
     }
 
     @Override
     public SQLAction procedureAction(ProcedureQuery query) {
-        return new PostgresProcedureAction(query, getAdapter(), getEntityResolver());
+        return new PostgresProcedureAction(query, getAdapter(), getEntityResolver(), rowReaderFactory);
     }
 
     @Override
     public <T> SQLAction objectSelectAction(SelectQuery<T> query) {
-        return new PostgresSelectAction(query, adapter, entityResolver);
+        return new PostgresSelectAction(query, adapter, entityResolver, rowReaderFactory);
     }
 }

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java Wed Mar 12 15:13:16 2014
@@ -77,7 +77,7 @@ public class PostgresAdapter extends Jdb
      */
     @Override
     public SQLAction getAction(Query query, DataNode node) {
-        return query.createSQLAction(new PostgresActionBuilder(this, node.getEntityResolver()));
+        return query.createSQLAction(new PostgresActionBuilder(this, node.getEntityResolver(), node.getRowReaderFactory()));
     }
 
     /**

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresProcedureAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresProcedureAction.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresProcedureAction.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresProcedureAction.java Wed Mar 12 15:13:16 2014
@@ -21,6 +21,7 @@ package org.apache.cayenne.dba.postgres;
 
 import java.sql.Connection;
 
+import org.apache.cayenne.access.jdbc.RowReaderFactory;
 import org.apache.cayenne.access.trans.ProcedureTranslator;
 import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.dba.sqlserver.SQLServerProcedureAction;
@@ -37,9 +38,9 @@ import org.apache.cayenne.query.Procedur
  */
 class PostgresProcedureAction extends SQLServerProcedureAction {
 
-    PostgresProcedureAction(ProcedureQuery query, JdbcAdapter adapter,
-            EntityResolver entityResolver) {
-        super(query, adapter, entityResolver);
+    PostgresProcedureAction(ProcedureQuery query, JdbcAdapter adapter, EntityResolver entityResolver,
+            RowReaderFactory rowReaderFactory) {
+        super(query, adapter, entityResolver, rowReaderFactory);
     }
 
     /**

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresSelectAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresSelectAction.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresSelectAction.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresSelectAction.java Wed Mar 12 15:13:16 2014
@@ -20,6 +20,7 @@ package org.apache.cayenne.dba.postgres;
 
 import java.sql.Connection;
 
+import org.apache.cayenne.access.jdbc.RowReaderFactory;
 import org.apache.cayenne.access.jdbc.SelectAction;
 import org.apache.cayenne.access.trans.SelectTranslator;
 import org.apache.cayenne.dba.JdbcAdapter;
@@ -31,9 +32,9 @@ import org.apache.cayenne.query.SelectQu
  */
 class PostgresSelectAction extends SelectAction {
 
-    <T> PostgresSelectAction(SelectQuery<T> query, JdbcAdapter adapter,
-            EntityResolver entityResolver) {
-        super(query, adapter, entityResolver);
+    <T> PostgresSelectAction(SelectQuery<T> query, JdbcAdapter adapter, EntityResolver entityResolver,
+            RowReaderFactory rowReaderFactory) {
+        super(query, adapter, entityResolver, rowReaderFactory);
     }
 
     @Override

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteActionBuilder.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteActionBuilder.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteActionBuilder.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteActionBuilder.java Wed Mar 12 15:13:16 2014
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.cayenne.dba.sqlite;
 
+import org.apache.cayenne.access.jdbc.RowReaderFactory;
 import org.apache.cayenne.dba.JdbcActionBuilder;
 import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.map.EntityResolver;
@@ -29,12 +30,12 @@ import org.apache.cayenne.query.SQLTempl
  */
 class SQLiteActionBuilder extends JdbcActionBuilder {
 
-    SQLiteActionBuilder(JdbcAdapter adapter, EntityResolver resolver) {
-        super(adapter, resolver);
+    SQLiteActionBuilder(JdbcAdapter adapter, EntityResolver resolver, RowReaderFactory rowReaderFactory) {
+        super(adapter, resolver, rowReaderFactory);
     }
 
     @Override
     public SQLAction sqlAction(SQLTemplate query) {
-        return new SQLiteSQLTemplateAction(query, adapter, getEntityResolver());
+        return new SQLiteSQLTemplateAction(query, adapter, getEntityResolver(), rowReaderFactory);
     }
 }

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteAdapter.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteAdapter.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteAdapter.java Wed Mar 12 15:13:16 2014
@@ -95,8 +95,8 @@ public class SQLiteAdapter extends JdbcA
 
     @Override
     public SQLAction getAction(Query query, DataNode node) {
-        return query.createSQLAction(new SQLiteActionBuilder(this, node
-                .getEntityResolver()));
+        return query
+                .createSQLAction(new SQLiteActionBuilder(this, node.getEntityResolver(), node.getRowReaderFactory()));
     }
 
     /**

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteSQLTemplateAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteSQLTemplateAction.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteSQLTemplateAction.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteSQLTemplateAction.java Wed Mar 12 15:13:16 2014
@@ -25,6 +25,7 @@ import java.sql.SQLException;
 import java.util.Collection;
 
 import org.apache.cayenne.access.OperationObserver;
+import org.apache.cayenne.access.jdbc.RowReaderFactory;
 import org.apache.cayenne.access.jdbc.SQLStatement;
 import org.apache.cayenne.access.jdbc.SQLTemplateAction;
 import org.apache.cayenne.dba.JdbcAdapter;
@@ -36,9 +37,9 @@ import org.apache.cayenne.query.SQLTempl
  */
 class SQLiteSQLTemplateAction extends SQLTemplateAction {
 
-    public SQLiteSQLTemplateAction(SQLTemplate query, JdbcAdapter adapter,
-            EntityResolver resolver) {
-        super(query, adapter, resolver);
+    public SQLiteSQLTemplateAction(SQLTemplate query, JdbcAdapter adapter, EntityResolver resolver,
+            RowReaderFactory rowReaderFactory) {
+        super(query, adapter, resolver, rowReaderFactory);
     }
 
     /**

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerActionBuilder.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerActionBuilder.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerActionBuilder.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerActionBuilder.java Wed Mar 12 15:13:16 2014
@@ -20,6 +20,7 @@
 package org.apache.cayenne.dba.sqlserver;
 
 import org.apache.cayenne.access.jdbc.BatchAction;
+import org.apache.cayenne.access.jdbc.RowReaderFactory;
 import org.apache.cayenne.dba.JdbcActionBuilder;
 import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.map.EntityResolver;
@@ -34,8 +35,11 @@ import org.apache.cayenne.query.SQLActio
  */
 public class SQLServerActionBuilder extends JdbcActionBuilder {
 
-    public SQLServerActionBuilder(JdbcAdapter adapter, EntityResolver resolver) {
-        super(adapter, resolver);
+    /**
+     * @since 3.2
+     */
+    public SQLServerActionBuilder(JdbcAdapter adapter, EntityResolver resolver, RowReaderFactory rowReaderFactory) {
+        super(adapter, resolver, rowReaderFactory);
     }
     
     @Override
@@ -46,18 +50,18 @@ public class SQLServerActionBuilder exte
         boolean useOptimisticLock = query.isUsingOptimisticLocking();
 
         boolean runningAsBatch = !useOptimisticLock && adapter.supportsBatchUpdates();
-        BatchAction action = new SQLServerBatchAction(query, adapter, entityResolver);
+        BatchAction action = new SQLServerBatchAction(query, adapter, entityResolver, rowReaderFactory);
         action.setBatch(runningAsBatch);
         return action;
     }
 
     @Override
     public <T> SQLAction objectSelectAction(SelectQuery<T> query) {
-        return new SQLServerSelectAction(query, adapter, entityResolver);
+        return new SQLServerSelectAction(query, adapter, entityResolver, rowReaderFactory);
     }    
     
     @Override
     public SQLAction procedureAction(ProcedureQuery query) {
-        return new SQLServerProcedureAction(query, getAdapter(), getEntityResolver());
+        return new SQLServerProcedureAction(query, getAdapter(), getEntityResolver(), rowReaderFactory);
     }
 }

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapter.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapter.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapter.java Wed Mar 12 15:13:16 2014
@@ -99,8 +99,8 @@ public class SQLServerAdapter extends Sy
      */
     @Override
     public SQLAction getAction(Query query, DataNode node) {
-        return query.createSQLAction(new SQLServerActionBuilder(this, node
-                .getEntityResolver()));
+        return query.createSQLAction(new SQLServerActionBuilder(this, node.getEntityResolver(), node
+                .getRowReaderFactory()));
     }
 
     /**

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerBatchAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerBatchAction.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerBatchAction.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerBatchAction.java Wed Mar 12 15:13:16 2014
@@ -26,6 +26,7 @@ import java.util.Collections;
 
 import org.apache.cayenne.access.OperationObserver;
 import org.apache.cayenne.access.jdbc.BatchAction;
+import org.apache.cayenne.access.jdbc.RowReaderFactory;
 import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.map.EntityResolver;
@@ -37,9 +38,9 @@ import org.apache.cayenne.query.InsertBa
  */
 public class SQLServerBatchAction extends BatchAction {
 
-    public SQLServerBatchAction(BatchQuery batchQuery, JdbcAdapter adapter,
-            EntityResolver entityResolver) {
-        super(batchQuery, adapter, entityResolver);
+    public SQLServerBatchAction(BatchQuery batchQuery, JdbcAdapter adapter, EntityResolver entityResolver,
+            RowReaderFactory rowReaderFactory) {
+        super(batchQuery, adapter, entityResolver, rowReaderFactory);
     }
 
     @Override

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerProcedureAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerProcedureAction.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerProcedureAction.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerProcedureAction.java Wed Mar 12 15:13:16 2014
@@ -30,6 +30,7 @@ import org.apache.cayenne.ResultIterator
 import org.apache.cayenne.access.OperationObserver;
 import org.apache.cayenne.access.jdbc.ProcedureAction;
 import org.apache.cayenne.access.jdbc.RowDescriptor;
+import org.apache.cayenne.access.jdbc.RowReaderFactory;
 import org.apache.cayenne.access.trans.ProcedureTranslator;
 import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.map.EntityResolver;
@@ -48,9 +49,12 @@ import org.apache.cayenne.query.Query;
  */
 public class SQLServerProcedureAction extends ProcedureAction {
 
-    public SQLServerProcedureAction(ProcedureQuery query, JdbcAdapter adapter,
-            EntityResolver entityResolver) {
-        super(query, adapter, entityResolver);
+    /**
+     * @since 3.2
+     */
+    public SQLServerProcedureAction(ProcedureQuery query, JdbcAdapter adapter, EntityResolver entityResolver,
+            RowReaderFactory rowReaderFactory) {
+        super(query, adapter, entityResolver, rowReaderFactory);
     }
 
     @Override
@@ -147,10 +151,12 @@ public class SQLServerProcedureAction ex
             }
         }
 
+        @Override
         public void nextBatchCount(Query query, int[] resultCount) {
             observer.nextBatchCount(query, resultCount);
         }
 
+        @Override
         public void nextCount(Query query, int resultCount) {
             // does not delegate to wrapped observer
             // but instead caches results locally.
@@ -161,6 +167,7 @@ public class SQLServerProcedureAction ex
             counts.add(Integer.valueOf(resultCount));
         }
 
+        @Override
         public void nextRows(Query query, List<?> dataRows) {
             // does not delegate to wrapped observer
             // but instead caches results locally.
@@ -171,22 +178,27 @@ public class SQLServerProcedureAction ex
             results.add(dataRows);
         }
 
+        @Override
         public void nextRows(Query q, ResultIterator it) {
             observer.nextRows(q, it);
         }
 
+        @Override
         public void nextGlobalException(Exception ex) {
             observer.nextGlobalException(ex);
         }
 
+        @Override
         public void nextGeneratedRows(Query query, ResultIterator keysIterator) {
             observer.nextGeneratedRows(query, keysIterator);
         }
 
+        @Override
         public void nextQueryException(Query query, Exception ex) {
             observer.nextQueryException(query, ex);
         }
 
+        @Override
         public boolean isIteratedResult() {
             return observer.isIteratedResult();
         }

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerSelectAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerSelectAction.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerSelectAction.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerSelectAction.java Wed Mar 12 15:13:16 2014
@@ -20,6 +20,7 @@ package org.apache.cayenne.dba.sqlserver
 
 import java.sql.Connection;
 
+import org.apache.cayenne.access.jdbc.RowReaderFactory;
 import org.apache.cayenne.access.jdbc.SelectAction;
 import org.apache.cayenne.access.trans.SelectTranslator;
 import org.apache.cayenne.dba.JdbcAdapter;
@@ -28,9 +29,9 @@ import org.apache.cayenne.query.SelectQu
 
 public class SQLServerSelectAction extends SelectAction {
 
-    public <T> SQLServerSelectAction(SelectQuery<T> query, JdbcAdapter adapter,
-            EntityResolver entityResolver) {
-        super(query, adapter, entityResolver);
+    public <T> SQLServerSelectAction(SelectQuery<T> query, JdbcAdapter adapter, EntityResolver entityResolver,
+            RowReaderFactory rowReaderFactory) {
+        super(query, adapter, entityResolver, rowReaderFactory);
     }
 
     @Override

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/SchemaUpdateStrategyTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/SchemaUpdateStrategyTest.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/SchemaUpdateStrategyTest.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/SchemaUpdateStrategyTest.java Wed Mar 12 15:13:16 2014
@@ -269,6 +269,7 @@ public class SchemaUpdateStrategyTest ex
         dataNode.setDataSource(dataSourceFactory.getSharedDataSource());
         dataNode.setDataSourceFactory(node.getDataSourceFactory());
         dataNode.setSchemaUpdateStrategyName(node.getSchemaUpdateStrategyName());
+        dataNode.setRowReaderFactory(node.getRowReaderFactory());
         dataNode.setEntityResolver(new EntityResolver(colection));
         return dataNode;
     }

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionLockingTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionLockingTest.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionLockingTest.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionLockingTest.java Wed Mar 12 15:13:16 2014
@@ -19,6 +19,8 @@
 
 package org.apache.cayenne.access.jdbc;
 
+import static org.mockito.Mockito.mock;
+
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
@@ -88,7 +90,7 @@ public class BatchActionLockingTest exte
 
         boolean generatesKeys = false;
 
-        BatchAction action = new BatchAction(batchQuery, adapter, resolver);
+        BatchAction action = new BatchAction(batchQuery, adapter, resolver, mock(RowReaderFactory.class));
         action.runAsIndividualQueries(mockConnection, batchQueryBuilder, new MockOperationObserver(), generatesKeys);
         assertEquals(0, mockConnection.getNumberCommits());
         assertEquals(0, mockConnection.getNumberRollbacks());
@@ -124,7 +126,7 @@ public class BatchActionLockingTest exte
         preparedStatementResultSetHandler.prepareUpdateCount("DELETE", 0);
 
         boolean generatesKeys = false;
-        BatchAction action = new BatchAction(batchQuery, adapter, resolver);
+        BatchAction action = new BatchAction(batchQuery, adapter, resolver, mock(RowReaderFactory.class));
         try {
             action.runAsIndividualQueries(mockConnection, batchQueryBuilder, new MockOperationObserver(), generatesKeys);
             fail("No OptimisticLockingFailureException thrown.");

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionTest.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionTest.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionTest.java Wed Mar 12 15:13:16 2014
@@ -19,6 +19,8 @@
 
 package org.apache.cayenne.access.jdbc;
 
+import static org.mockito.Mockito.mock;
+
 import org.apache.cayenne.configuration.server.ServerRuntime;
 import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.di.AdhocObjectFactory;
@@ -47,10 +49,10 @@ public class BatchActionTest extends Ser
 
         InsertBatchQuery batch1 = new InsertBatchQuery(resolver.getObjEntity(GeneratedColumnTestEntity.class)
                 .getDbEntity(), 5);
-        assertTrue(new BatchAction(batch1, adapter, resolver).hasGeneratedKeys());
+        assertTrue(new BatchAction(batch1, adapter, resolver, mock(RowReaderFactory.class)).hasGeneratedKeys());
 
         InsertBatchQuery batch2 = new InsertBatchQuery(resolver.getObjEntity(Artist.class).getDbEntity(), 5);
-        assertFalse(new BatchAction(batch2, adapter, resolver).hasGeneratedKeys());
+        assertFalse(new BatchAction(batch2, adapter, resolver, mock(RowReaderFactory.class)).hasGeneratedKeys());
     }
 
     public void testHasGeneratedKeys2() throws Exception {
@@ -61,10 +63,10 @@ public class BatchActionTest extends Ser
 
         InsertBatchQuery batch1 = new InsertBatchQuery(resolver.getObjEntity(GeneratedColumnTestEntity.class)
                 .getDbEntity(), 5);
-        assertFalse(new BatchAction(batch1, adapter, resolver).hasGeneratedKeys());
+        assertFalse(new BatchAction(batch1, adapter, resolver, mock(RowReaderFactory.class)).hasGeneratedKeys());
 
         InsertBatchQuery batch2 = new InsertBatchQuery(resolver.getObjEntity(Artist.class).getDbEntity(), 5);
-        assertFalse(new BatchAction(batch2, adapter, resolver).hasGeneratedKeys());
+        assertFalse(new BatchAction(batch2, adapter, resolver, mock(RowReaderFactory.class)).hasGeneratedKeys());
     }
 
     JdbcAdapter buildAdapter(boolean supportGeneratedKeys) {

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BindDirectiveTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BindDirectiveTest.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BindDirectiveTest.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BindDirectiveTest.java Wed Mar 12 15:13:16 2014
@@ -18,6 +18,8 @@
  ****************************************************************/
 package org.apache.cayenne.access.jdbc;
 
+import static org.mockito.Mockito.mock;
+
 import java.sql.Connection;
 import java.sql.Timestamp;
 import java.util.Calendar;
@@ -236,7 +238,7 @@ public class BindDirectiveTest extends S
         SQLTemplateAction action = new SQLTemplateAction(
                 template,
                 adapter,
-                context.getEntityResolver());
+                context.getEntityResolver(), mock(RowReaderFactory.class));
 
         Connection c = dataSourceFactory.getSharedDataSource().getConnection();
         try {

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/JDBCResultIteratorTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/JDBCResultIteratorTest.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/JDBCResultIteratorTest.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/JDBCResultIteratorTest.java Wed Mar 12 15:13:16 2014
@@ -19,6 +19,8 @@
 
 package org.apache.cayenne.access.jdbc;
 
+import static org.mockito.Mockito.mock;
+
 import java.sql.Connection;
 import java.sql.Statement;
 
@@ -35,7 +37,15 @@ import com.mockrunner.mock.jdbc.MockStat
 public class JDBCResultIteratorTest extends TestCase {
 
     public void testNextDataRow() throws Exception {
-        JDBCResultIterator it = makeIterator();
+        Connection c = new MockConnection();
+        Statement s = new MockStatement(c);
+        MockResultSet rs = new MockResultSet("rs");
+        rs.addColumn("a", new Object[] { "1", "2", "3" });
+        
+        RowDescriptor descriptor = new RowDescriptorBuilder().setResultSet(rs).getDescriptor(new ExtendedTypeMap());
+        RowReader<?> rowReader = new DefaultRowReaderFactory().createRowReader(descriptor, new MockQueryMetadata());
+
+        JDBCResultIterator it = new JDBCResultIterator(s, rs, rowReader);
 
         DataRow row = (DataRow) it.nextRow();
 
@@ -49,9 +59,10 @@ public class JDBCResultIteratorTest exte
         MockStatement s = new MockStatement(c);
         MockResultSet rs = new MockResultSet("rs");
         rs.addColumn("a", new Object[] { "1", "2", "3" });
-        RowDescriptor descriptor = new RowDescriptorBuilder().setResultSet(rs).getDescriptor(new ExtendedTypeMap());
 
-        JDBCResultIterator it = new JDBCResultIterator(s, rs, descriptor, new MockQueryMetadata());
+        RowReader<?> rowReader = mock(RowReader.class);
+
+        JDBCResultIterator it = new JDBCResultIterator(s, rs, rowReader);
 
         assertFalse(rs.isClosed());
         assertFalse(s.isClosed());
@@ -63,15 +74,4 @@ public class JDBCResultIteratorTest exte
         assertTrue(s.isClosed());
     }
 
-    JDBCResultIterator makeIterator() throws Exception {
-
-        Connection c = new MockConnection();
-        Statement s = new MockStatement(c);
-        MockResultSet rs = new MockResultSet("rs");
-        rs.addColumn("a", new Object[] { "1", "2", "3" });
-
-        RowDescriptor descriptor = new RowDescriptorBuilder().setResultSet(rs).getDescriptor(new ExtendedTypeMap());
-        return new JDBCResultIterator(s, rs, descriptor, new MockQueryMetadata());
-    }
-
 }

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/ResultDirectiveTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/ResultDirectiveTest.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/ResultDirectiveTest.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/ResultDirectiveTest.java Wed Mar 12 15:13:16 2014
@@ -18,6 +18,8 @@
  ****************************************************************/
 package org.apache.cayenne.access.jdbc;
 
+import static org.mockito.Mockito.mock;
+
 import java.sql.Connection;
 import java.util.Collections;
 import java.util.HashMap;
@@ -144,7 +146,7 @@ public class ResultDirectiveTest extends
 
         SQLTemplateAction action = new SQLTemplateAction(template, dbAdapter, runtime
                 .getDataDomain()
-                .getEntityResolver());
+                .getEntityResolver(), mock(RowReaderFactory.class));
 
         assertSame(dbAdapter, action.getAdapter());
 

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateActionTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateActionTest.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateActionTest.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateActionTest.java Wed Mar 12 15:13:16 2014
@@ -19,6 +19,8 @@
 
 package org.apache.cayenne.access.jdbc;
 
+import static org.mockito.Mockito.mock;
+
 import java.sql.Connection;
 import java.sql.Date;
 import java.util.Collections;
@@ -92,10 +94,8 @@ public class SQLTemplateActionTest exten
 
     public void testProperties() throws Exception {
         SQLTemplate template = new SQLTemplate(Object.class, "AAAAA");
-        SQLTemplateAction action = new SQLTemplateAction(
-                template,
-                adapter,
-                objectContext.getEntityResolver());
+        SQLTemplateAction action = new SQLTemplateAction(template, adapter, objectContext.getEntityResolver(),
+                mock(RowReaderFactory.class));
         assertSame(adapter, action.getAdapter());
         assertSame(template, action.getQuery());
     }
@@ -359,10 +359,8 @@ public class SQLTemplateActionTest exten
 
     public void testExtractTemplateString() throws Exception {
         SQLTemplate template = new SQLTemplate(Artist.class, "A\nBC");
-        SQLTemplateAction action = new SQLTemplateAction(
-                template,
-                adapter,
-                objectContext.getEntityResolver());
+        SQLTemplateAction action = new SQLTemplateAction(template, adapter, objectContext.getEntityResolver(),
+                mock(RowReaderFactory.class));
 
         assertEquals("A BC", action.extractTemplateString());
     }

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DataDomainProviderTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DataDomainProviderTest.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DataDomainProviderTest.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DataDomainProviderTest.java Wed Mar 12 15:13:16 2014
@@ -34,6 +34,7 @@ import org.apache.cayenne.access.dbsync.
 import org.apache.cayenne.access.dbsync.ThrowOnPartialOrCreateSchemaStrategy;
 import org.apache.cayenne.access.jdbc.BatchQueryBuilderFactory;
 import org.apache.cayenne.access.jdbc.DefaultBatchQueryBuilderFactory;
+import org.apache.cayenne.access.jdbc.RowReaderFactory;
 import org.apache.cayenne.ashwood.AshwoodEntitySorter;
 import org.apache.cayenne.cache.QueryCache;
 import org.apache.cayenne.configuration.ConfigurationNameMapper;
@@ -191,6 +192,7 @@ public class DataDomainProviderTest exte
                 binder.bind(DataSourceFactory.class).toInstance(new MockDataSourceFactory());
                 binder.bind(JdbcEventLogger.class).to(CommonsJdbcEventLogger.class);
                 binder.bind(QueryCache.class).toInstance(mock(QueryCache.class));
+                binder.bind(RowReaderFactory.class).toInstance(mock(RowReaderFactory.class));
             }
         };
 

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/SchemaBuilder.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/SchemaBuilder.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/SchemaBuilder.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/SchemaBuilder.java Wed Mar 12 15:13:16 2014
@@ -36,6 +36,7 @@ import org.apache.cayenne.access.DataDom
 import org.apache.cayenne.access.DataNode;
 import org.apache.cayenne.access.DbGenerator;
 import org.apache.cayenne.access.dbsync.SkipSchemaUpdateStrategy;
+import org.apache.cayenne.access.jdbc.DefaultRowReaderFactory;
 import org.apache.cayenne.ashwood.AshwoodEntitySorter;
 import org.apache.cayenne.cache.MapQueryCache;
 import org.apache.cayenne.dba.DbAdapter;
@@ -151,6 +152,7 @@ public class SchemaBuilder {
         node.addDataMap(map);
 
         node.setSchemaUpdateStrategy(new SkipSchemaUpdateStrategy());
+        node.setRowReaderFactory(new DefaultRowReaderFactory());
         domain.addNode(node);
     }
 

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseDataDomainProvider.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseDataDomainProvider.java?rev=1576774&r1=1576773&r2=1576774&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseDataDomainProvider.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseDataDomainProvider.java Wed Mar 12 15:13:16 2014
@@ -22,6 +22,7 @@ import org.apache.cayenne.access.DataDom
 import org.apache.cayenne.access.DataNode;
 import org.apache.cayenne.access.UnitTestDomain;
 import org.apache.cayenne.access.dbsync.SkipSchemaUpdateStrategy;
+import org.apache.cayenne.access.jdbc.RowReaderFactory;
 import org.apache.cayenne.configuration.server.DataDomainProvider;
 import org.apache.cayenne.dba.DbAdapter;
 import org.apache.cayenne.di.Inject;
@@ -43,6 +44,9 @@ class ServerCaseDataDomainProvider exten
     
     @Inject
     private UnitDbAdapter unitDbAdapter;
+    
+    @Inject
+    protected RowReaderFactory rowReaderFactory;
 
     @Override
     protected DataDomain createDataDomain(String name) {
@@ -60,6 +64,7 @@ class ServerCaseDataDomainProvider exten
             // add nodes and DataSources dynamically...
             node = new DataNode(dataMap.getName());
             node.setJdbcEventLogger(jdbcEventLogger);
+            node.setRowReaderFactory(rowReaderFactory);
 
             // shared or dedicated DataSources can be mapped per DataMap
             node.setDataSource(dataSourceFactory.getDataSource(dataMap.getName()));



Mime
View raw message