首页 > 编程语言 > 详细

java返回分页结果集的封装

时间:2020-01-04 21:51:56      阅读:411      评论:0      收藏:0      [点我收藏+]
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返回分页结果集的封装

原文:https://www.cnblogs.com/yscec/p/12150426.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!