⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pageform.java

📁 网上购物系统struts+spring+hibernate实现
💻 JAVA
字号:
package com.sdi0708.bdifn.bookstore.service.util;public class PageForm {		/**	 * 当前页码	 */	private int currentPage;	/**	 * 每页的记录数	 */	private int pageSize;	/**	 * 总页数	 */	private int totalPage;	/**	 * 总记录数	 */	private int recordCount;	/**	 * 是否显示首页(当已是首页了,设为false)	 *///	private boolean hasFirstPage;//	/**//	 * 是否有下一页 (当前页已是最后一页了,为false)//	 *///	private boolean hasNextPage;//	/**//	 * 是否有上一页//	 *///	private boolean hasPrePage;//	/**//	 * 是否有下一页//	 *///	private boolean hasLastPage;	/**	 * 初始化	 * @param pageSize 每面记录数	 * @param recordCount 总记录数	 */	public void init(int pageSize, int recordCount) {		this.pageSize = pageSize;		this.recordCount = recordCount;			currentPage = 1;		this.totalPage = (recordCount + pageSize - 1) / pageSize;	}		public int getCurrentPage() {		return currentPage;	}	public void setCurrentPage(int currentPage) {		this.currentPage = currentPage;	}	public int getPageSize() {		return pageSize;	}	public void setPageSize(int pageSize) {		this.pageSize = pageSize;	}	public int getRecordCount() {		return recordCount;	}	public void setRecordCount(int recordCount) {		this.recordCount = recordCount;	}	public int getTotalPage() {		return totalPage;	}	public boolean isHasFirstPage() {		return this.currentPage != 1;	}	public boolean isHasNextPage() {		return this.currentPage < this.totalPage;	}	public boolean isHasPrePage() {		return this.currentPage > 1;	}	public boolean isHasLastPage() {		return this.currentPage < this.totalPage;	}}

⌨️ 快捷键说明

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