107 words

setRange(fromIncl, toExcl) - JDO Query's method

Method
javax.jdo.Query
void setRange(
  long fromIncl,
  long toExcl
)

Set the range of results to return. 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:
fromIncl - 0-based inclusive start index
toExcl - 0-based exclusive end index, or Long.MAX_VALUE for no limit.
Since:
JDO 2.0

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.