public abstract class PageableExecutionUtils extends Object
Pageable
. Using PageableExecutionUtils
assumes that data queries
are cheaper than COUNT
queries and so some cases can take advantage of optimizations.Modifier and Type | Class and Description |
---|---|
static interface |
PageableExecutionUtils.TotalSupplier
Supplies the total count for a particular query.
|
Modifier and Type | Method and Description |
---|---|
static <T> Page<T> |
getPage(List<T> content,
Pageable pageable,
PageableExecutionUtils.TotalSupplier totalSupplier)
Constructs a
Page based on the given content , Pageable and PageableExecutionUtils.TotalSupplier applying
optimizations. |
public static <T> Page<T> getPage(List<T> content, Pageable pageable, PageableExecutionUtils.TotalSupplier totalSupplier)
Page
based on the given content
, Pageable
and PageableExecutionUtils.TotalSupplier
applying
optimizations. The construction of Page
omits a count query if the total can be determined based on the
result size and Pageable
.content
- must not be null.pageable
- can be null.totalSupplier
- must not be null.Page
.Copyright © 2011-2015–2017 Pivotal Software, Inc.. All rights reserved.