分页工具类
package com.java.activiti.util;
import java.util.List;/** 分頁工具類*/
public class PageInfo<T> {public Integer pageSize = 5;private Integer count;// 總記錄數private List<T> pageList;// 當前頁的記錄集合private Integer pageIndex;// 當前頁號private Integer totalPages;// 總頁數public Integer getPageSize() {return pageSize;}public void setPageSize(Integer pageSize) {this.pageSize = pageSize;}public Integer getCount() {return count;}public void setCount(Integer count) {this.count = count;}public List<T> getPageList() {return pageList;}public void setPageList(List<T> pageList) {this.pageList = pageList;}public Integer getPageIndex() {return pageIndex;}public void setPageIndex(Integer pageIndex) {this.pageIndex = pageIndex;}public Integer getTotalPages() {this.totalPages = this.count / this.pageSize;if (this.count % this.pageSize != 0)this.totalPages++;return this.totalPages;}}
?
轉載于:https://www.cnblogs.com/minxiaofei/p/10102235.html
總結
- 上一篇: Quartz.Net进阶之四:CronT
- 下一篇: Java提高班(六)反射和动态代理(JD