T
- 结果集项的类型public class PageResult<T> extends ArrayList<T>
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PAGE_SIZE |
modCount
Constructor and Description |
---|
PageResult()
构造
|
PageResult(int page,
int pageSize)
构造
|
PageResult(int page,
int pageSize,
int total)
构造
|
Modifier and Type | Method and Description |
---|---|
int |
getPage()
页码,0表示第一页
|
int |
getPageSize() |
int |
getTotal() |
int |
getTotalPage() |
boolean |
isFirst() |
boolean |
isLast() |
void |
setPage(int page)
设置页码,0表示第一页
|
void |
setPageSize(int pageSize)
设置每页结果数
|
void |
setTotal(int total)
设置总数
|
void |
setTotalPage(int totalPage)
设置总页数
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
parallelStream, stream
public static final int DEFAULT_PAGE_SIZE
public PageResult()
public PageResult(int page, int pageSize)
page
- 页码,0表示第一页pageSize
- 每页结果数public PageResult(int page, int pageSize, int total)
page
- 页码,0表示第一页pageSize
- 每页结果数total
- 结果总数public int getPage()
public void setPage(int page)
page
- 页码public int getPageSize()
public void setPageSize(int pageSize)
pageSize
- 每页结果数public int getTotalPage()
public void setTotalPage(int totalPage)
totalPage
- 总页数public int getTotal()
public void setTotal(int total)
total
- 总数public boolean isFirst()
public boolean isLast()
Copyright © 2024. All rights reserved.