db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r326738 - /incubator/jdo/trunk/api20/src/java/javax/jdo/Query.java
Date Wed, 19 Oct 2005 22:43:58 GMT
Author: clr
Date: Wed Oct 19 15:43:56 2005
New Revision: 326738

URL: http://svn.apache.org/viewcvs?rev=326738&view=rev
Log:
JDO-181 Added setRange(String) to javax.jdo.Query

Modified:
    incubator/jdo/trunk/api20/src/java/javax/jdo/Query.java

Modified: incubator/jdo/trunk/api20/src/java/javax/jdo/Query.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/api20/src/java/javax/jdo/Query.java?rev=326738&r1=326737&r2=326738&view=diff
==============================================================================
--- incubator/jdo/trunk/api20/src/java/javax/jdo/Query.java (original)
+++ incubator/jdo/trunk/api20/src/java/javax/jdo/Query.java Wed Oct 19 15:43:56 2005
@@ -457,6 +457,27 @@
     void setRange (long fromIncl, long toExcl);
 
     /**
+     * Set the range of results to return. The parameter is a String
+     * containing a comma-separated fromIncl and toExcl. The fromIncl and
+     * toExcl can be either String representations of long values, or can
+     * be parameters identified with a leading ":". For example, 
+     * <code>setRange("50, 70");</code> or 
+     * <code>setRange(":from, :to");</code> or 
+     * <code>setRange("50, :to");</code>.
+     * The execution of the query is
+     * modified to return only a subset of results. If the filter would
+     * normally return 100 instances, and fromIncl is set to 50, and
+     * toExcl is set to 70, then the first 50 results that would have 
+     * been returned are skipped, the next 20 results are returned and the
+     * remaining 30 results are ignored. An implementation should execute
+     * the query such that the range algorithm is done at the data store.
+     * @param fromInclToExcl comma-separated fromIncl and toExcl values
+     * @see #setRange(long, long)
+     * @since 2.0
+     */
+    void setRange (String fromInclToExcl);
+
+    /**
      * Add a vendor-specific extension to this query. The key and value
      * are not standard.
      * An implementation must ignore keys that are not recognized.



Mime
View raw message