Use eclipselink.jdbc.first-result to specify if the query should skip the specified number of rows in the result.
Table 4-16 describes this query hint's values.
Table 4-16 Valid Values for jdbc.first-result
| Value | Description |
|---|---|
|
Integer |
The position of the first result to retrieve. |
This query hint is similar to JPA Query setFirstResults(), but can be set in metadata for NamedQuerys.
Example 4-34 Using jdbc.first-result in a JPA Query
import org.eclipse.persistence.config.HintValues;
import org.eclipse.persistence.config.QueryHints;
query.setHint("eclipselink.JDBC_FIRST_RESULT", "10");
For more information, see:
"Query Concepts" in Understanding Oracle TopLink