I have a query that retrieves all results for a particular query,
public List<MyObjs> getMyObjsForCustomer(final Long customerId) throws IOException {
}
This worked fine for a while but now I need to limit the result set for performance reasons, something like..
query.setMaxResults(1000);
However, i would like an intelligent way of finding out if there are more results that the 1000 to handle UI paging etc, handle the next call and so on. Is there a way to find out if there are more records matching my query than the 1000 returned? the equivalent of a
query.hasMore();
for example. I could get the ID of the last returned record and use that as the starting point for my next query but i was wondering if there was a better/another way?