Announcement Announcement Module
Collapse
No announcement yet.
How to create transparant pagination support? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to create transparant pagination support?

    Hi, I'm a new architect. I've designed service layer that contains services such as getAllCustomers(), findCustomerByLocation(String location), getAllOrders(), findOrdersByDate(Date startDate, Date endDate), etc..
    When I tried to implement the presentasion layer, I find out that I need pagination service. But most presentation layer supports for pagination requires me to fetch all records from DB, and I fear this could cause some performance problems.
    I could modify my DAO layer to support pagination in Hibernate. But that mean I will need change my service layer and my DAO layer to include 'pagination' parameter. I feel that 'pagination' is not part of service and feel strange to add pagination parameter to all methods that require pagination. Are there any solutions to create a transparant 'pagination' that doesn't fetch all records from data source and without changing my service layer methods?
Working...
X