What defines "the first 1000" records? You will need some way of specifying this in your data model, i.e. an auto incrementing surrogate key, or a "creation date" field of some kind. Otherwise there is no way to know what "first 1000" actually means. The query you would write to get these depends on that bit of info.
Joined: Jun 05, 2010
i want records of students from roll no 1 to roll no 1000.
So in HQL your query could perhaps use a between operator - something like:
or if you prefer using Criteria queries you would use a between Restriction, e.g. :
One thing to consider is 1000 records on one web page is probably quite a lot. Unless you know for certain your users want to look at 1000 results at once I'd maybe consider reducing the size of result set you show. For example Google only show about 10 - 20 results on one page.