cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r721686 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query: BaseQueryMetadata.java SQLTemplateMetadata.java
Date Sat, 29 Nov 2008 16:26:59 GMT
Author: aadamchik
Date: Sat Nov 29 08:26:58 2008
New Revision: 721686

URL: http://svn.apache.org/viewvc?rev=721686&view=rev
Log:
CAY-1136 "Compiled" EntityResult ; Switch SelectQuery processing to use EntityResult

pushing SQLResultSetMapping in a query metadata superclass

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/SQLTemplateMetadata.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java?rev=721686&r1=721685&r2=721686&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java
Sat Nov 29 08:26:58 2008
@@ -54,6 +54,7 @@
     PrefetchTreeNode prefetchTree;
     String cacheKey;
     String[] cacheGroups;
+    SQLResultSetMapping resultSetMapping;
 
     transient DbEntity dbEntity;
     transient DataMap dataMap;
@@ -76,6 +77,7 @@
         this.pageSize = info.getPageSize();
         this.cacheStrategy = info.getCacheStrategy();
         this.cacheKey = info.getCacheKey();
+        this.resultSetMapping = info.getResultSetMapping();
 
         setPrefetchTree(info.getPrefetchTree());
     }
@@ -160,9 +162,8 @@
         Object cacheGroups = properties.get(QueryMetadata.CACHE_GROUPS_PROPERTY);
 
         // init ivars from properties
-        this.fetchOffset = (fetchOffset != null)
-                ? Integer.parseInt(fetchOffset.toString())
-                : QueryMetadata.FETCH_OFFSET_DEFAULT;
+        this.fetchOffset = (fetchOffset != null) ? Integer.parseInt(fetchOffset
+                .toString()) : QueryMetadata.FETCH_OFFSET_DEFAULT;
 
         this.fetchLimit = (fetchLimit != null)
                 ? Integer.parseInt(fetchLimit.toString())
@@ -287,12 +288,17 @@
     }
 
     /**
-     * Always returns null, as this is not supported for most classic queries.
-     * 
+     * @since 3.0
+     */
+    void setResultSetMapping(SQLResultSetMapping resultSetMapping) {
+        this.resultSetMapping = resultSetMapping;
+    }
+
+    /**
      * @since 3.0
      */
     public SQLResultSetMapping getResultSetMapping() {
-        return null;
+        return resultSetMapping;
     }
 
     /**

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/SQLTemplateMetadata.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/SQLTemplateMetadata.java?rev=721686&r1=721685&r2=721686&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/SQLTemplateMetadata.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/SQLTemplateMetadata.java
Sat Nov 29 08:26:58 2008
@@ -31,17 +31,6 @@
  */
 class SQLTemplateMetadata extends BaseQueryMetadata {
 
-    private SQLResultSetMapping resultSetMapping;
-
-    void setResultSetMapping(SQLResultSetMapping resultSetMapping) {
-        this.resultSetMapping = resultSetMapping;
-    }
-
-    @Override
-    public SQLResultSetMapping getResultSetMapping() {
-        return resultSetMapping;
-    }
-
     boolean resolve(Object root, EntityResolver resolver, SQLTemplate query) {
 
         if (super.resolve(root, resolver, null)) {



Mime
View raw message