java返回分页结果集的封装
Posted 西门夜说
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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; } }
以上是关于java返回分页结果集的封装的主要内容,如果未能解决你的问题,请参考以下文章