FlexibleSearch Pagination

SAP Commerce platform provides functionality for pagination DB results. You are able to find paginated DAO:

There is also Flexible Service which also allows pagination:

That implementation depends on other DTOs i.e: PaginatedFlexibleSearchParameter

and SearchPageData:

Usage of that code is not popular in platform. Can be found in few places (I will update that part later on) but what is most important here, it is not easiest solution at all!

Solution for pagination

So how to make it better, with no hassle with extra helper objects? Just use what FlexibleSearchQuery class gives to you.

FlexibleSearchQuery gives you 2 methods setStart and setCount thanks to that you are able to set up pagination functionality in code.

SAP API Documentation FlexibleSearchQuery

Comments

Popular posts from this blog

SAP Commerce Cloud and Read-Only Replica

Eclipse plugin development and Apple Silicon M1