openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r814065 - in /openjpa/trunk/openjpa-jdbc/src/main: java/org/apache/openjpa/jdbc/kernel/PreparedQueryImpl.java resources/org/apache/openjpa/jdbc/kernel/localizer.properties
Date Fri, 11 Sep 2009 22:27:28 GMT
Author: ppoddar
Date: Fri Sep 11 22:27:27 2009
New Revision: 814065

URL: http://svn.apache.org/viewvc?rev=814065&view=rev
Log:
OPENJPA-703: Support RangeResultObjectProvider for prepared query cache

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryImpl.java
    openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/localizer.properties

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryImpl.java?rev=814065&r1=814064&r2=814065&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryImpl.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryImpl.java
Fri Sep 11 22:27:27 2009
@@ -42,6 +42,7 @@
 import org.apache.openjpa.kernel.StoreQuery;
 import org.apache.openjpa.kernel.PreparedQueryCache.Exclusion;
 import org.apache.openjpa.kernel.exps.QueryExpressions;
+import org.apache.openjpa.lib.rop.RangeResultObjectProvider;
 import org.apache.openjpa.lib.rop.ResultList;
 import org.apache.openjpa.lib.util.Localizer;
 import org.apache.openjpa.util.ImplHelper;
@@ -212,10 +213,13 @@
         if (provider instanceof QueryImpl.PackingResultObjectProvider) {
             provider = ((QueryImpl.PackingResultObjectProvider)provider).getDelegate();
         }
+        if (provider instanceof RangeResultObjectProvider) {
+            provider = ((RangeResultObjectProvider)provider).getDelegate();
+        }
         if (provider instanceof SelectResultObjectProvider) {
             return new Object[]{((SelectResultObjectProvider)provider).getSelect(), null};
         } 
-        return new Object[]{null, _loc.get("exclude-not-select-rop")};
+        return new Object[]{null, _loc.get("exclude-not-select-rop", provider)};
     }
     
     private SelectImpl extractImplementation(SelectExecutor selector) {

Modified: openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/localizer.properties
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/localizer.properties?rev=814065&r1=814064&r2=814065&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/localizer.properties
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/localizer.properties
Fri Sep 11 22:27:27 2009
@@ -163,6 +163,7 @@
     from this query.
 exclude-no-select: because internal select instance can not be extracted \
     from this query.
-exclude-no-select-rop: because the query result is not obtained by executing \
-	a select statement. This can happen if the query was evaluated in-memory.  
+exclude-not-select-rop: because the query result is not obtained by executing \
+	a select statement. This can happen if the query was evaluated in-memory. \
+	The result was provided by an instance of {0}.  
 exclude-not-executor: because this query was not executed on a data store.    



Mime
View raw message