先是一個(gè)page的bean:
package com.leatherstore.other;
public class Page {
// 是否有上一頁(yè)
private boolean hasPrePage;
//是否有下一頁(yè)
private boolean hasNextPage;
// 每頁(yè)的數(shù)量
private int everyPage;
// 總頁(yè)數(shù)
private int totalPage;
//當(dāng)前頁(yè)
private int currentPage;
// 起始點(diǎn)
private int beginIndex;
// 總記錄數(shù)
private int totalCount;
//@return totalCount
public int getTotalCount() {
return totalCount;
}
//@param totalCount 要設(shè)置的 totalCount
public void setTotalCount(int totalCount) {
this.totalCount = totalCount;
}
//The default constructor
public Page(){
}
// construct the page by everyPage
public Page(int everyPage){
this.everyPage = everyPage;
}
//The whole constructor
public Page(boolean hasPrePage, boolean hasNextPage,
int everyPage, int totalPage,
int currentPage, int beginIndex,int totalCount) {
this.hasPrePage = hasPrePage;
this.hasNextPage = hasNextPage;
this.everyPage = everyPage;
this.totalPage = totalPage;
this.currentPage = currentPage;
this.beginIndex = beginIndex;
this.totalCount = totalCount;
}
public int getBeginIndex() {
return beginIndex;
}
public void setBeginIndex(int beginIndex) {
this.beginIndex = beginIndex;
}
public int getCurrentPage() {