package com.goafanti.core.mybatis.page;

import java.util.ArrayList;
import java.util.List;

public class Pagination<T> extends SimplePage implements java.io.Serializable, Paginable {

	private static final long serialVersionUID = 1L;
	/**
	 * 当前页的数据
	 */
	private List<?> list = new ArrayList<>();

	public Pagination() {
	}

	public Pagination(int pageNo, int pageSize, int totalCount) {
		super(pageNo, pageSize, totalCount);
	}

	public Pagination(int pageNo, int pageSize, int totalCount, List<?> list) {
		super(pageNo, pageSize, totalCount);
		this.list = list;
	}

	public int getFirstResult() {
		return (pageNo - 1) * pageSize;
	}

	public List<?> getList() {
		return list;
	}

	public void setList(List<?> list) {
		this.list = list;
	}

}
