139 words

setRange(fromInclToExcl) - JDO Query's method

Method
javax.jdo.Query
void setRange(
  String fromInclToExcl
)

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, setRange("50, 70"); or setRange(":from, :to"); or setRange("50, :to");. 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.
Parameters:
fromInclToExcl - comma-separated fromIncl and toExcl values
Since:
JDO 2.0
See Also:
setRange(long, long)

This documentation page is derived (with some adjustments) from the JDO 2.2 API
and is available under the terms of the Apache License, v. 2.0.