public class MPager extends Object implements PageInfo, Serializable
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
DEFAULT_PAGE_SIZE
改变这个,当每页大小超过 MAX_FETCH_SIZE 时,这个将是默认的 fetchSize
|
static int |
MAX_FETCH_SIZE
ResultSet 最大的 fetch size
|
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getOffset() |
int |
getPageCount() |
int |
getPageNumber() |
int |
getPageSize() |
int |
getRecordCount() |
boolean |
hasNext() |
boolean |
hasPrevious() |
boolean |
isFirst() |
boolean |
isLast() |
MPager |
resetPageCount() |
MPager |
setPageNumber(int pn)
设置页码
|
MPager |
setPageSize(int pageSize)
设置一页可以有多少条记录
|
MPager |
setRecordCount(int recordCount)
设置整个查询一共有多少条记录
|
String |
toString() |
public static int DEFAULT_PAGE_SIZE
public static int MAX_FETCH_SIZE
public MPager()
public MPager(int pageNumber)
public MPager(int pageNumber,
int pageSize)
public MPager resetPageCount()
public int getPageCount()
getPageCount 在接口中 PageInfopublic int getPageNumber()
getPageNumber 在接口中 PageInfopublic int getPageSize()
getPageSize 在接口中 PageInfopublic int getRecordCount()
getRecordCount 在接口中 PageInfopublic MPager setPageNumber(int pn)
PageInfosetPageNumber 在接口中 PageInfopn - 页数public MPager setPageSize(int pageSize)
PageInfosetPageSize 在接口中 PageInfopageSize - 一页可以有多少条记录public MPager setRecordCount(int recordCount)
PageInfosetRecordCount 在接口中 PageInforecordCount - 总记录数public boolean hasPrevious()
hasPrevious 在接口中 PageInfoCopyright © 2022. All rights reserved.