PageResult.java 1.41 KB
package com.dituhui.pea.common;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;


/**
 * 分页结果返回
 */
public class PageResult<E> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 当前页
     */
    public int currPage = 0;

    /**
     * 总共页数
     */
    public int totalPage = 0;

    /**
     * 总记录数
     */
    public long recordCount = 0;

    /**
     * 数据明细
     */
    public List<E> dataList = new ArrayList<E>();

    public PageResult() {
    }

    public PageResult(int currPage, List<E> dataList, long recordCount, int totalPage) {
        this.currPage = currPage;
        this.dataList = dataList;
        this.recordCount = recordCount;
        this.totalPage = totalPage;
    }

    public int getCurrPage() {
        return currPage;
    }

    public void setCurrPage(int currPage) {
        this.currPage = currPage;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public long getRecordCount() {
        return recordCount;
    }

    public void setRecordCount(long recordCount) {
        this.recordCount = recordCount;
    }

    public List<E> getDataList() {
        return dataList;
    }

    public void setDataList(List<E> dataList) {
        this.dataList = dataList;
    }
}