Re: [appfuse-user] hibernate pagination question

2007-06-18 Thread Sanjiv Jivan
fuse.dev.java.net *Sent:* Monday, June 18, 2007 10:58 PM *Subject:* Re: [appfuse-user] hibernate pagination question That seems incorrect. There is a pattern where one gets an extra record only to determine if we're on the last page of data but then return pageSize records to the user, but this do

Re: [appfuse-user] hibernate pagination question

2007-06-18 Thread j2ee dodo
m, - Original Message - From: Sanjiv Jivan To: users@appfuse.dev.java.net Sent: Monday, June 18, 2007 10:58 PM Subject: Re: [appfuse-user] hibernate pagination question That seems incorrect. There is a pattern where one gets an extra record only to determine if we're

Re: [appfuse-user] hibernate pagination question

2007-06-18 Thread j2ee dodo
Cool Sanjiv. Thanks. The forum shud have more ppl like u. ;) Sam, - Original Message - From: Sanjiv Jivan To: users@appfuse.dev.java.net Sent: Monday, June 18, 2007 10:58 PM Subject: Re: [appfuse-user] hibernate pagination question That seems incorrect. There is a

Re: [appfuse-user] hibernate pagination question

2007-06-18 Thread Sanjiv Jivan
That seems incorrect. There is a pattern where one gets an extra record only to determine if we're on the last page of data but then return pageSize records to the user, but this doesn't seems to be the case in the wiki article. See http://www.jroller.com/page/sjivan?entry=hibernate_and_oracle_pag

[appfuse-user] hibernate pagination question

2007-06-17 Thread j2ee dodo
Hi gang, According to wiki on http://raibledesigns.com/wiki/Wiki.jsp?page=DisplayTagAndHibernatePagination public List getTestData(int page, int pageSize){ Query query = getSession().createQuery("from Test"); return query.setFirstResult(page * pageSize).setMaxResults(pageSiz