-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: pagination and DAO
PostPosted: Fri Feb 13, 2004 9:09 am 
Newbie

Joined: Fri Sep 19, 2003 8:35 pm
Posts: 1
I know I can use setMaxResults and setFirstResult to handle pagination of a data set but I was wondering how people actually do it using DAO.

I was thinking of creating a Page class to deal with this information in action classes and set it in my DAO, where it might be an attribute, before invoking methods like getUsers(). These methods, like getUsers(), might instanciate Query, set its properties and call a generic get method, passing Query as parameter, which would read from class Page paging information like maxresults, initialPage.

I would apreciate any help.

thx in advance

joao


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.