码迷,mamicode.com
首页 > 编程语言 > 详细

java返回分页结果集的封装

时间:2020-01-04 22:26:17      阅读:253      评论:0      收藏:0      [点我收藏+]

标签:mamicode   src   private   result   ret   image   package   etl   com   

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返回分页结果集的封装

标签:mamicode   src   private   result   ret   image   package   etl   com   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!