In my application I need to get only 20 records among 200.Previously I was getting all records from database and initially showing only first 20 records in first page whenever user enter the page number or by clicking the navigation tabs user may get another 20 records.
But now I need to get only 20 records from database initially and also total count of records then only I can display the page numbers based on records total count. whenever user click on corresponding page number then only corresponding records will need to be displays which are fetched by hitting the database
I am new to hibernate that's why I am asking this question