Class PagingInfoImpl
java.lang.Object
de.digitalcollections.model.impl.paging.PagingInfoImpl
- All Implemented Interfaces:
PagingInfo
public class PagingInfoImpl extends java.lang.Object implements PagingInfo
-
Constructor Summary
Constructors Constructor Description PagingInfoImpl(long totalItems, int currentPage, int totalPages, int maxPageItemsToDisplay, int pageSize, java.lang.String url)PagingInfo -
Method Summary
Modifier and Type Method Description java.util.List<PageItem>getItems()intgetNumber()intgetSize()longgetTotalItems()intgetTotalPages()java.lang.StringgetUrl()booleanhasNextPage()booleanhasPreviousPage()booleanisFirstPage()booleanisLastPage()java.lang.StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
PagingInfoImpl
public PagingInfoImpl(long totalItems, int currentPage, int totalPages, int maxPageItemsToDisplay, int pageSize, java.lang.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 Details
-
getTotalItems
public long getTotalItems()- Specified by:
getTotalItemsin interfacePagingInfo
-
getUrl
public java.lang.String getUrl()- Specified by:
getUrlin interfacePagingInfo
-
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
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-