类 SimplePage
- java.lang.Object
-
- cn.wizzer.framework.page.SimplePage
-
- 所有已实现的接口:
Paginable,Serializable
- 直接已知子类:
Pagination
public class SimplePage extends Object implements Serializable, Paginable
- 另请参阅:
- 序列化表格
-
-
字段概要
字段 修饰符和类型 字段 说明 static intDEF_COUNTprotected intpageNoprotected intpageSizeprotected inttotalCount
-
构造器概要
构造器 构造器 说明 SimplePage()SimplePage(int pageNo, int pageSize, int totalCount)构造器
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 voidadjustPageNo()调整页码,使不超过最大页数static intcpn(Integer pageNo)检查页码 checkPageNointgetNextPage()下一页页码intgetPageNo()获得页码intgetPageSize()每页几条数据intgetPrePage()上一页页码List<Integer>getSegment()intgetTotalCount()总共几条数据intgetTotalPage()总共几页booleanisFirstPage()是否第一页booleanisLastPage()是否最后一页voidsetPageNo(int pageNo)if pageNo 小于 1 then pageNo=1voidsetPageSize(int pageSize)if pageSize 小于 1 then pageSize=DEF_COUNTvoidsetTotalCount(int totalCount)if totalCount 小于 0 then totalCount=0
-
-
-
字段详细资料
-
DEF_COUNT
public static final int DEF_COUNT
- 另请参阅:
- 常量字段值
-
totalCount
protected int totalCount
-
pageSize
protected int pageSize
-
pageNo
protected int pageNo
-
-
方法详细资料
-
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()
调整页码,使不超过最大页数
-
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-
-
-