Class PageWrapper<T>
java.lang.Object
de.digitalcollections.cudami.admin.paging.PageWrapper<T>
- Type Parameters:
T- is the paginated type.
public class PageWrapper<T>
extends java.lang.Object
"Spring Data Page interface has many nice functions to get current page number, get total pages,
etc. But it’s still lack of ways to let me only display partial page range of total pagination.
So I created an adapter class to wrap Spring Data Page interface with additional features."
- Author:
- ralf
- See Also:
- Java Code Geeks article
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classPageWrapper.PageItem -
Field Summary
Fields Modifier and Type Field Description static intMAX_PAGE_ITEM_DISPLAY -
Constructor Summary
Constructors Constructor Description PageWrapper(org.springframework.data.domain.Page<T> page, java.lang.String url) -
Method Summary
Modifier and Type Method Description java.util.List<T>getContent()java.util.List<PageWrapper.PageItem>getItems()intgetNumber()org.springframework.data.domain.Page<T>getPage()intgetSize()longgetTotalItems()intgetTotalPages()java.lang.StringgetUrl()booleanisFirstPage()booleanisHasNextPage()booleanisHasPreviousPage()booleanisLastPage()voidsetUrl(java.lang.String url)
-
Field Details
-
MAX_PAGE_ITEM_DISPLAY
public static final int MAX_PAGE_ITEM_DISPLAY- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
getContent
-
getItems
-
getNumber
public int getNumber() -
getPage
-
getSize
public int getSize() -
getTotalItems
public long getTotalItems() -
getTotalPages
public int getTotalPages() -
getUrl
public java.lang.String getUrl() -
setUrl
public void setUrl(java.lang.String url) -
isFirstPage
public boolean isFirstPage() -
isHasNextPage
public boolean isHasNextPage() -
isHasPreviousPage
public boolean isHasPreviousPage() -
isLastPage
public boolean isLastPage()
-