T - type of data you're accessingP - type of paging, like #OffsetPaging or #CursorPagingpublic class PaginatedResult<T,P extends Paging> extends Object
| Constructor and Description |
|---|
PaginatedResult(PaginatedResultDelegate<T,P> delegate,
ResultCountDelegate resultCountDelegate,
PagingDelegate<P> pagingDelegate,
Object... arguments) |
| Modifier and Type | Method and Description |
|---|---|
P |
getCurrentPage()
Returns the current page.
|
T |
getData()
Returns the data with the current page.
|
List<FieldSort> |
getFieldSorts()
Returns the current sorting conditions.
|
int |
getTotalCount()
Returns the total numbers of data is going to return.
|
boolean |
isTotalCountAvailable()
Can tell the total numbers of data.
|
<R extends PaginatedResult<T,P>> |
next()
Move to next page based on the current page
|
<R extends PaginatedResult<T,P>> |
start(P paging)
Initial the current page.
|
<R extends PaginatedResult<T,P>> |
start(P paging,
FieldSort... fieldSort)
Initial the current page and sorting conditions.
|
public PaginatedResult(PaginatedResultDelegate<T,P> delegate, ResultCountDelegate resultCountDelegate, PagingDelegate<P> pagingDelegate, Object... arguments)
public <R extends PaginatedResult<T,P>> R start(P paging)
R - R extends PaginatedResult%3CT, P%3Epaging - Ppublic <R extends PaginatedResult<T,P>> R start(P paging, FieldSort... fieldSort)
R - R extends PaginatedResult%3CT, P%3Epaging - PfieldSort - array of FieldSortpublic <R extends PaginatedResult<T,P>> R next()
R - PaginatedResultpublic T getData()
public int getTotalCount()
public boolean isTotalCountAvailable()
ResultCountDelegate interface.public P getCurrentPage()
Copyright © 2020 CodingZero. All rights reserved.