Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Retriving data from data base

 
Pankaj Patro
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Every Body,

This is the scenario where I am going to work:-
SCENARIO:- In the database there is more than 100000 records are there,
but I need to display only 100 records on the screen, when my user interface press the next button, then next 100 will pop-up and displays. But we are not suppose to write any queries in the tablename.hbm.xml file.


Can any one suggest me how to achive this.
[ April 10, 2006: Message edited by: Aryan Jones ]
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could use Criteria. It has setFetchSize() and setFirstResults() methods.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic