Java返回分页结果集的封装代码实例
人气:0这篇文章主要介绍了java返回分页结果集的封装代码实例,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
代码如下
package com.leyou.common; import java.util.List; public class PageResult<T> { private long total;//总条数 private Integer totalPage;//总页数 private List<T> list; public PageResult() { } public PageResult(long total, List<T> list) { this.total = total; this.list = list; } public PageResult(long total, Integer totalPage, List<T> list) { this.total = total; this.totalPage = totalPage; this.list = list; } public long getTotal() { return total; } public void setTotal(long total) { this.total = total; } public Integer getTotalPage() { return totalPage; } public void setTotalPage(Integer totalPage) { this.totalPage = totalPage; } public List<T> getList() { return list; } public void setList(List<T> list) { this.list = list; } }
结果
您可能感兴趣的文章:
加载全部内容