JavaOmnibus
J2EE Value List Handler
J2EE pattern • Integration
J2EEIntegrationJava example

Value List Handler solves a specific structural problem in the design.

Manage large result lists with paging and efficient navigation.

Pattern overview

J2EE pattern

Manage large result lists with paging and efficient navigation.

Intent

Provide a lightweight handler for searching, paging, and navigating large value lists.

Problem

Large result sets are expensive to load and inconvenient to move around whole.

Solution

Keep paging and list navigation responsibilities in a dedicated handler.

Fit and tradeoffs

FamilyJ2EE
CategoryIntegration
Best used when
  • For reports, admin tables, and search results with pagination.
Tradeoffs
  • Modern frameworks often cover parts of this already, so the pattern should stay slim.

Java example

This example is intentionally compact so the pattern shape stays easy to see.

public record PageRequest(int page, int size) {}
public record PageResult<T>(List<T> items, long totalItems) {}

public final class CustomerListHandler {
    private final CustomerDao customerDao;

    public PageResult<CustomerDto> page(PageRequest request) {
        return customerDao.findPage(request.page(), request.size());
    }
}

Related pages

Keep exploring