T
- type of page elementpublic class RestPageModel<T> extends AbstractRestModel
self
Modifier and Type | Method and Description |
---|---|
static <T> RestPageModel<T> |
expandable(PageRequest pageRequest)
Construct a page model for an expandable result list, without any results yet.
|
static <T> RestPageModel<T> |
forItems(PageRequest pageRequest,
Iterable<T> items)
Construct a page model for a result list.
|
static <T> RestPageModel<T> |
forItems(PageRequest pageRequest,
Iterable<T> items,
boolean more)
Construct a page model for a result list.
|
int |
getLimit()
Get the maximum number of items allowed/requested to be returned.
|
List<T> |
getResults() |
int |
getStart()
Get the index this page starts from.
|
boolean |
isMore() |
void |
setNext(String next) |
void |
setPrev(String prev) |
getSelf, setSelf
public static <T> RestPageModel<T> expandable(@NotNull PageRequest pageRequest)
pageRequest
- requestpublic static <T> RestPageModel<T> forItems(@NotNull PageRequest pageRequest, @NotNull Iterable<T> items)
pageRequest
- requestitems
- items for the pagepublic static <T> RestPageModel<T> forItems(@NotNull PageRequest pageRequest, @NotNull Iterable<T> items, boolean more)
pageRequest
- requestitems
- items for the pagemore
- true, if there are more results and the list is not completepublic boolean isMore()
public int getStart()
public int getLimit()
public void setNext(@Nullable String next)
public void setPrev(@Nullable String prev)
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.