You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-commits@db.apache.org by mb...@apache.org on 2005/10/24 14:17:03 UTC
svn commit: r328047 -
/incubator/jdo/trunk/query20/src/java/org/apache/jdo/impl/jdoql/QueryImpl.java
Author: mbo
Date: Mon Oct 24 05:16:56 2005
New Revision: 328047
URL: http://svn.apache.org/viewcvs?rev=328047&view=rev
Log:
JDO-181: add method setRange(String) to QueryImpl class.
The current implementation throws an exception, but with this change
QueryImpl compiles against the current JDO2 API (api20).
Modified:
incubator/jdo/trunk/query20/src/java/org/apache/jdo/impl/jdoql/QueryImpl.java
Modified: incubator/jdo/trunk/query20/src/java/org/apache/jdo/impl/jdoql/QueryImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/query20/src/java/org/apache/jdo/impl/jdoql/QueryImpl.java?rev=328047&r1=328046&r2=328047&view=diff
==============================================================================
--- incubator/jdo/trunk/query20/src/java/org/apache/jdo/impl/jdoql/QueryImpl.java (original)
+++ incubator/jdo/trunk/query20/src/java/org/apache/jdo/impl/jdoql/QueryImpl.java Mon Oct 24 05:16:56 2005
@@ -772,6 +772,30 @@
}
/**
+ * 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
+ */
+ public void setRange (String fromInclToExcl) {
+ throw new UnsupportedOperationException(
+ "method setRange(String) is not yet implemented");
+ }
+
+ /**
* Add a vendor-specific extension to this query. The key and value
* are not standard.
* An implementation must ignore keys that are not recognized.