Package org.praxisplatform.uischema.util
Class PageableBuilder
java.lang.Object
org.praxisplatform.uischema.util.PageableBuilder
Utility for building
Pageable instances from primitive request
parameters while applying a fallback Sort when none is specified.- Since:
- 1.0.0
-
Method Summary
-
Method Details
-
from
public static org.springframework.data.domain.Pageable from(int page, int size, List<String> sort, org.springframework.data.domain.Sort fallback) Compose aPageableinstance using the provided page, size and optional sort directives. When no sort is provided the fallback sort is applied.- Parameters:
page- zero-based page indexsize- page sizesort- sort directives (e.g. ["name,asc", "id,desc"])fallback- default sort whensortis empty- Returns:
- resulting
Pageable
-