package com.iamberry.wechat.core.entity.page;

import java.io.Serializable;

/**
 * 请求的分页数据
 * @author 献
 * @company 深圳爱贝源科技有限公司
 * @website www.iamberry.com
 * @tel 18271840547
 * @date 2017/5/18
 */
public class PageRequest<T> implements Serializable {

    private static final long serialVersionUID = -6003006551112186750L;

    private T data;                   // 实例数据

    private Integer pageNO;           // 请求的页数

    private Integer pageSize;         // 每页的数据大小

    private boolean isPageTotal;      // 是否需要总的页数

    public PageRequest(T data, Integer pageNO, Integer pageSize, boolean isPageTotal) {
        this.data = data;
        this.pageNO = pageNO;
        this.pageSize = pageSize;
        this.isPageTotal = isPageTotal;
    }

    public void setData(T data) {
        this.data = data;
    }

    public void setPageNO(Integer pageNO) {
        this.pageNO = pageNO;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public void setPageTotal(boolean pageTotal) {
        isPageTotal = pageTotal;
    }

    public T getData() {
        return data;
    }

    public Integer getPageNO() {
        return pageNO;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public boolean isPageTotal() {
        return isPageTotal;
    }
}
