DATACMNS-387 - Introduce Slice abstraction.
Introduced a Slice interface which is effectively a Page without the total page information. This will allow store modules to implement slice-by-slice access without having to calculate a total number of elements. Extracted content and Pageable related functionality into a common Chunk class which serves as base class for the two concrete implementations SliceImpl and PageImpl. Deprecated hasNextPage() etc. on Page in favor of the generic hasNext() methods. QueryMethod now exposes an isSliceQuery() to indicate a query method will need sliced execution.
This commit is contained in:
@@ -155,11 +155,11 @@ public class PagedResourcesAssembler<T> implements ResourceAssembler<Page<T>, Pa
|
||||
private <R extends ResourceSupport> PagedResources<R> addPaginationLinks(PagedResources<R> resources, Page<?> page,
|
||||
String uri) {
|
||||
|
||||
if (page.hasNextPage()) {
|
||||
if (page.hasNext()) {
|
||||
foo(resources, page.nextPageable(), uri, Link.REL_NEXT);
|
||||
}
|
||||
|
||||
if (page.hasPreviousPage()) {
|
||||
if (page.hasPrevious()) {
|
||||
foo(resources, page.previousPageable(), uri, Link.REL_PREVIOUS);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user