-->
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 Oracle rownum Cached RowSet
PostPosted: Wed Jun 22, 2005 4:21 am 
Beginner
Beginner

Joined: Thu Oct 14, 2004 5:07 am
Posts: 37
Location: Cambridge, UK
Hi

I am doing a HTML search screen which needs to paginate results 10 records per page. I have it working, but am currently executing 2 queries, one for the page, and one for the count of total num results.

I have read around the pagination articles and read that it is possible to get a page of results, + the total number results of a query in ONE query... Quote:

"in particular you will have to insert Oracle's proprietary rownum modifiers into the generated SQL: by using Cached RowSet and cachedRowset.getRow() you get the row count of a query without scanning all the rows or issue a separate SELECT COUNT(*)."

My current paging example uses Criteria, is there an example of inserting Oracle's proprietary rownum modifiers in the generated SQL by using Cached RowSet ?

Or can anyone provide some pseudo ? as I am not sure how to do this..

Hibernate version:3.0.5


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.