类 SimplePage

java.lang.Object
com.budwk.app.base.page.SimplePage
所有已实现的接口:
Paginable, Serializable
直接已知子类:
Pagination

public class SimplePage extends Object implements Serializable, Paginable
另请参阅:
  • 字段详细资料

    • DEF_COUNT

      public static final int DEF_COUNT
      另请参阅:
    • totalCount

      protected int totalCount
    • pageSize

      protected int pageSize
    • pageNo

      protected int pageNo
  • 构造器详细资料

    • SimplePage

      public SimplePage()
    • SimplePage

      public SimplePage(int pageNo, int pageSize, int totalCount)
      构造器
      参数:
      pageNo - 页码
      pageSize - 每页几条数据
      totalCount - 总共几条数据
  • 方法详细资料

    • getSegment

      public List<Integer> getSegment()
    • cpn

      public static int cpn(Integer pageNo)
      检查页码 checkPageNo
      参数:
      pageNo -
      返回:
      if pageNo==null or pageNo 小于 1 then return 1 else return pageNo
    • adjustPageNo

      public void adjustPageNo()
      调整页码,使不超过最大页数
    • getPageNo

      public int getPageNo()
      获得页码
      指定者:
      getPageNo 在接口中 Paginable
      返回:
    • getPageSize

      public int getPageSize()
      每页几条数据
      指定者:
      getPageSize 在接口中 Paginable
      返回:
    • getTotalCount

      public int getTotalCount()
      总共几条数据
      指定者:
      getTotalCount 在接口中 Paginable
      返回:
    • getTotalPage

      public int getTotalPage()
      总共几页
      指定者:
      getTotalPage 在接口中 Paginable
      返回:
    • isFirstPage

      public boolean isFirstPage()
      是否第一页
      指定者:
      isFirstPage 在接口中 Paginable
      返回:
    • isLastPage

      public boolean isLastPage()
      是否最后一页
      指定者:
      isLastPage 在接口中 Paginable
      返回:
    • getNextPage

      public int getNextPage()
      下一页页码
      指定者:
      getNextPage 在接口中 Paginable
    • getPrePage

      public int getPrePage()
      上一页页码
      指定者:
      getPrePage 在接口中 Paginable
    • setTotalCount

      public void setTotalCount(int totalCount)
      if totalCount 小于 0 then totalCount=0
      参数:
      totalCount -
    • setPageSize

      public void setPageSize(int pageSize)
      if pageSize 小于 1 then pageSize=DEF_COUNT
      参数:
      pageSize -
    • setPageNo

      public void setPageNo(int pageNo)
      if pageNo 小于 1 then pageNo=1
      参数:
      pageNo -