About setFirstResult

1-10 of 19Refresh
JPA Doc
95

setFirstResult(startPosition)

Method javax.persistence.Query Query setFirstResult(   int startPosition ) Set the position of the first result to retrieve. Parameters: startPosition - position of the first result, numbered from 0 Returns: the same query instance Throws: IllegalArgumentException - if the argument is negative Since: JPA 1.0
JPA Doc
95

setFirstResult(startPosition)

Method javax.persistence.TypedQuery TypedQuery setFirstResult(   int startPosition ) Set the position of the first result to retrieve. Parameters: startPosition - position of the first result, numbered from 0 Returns: the same query instance Throws: IllegalArgumentException - if the argument is negative Since: JPA 2.0
Manual
45

Setting and Tuning of JPA Queries

(setFirstResult, setMaxResults) The setFirstResult and setMaxResults methods enable defining a result ... ). The setFirstResult method is used to specify where the result window begins, i.e. how many results ... > results = query.setFirstResult(pageIx * pageSize) .setMaxResults(pageSize
JPA Doc
11

javax.persistence.TypedQuery

. Returns 0 if setFirstResult was not applied to the query object. Returns: position of the first ... : boolean indicating whether parameter has been bound Since: JPA 2.0 Query setFirstResult(int ... TypedQuery setFirstResult(int startPosition) Set the position of the first result to retrieve. Set
JPA Doc
9

javax.persistence.Query

if setFirstResult was not applied to the query object. Returns: position of the first result Since: JPA 2 ... : boolean indicating whether parameter has been bound Since: JPA 2.0 Query setFirstResult(int
JPA Doc
6

getFirstResult()

Method javax.persistence.Query int getFirstResult() The position of the first result the query object was set to retrieve. Returns 0 if setFirstResult was not applied to the query object. Returns: position of the first result Since: JPA 2.0 Learn how to define and use JPA/JPQL queries in Chapter 4 of the ObjectDB/JPA manual.
Forum
4

JPA and handling large data sets

by step during the export with the  query/setFirstResult() & setMaxResults(). But for large data ... to traverse all objects of an entity? Peter     Using query result range (setFirstResult, setMaxResults ... setFirstResult with a constraint on the result order value. For example, if your query returns
Forum
3

Caching/Paging Questions...

via setFirstResult and setMaxResult speed up the query execution since there are fewer result objects to bring into ... cache is automatic. There is no limit on the maximum size of the L2 cache. Using setFirstResult
Forum
3

Listing large number of complicated objects with paging.

.setFirstResult(start).setMaxResults(count).getResultList(); is quite slow. Well, after first request ... .setFirstResult(20).setMaxResults(10).getResultList();         System.out.println("Results
Issue
3

NPE at com.objectdb.jpa.JpaQuery.getResultList

); if (!all) { q.setMaxResults(maxResults); q.setFirstResult(firstResult ... );             if (!all) {                 q.setMaxResults(maxResults);                 q.setFirstResult(firstResult