All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dream.system.config.Page Maven / Gradle / Ivy

package com.dream.system.config;

import java.util.Collection;

public class Page {
    private int pageNum;
    private int pageSize;
    private long total;
    private Collection rows;

    public Page() {
        this(1, Integer.MAX_VALUE);
    }

    public Page(int pageNum, int pageSize) {
        this(pageNum, pageSize, 0);
    }

    public Page(int pageNum, int pageSize, long total) {
        this.pageNum = pageNum;
        this.pageSize = pageSize;
        this.total = total;
    }

    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getPageSize() {
        return pageSize;
    }

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

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public Collection getRows() {
        return rows;
    }

    public void setRows(Collection rows) {
        this.rows = rows;
    }

    public long getStartRow() {
        return (pageNum - 1) * pageSize;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy