public void setPageSize(int pageSize) {
if(pageSize>0) this.pageSize = pageSize; } public int getRecordCount() { return recordCount; } public void setRecordCount(int recordCount) { if(recordCount>0){ this.recordCount = recordCount; this.setTotalPageCountByRs(); } } //设置总页数 private void setTotalPageCountByRs(){ if(this.recordCount%this.pageSize==0) this.totalPageCount=this.recordCount/this.pageSize; else if(this.recordCount%this.pageSize>0) this.totalPageCount=this.recordCount/this.pageSize+1; else this.totalPageCount=0; } //得到开始记录数 public int getStartRow(){ return (currPageNo - 1) * pageSize + 1; } //得到结束记录数 public int getEndRow(){ return currPageNo * pageSize; }}