datapackage.java

来自「OBPM是一个开源」· Java 代码 · 共 74 行

JAVA
74
字号
package cn.myapps.base.dao;

import java.io.Serializable;
import java.util.Collection;

/**
 * Data package, usually use in the list.
 */
public class DataPackage implements Serializable {
	private static final long serialVersionUID = -3847321538691386074L;

	public int rowCount;

	public int linesPerPage;

	public int pageNo;

	public Collection datas;
	/**
	 * @return Returns the datas.
	 */
	public Collection getDatas() {
		return datas;
	}
	/**
	 * @param datas The datas to set.
	 */
	public void setDatas(Collection datas) {
		this.datas = datas;
	}
	/**
	 * @return Returns the linesPerPage.
	 */
	public int getLinesPerPage() {
		return linesPerPage;
	}
	/**
	 * @param linesPerPage The linesPerPage to set.
	 */
	public void setLinesPerPage(int linesPerPage) {
		this.linesPerPage = linesPerPage;
	}
	/**
	 * @return Returns the pageNo.
	 */
	public int getPageNo() {
		return pageNo;
	}
	/**
	 * @param pageNo The pageNo to set.
	 */
	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}
	/**
	 * @return Returns the rowCount.
	 */
	public int getRowCount() {
		return rowCount;
	}
	/**
	 * @param rowCount The rowCount to set.
	 */
	public void setRowCount(int rowCount) {
		this.rowCount = rowCount;
	}
	/**
	 * Return the total page number
	 * @return The total page number.
	 */
	public int getPageCount() {
		return (int) Math.ceil((double) rowCount / (double) linesPerPage);
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?