ObjectDB ObjectDB

Internal Website Search

1-10 of 20 resultsRefresh
104

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
104

setFirstResult(startPosition)

Method javax.persistence.TypedQuery TypedQuery<X> 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
81

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
23

JPA and handling large data sets

by step during the export with the query/setFirstResult() & setMaxResults(). But for large data sets ... (setFirstResult, setMaxResults) for this purpose is indeed inefficient, because some query processing is required ... them). Much more efficient way is to replace setFirstResult with a constraint on the result order value. For example
16

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
16

Caching/Paging Questions...

via setFirstResult and setMaxResult speed up the query execution since there are fewer result objects to bring into ... . Using setFirstResult and setMaxResults could improve performance, but the effect is highly dependent on the specific query. support Support
12

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 ... <X> setFirstResult(int startPosition) Set the position of the first result to retrieve. Set
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
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.
3

NPE at com.objectdb.jpa.JpaQuery.getResultList

); if (!all) { q.setMaxResults(maxResults); q.setFirstResult(firstResult ... .setFirstResult(firstResult);             }             return q.getResultList();         }         finally

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support