cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1576777 - /cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/DefaultRowReaderFactory.java
Date Wed, 12 Mar 2014 15:13:36 GMT
Author: aadamchik
Date: Wed Mar 12 15:13:35 2014
New Revision: 1576777

URL: http://svn.apache.org/r1576777
Log:
CAY-1907 RowReaderFactory

hiding DataRowPostProcessor in the reader factory
	minimizing use of SelectTranslator

Modified:
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/DefaultRowReaderFactory.java

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/DefaultRowReaderFactory.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/DefaultRowReaderFactory.java?rev=1576777&r1=1576776&r2=1576777&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/DefaultRowReaderFactory.java
(original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/DefaultRowReaderFactory.java
Wed Mar 12 15:13:35 2014
@@ -46,7 +46,7 @@ public class DefaultRowReaderFactory imp
     public RowReader<?> createRowReader(RowDescriptor descriptor, QueryMetadata queryMetadata,
             SelectTranslator translator) {
 
-        PostprocessorFactory postProcessorFactory = new PostprocessorFactory(translator,
queryMetadata);
+        PostprocessorFactory postProcessorFactory = new PostprocessorFactory(translator,
descriptor, queryMetadata);
 
         List<Object> rsMapping = queryMetadata.getResultSetMapping();
         if (rsMapping == null) {
@@ -114,10 +114,13 @@ public class DefaultRowReaderFactory imp
 
         private QueryMetadata queryMetadata;
         private SelectTranslator translator;
+        private RowDescriptor rowDescriptor;
+
         private boolean created;
         private DataRowPostProcessor postProcessor;
 
-        PostprocessorFactory(SelectTranslator translator, QueryMetadata queryMetadata) {
+        PostprocessorFactory(SelectTranslator translator, RowDescriptor rowDescriptor, QueryMetadata
queryMetadata) {
+            this.rowDescriptor = rowDescriptor;
             this.translator = translator;
             this.queryMetadata = queryMetadata;
         }
@@ -145,7 +148,7 @@ public class DefaultRowReaderFactory imp
                 return null;
             }
 
-            ColumnDescriptor[] columns = translator.getResultColumns();
+            ColumnDescriptor[] columns = rowDescriptor.getColumns();
 
             Map<String, Collection<ColumnOverride>> columnOverrides = new HashMap<String,
Collection<ColumnOverride>>(2);
 



Mime
View raw message