pageinfo.java

来自「esri的ArcGIS Server超级学习模板程序(for java)」· Java 代码 · 共 60 行

JAVA
60
字号
/**
 * 
 */
package com.esri.solutions.jitk.personalization.dao;

/**
 * @author Susan Herdina
  * @version 1.0
 * @created 07-Dec-2007 11:20:47 AM
 * 
 * This class contains information used for paging through records in a database. The page index and page 
 * size are set, then the PageInfo is passed to the DAOs and only the records for the specified index and 
 * page size will be returned in the selection set.
 */
public class PageInfo {
	
	/**
	 * The desired page to return in the selection set when moving forward and backward 
	 * through a selected set of records.
	 */
	private int pageIndex = 0;
	
	/**
	 * The number of records to return in the selection set.
	 */
	private int pageSize = 10;
	
	/**
	 * 
	 * @return The page index that has been set.
	 */
	public int getPageIndex() {
		return pageIndex;
	}
	
	/**
	 * Set the start page for retrieving records from a selection. 
	 * @param pageIndex
	 */
	public void setPageIndex(int pageIndex) {
		this.pageIndex = pageIndex;
	}
	
	/**
	 * 
	 * @return The page size (number of records) to return from a selection.
	 */
	public int getPageSize() {
		return pageSize;
	}
	
	/**
	 * Set the size of the page (number of records) to return from a selection.
	 * @param pageSize
	 */
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}	
}

⌨️ 快捷键说明

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