类 PageHandler

java.lang.Object
com.publiccms.common.handler.PageHandler
所有已实现的接口:
Serializable
直接已知子类:
FacetPageHandler

public class PageHandler extends Object implements Serializable
PageHandler

分页结果处理器

另请参阅:
  • 字段详细资料

    • serialVersionUID

      private static final long serialVersionUID
      另请参阅:
    • DEFAULT_PAGE_SIZE

      public static final int DEFAULT_PAGE_SIZE
      默认每页数据条数
      另请参阅:
    • MAX_PAGE_SIZE

      public static final int MAX_PAGE_SIZE
      最大每页数据条数
      另请参阅:
    • totalCount

      private int totalCount
      total count 总数量
    • pageSize

      private int pageSize
      page size 每页数量
    • firstResult

      private Integer firstResult
      first result offset 当前开始位置
    • pageIndex

      private int pageIndex
      current page index 当前页面
    • totalPage

      private int totalPage
      total page 总页数
    • list

      private List<?> list
      result list 结果列表
  • 构造器详细资料

    • PageHandler

      public PageHandler(Integer pageIndex, Integer pageSize)
      参数:
      pageIndex -
      pageSize -
    • PageHandler

      public PageHandler(Integer firstResult, Integer pageIndex, Integer pageSize)
      参数:
      firstResult -
      pageIndex -
      pageSize -
  • 方法详细资料

    • getTotalPage

      public static int getTotalPage(int totalCount, int pageSize)
      总页数
      参数:
      totalCount -
      pageSize -
      返回:
      total page
    • getFirstResult

      public int getFirstResult()
      第一条结果
      返回:
      first result
    • getTotalCount

      public int getTotalCount()
      总数据条数
      返回:
      the totalCount
    • setTotalCount

      public void setTotalCount(long totalCount)
      参数:
      totalCount - the totalCount to set
    • setTotalCount

      public void setTotalCount(int totalCount)
      参数:
      totalCount - the totalCount to set
    • getPageSize

      public int getPageSize()
      每页数据条数
      返回:
      the pageSize
    • getPageIndex

      public int getPageIndex()
      当前页码
      返回:
      the pageIndex
    • getList

      public List<?> getList()
      结果数据
      返回:
      the list
    • setList

      public void setList(List<?> list)
      参数:
      list - the list to set
    • isFirstPage

      public boolean isFirstPage()
      是否第一页
      返回:
      whether the first page
    • getTotalPage

      public int getTotalPage()
      总页数
      返回:
      the totalPage
    • isLastPage

      public boolean isLastPage()
      是否最后一页
      返回:
      whether the last page
    • getNextPage

      public int getNextPage()
      下一页
      返回:
      next page
    • getPrePage

      public int getPrePage()
      上一页
      返回:
      previous page
    • getPrevPage

      public int getPrevPage()
      上一页
      返回:
      previous page