sormula simple (easy) object relational mapping
Select from an Arbitrary Page

Select a specific page
Table<Book> table = ...

try (PaginatedListSelector<Book> selector = new PaginatedListSelector<>(pageSize, table))
{
    selector.setWhere("top");
    selector.setParameters(15);
    selector.setOrderByName("titleOrder");
    selector.execute();
    
    selector.setPageNumber(42);
    List<Book> pageBooks = selector.selectPage();
}
Display all pages in order
Table<Book> table = ...

try (PaginatedListSelector<Book> selector = new PaginatedListSelector<>(pageSize, table))
{
    selector.setWhere("top");
    selector.setParameters(15);
    selector.setOrderByName("titleOrder");
    selector.execute();
    
    int pageNumber = 1;
    while (true)
    {
        selector.setPageNumber(pageNumber);
        List<Book> pageBooks = selector.selectPage();
        if (pageBooks.isEmpty()) break;
        
        System.out.println("Page " + pageNumber);
        printAll(pageBooks);
        System.out.println();
        ++pageNumber;
    }
}
See PaginatedListSelector and org.sormula.examples.pagination package in the project.