Class PagingInfoImpl
- java.lang.Object
-
- de.digitalcollections.model.impl.paging.PagingInfoImpl
-
- All Implemented Interfaces:
PagingInfo
public class PagingInfoImpl extends Object implements PagingInfo
-
-
Constructor Summary
Constructors Constructor Description PagingInfoImpl(long totalItems, int currentPage, int totalPages, int maxPageItemsToDisplay, int pageSize, String url)PagingInfo
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<PageItem>getItems()intgetNumber()intgetSize()longgetTotalItems()intgetTotalPages()StringgetUrl()booleanhasNextPage()booleanhasPreviousPage()booleanisFirstPage()booleanisLastPage()StringtoString()
-
-
-
Constructor Detail
-
PagingInfoImpl
public PagingInfoImpl(long totalItems, int currentPage, int totalPages, int maxPageItemsToDisplay, int pageSize, String url)PagingInfo- Parameters:
totalItems- total number of items to be pagedcurrentPage- number of the current page, starting with 0totalPages- maximum page numbermaxPageItemsToDisplay- maximum number of page navigation items to be displayedpageSize- page sizeurl- base url
-
-
Method Detail
-
getTotalItems
public long getTotalItems()
- Specified by:
getTotalItemsin interfacePagingInfo
-
getUrl
public String getUrl()
- Specified by:
getUrlin interfacePagingInfo
-
getItems
public List<PageItem> getItems()
- Specified by:
getItemsin interfacePagingInfo
-
getNumber
public int getNumber()
- Specified by:
getNumberin interfacePagingInfo
-
getSize
public int getSize()
- Specified by:
getSizein interfacePagingInfo
-
getTotalPages
public int getTotalPages()
- Specified by:
getTotalPagesin interfacePagingInfo
-
isFirstPage
public boolean isFirstPage()
- Specified by:
isFirstPagein interfacePagingInfo
-
isLastPage
public boolean isLastPage()
- Specified by:
isLastPagein interfacePagingInfo
-
hasPreviousPage
public boolean hasPreviousPage()
- Specified by:
hasPreviousPagein interfacePagingInfo
-
hasNextPage
public boolean hasNextPage()
- Specified by:
hasNextPagein interfacePagingInfo
-
-