Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Pagination and Results


I'm about to start exploring some pagination in my code for going
through results, and I'm curious about tips and/or best practices for
paging through results?  I've seen some forum posts referring to using
setFirstResult / MaxResults - is this the proper way?

I will mainly be accessing data via named queries on entity objects, and
the data sets could be quite large, so I am looking for the most
efficicent way to page through results in different chunks (by 20, by 50

Also, lets say that I have a query that returns all the results for a
given statement (eg 100). So user1 runs that and begins to page thru -
and then user2 comes along to my web app and runs the same query but now
there are 110 results - is the first result set object cached on a per
user basis?  I assume that in both queries the first 100 objects are
cached but what about result sets and the number of results?  Will this
cause any issue with paging?

Thanks for the help,


Back to the top