欢迎来到天天文库
浏览记录
ID:37512524
大小:126.50 KB
页数:21页
时间:2019-05-24
《SSH实现分页的两个例子》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、先是一个page的bean:packagecom.leatherstore.other;publicclassPage{/**是否有上一页*/privatebooleanhasPrePage;/**是否有下一页*/privatebooleanhasNextPage;/**每页的数量*/privateinteveryPage;/**总页数*/privateinttotalPage;/**当前页*/privateintcurrentPage;/**起始点*/privateintbeginIndex;/**总记录数*/private
2、inttotalCount;/***@returntotalCount*/publicintgetTotalCount(){returntotalCount;}/***@paramtotalCount要设置的totalCount*/publicvoidsetTotalCount(inttotalCount){this.totalCount=totalCount;}/**Thedefaultconstructor*/publicPage(){}/**constructthepagebyeveryPage*@parameveryP
3、age**/publicPage(inteveryPage){this.everyPage=everyPage;}/**Thewholeconstructor*/publicPage(booleanhasPrePage,booleanhasNextPage,inteveryPage,inttotalPage,intcurrentPage,intbeginIndex,inttotalCount){this.hasPrePage=hasPrePage;this.hasNextPage=hasNextPage;this.everyP
4、age=everyPage;this.totalPage=totalPage;this.currentPage=currentPage;this.beginIndex=beginIndex;this.totalCount=totalCount;}/***@return*ReturnsthebeginIndex.*/publicintgetBeginIndex(){returnbeginIndex;}/***@parambeginIndex*ThebeginIndextoset.*/publicvoidsetBeginIndex
5、(intbeginIndex){this.beginIndex=beginIndex;}/***@return*ReturnsthecurrentPage.*/publicintgetCurrentPage(){returncurrentPage;}/***@paramcurrentPage*ThecurrentPagetoset.*/publicvoidsetCurrentPage(intcurrentPage){this.currentPage=currentPage;}/***@return*Returnstheever
6、yPage.*/publicintgetEveryPage(){returneveryPage;}/***@parameveryPage*TheeveryPagetoset.*/publicvoidsetEveryPage(inteveryPage){this.everyPage=everyPage;}/***@return*ReturnsthehasNextPage.*/publicbooleangetHasNextPage(){returnhasNextPage;}/***@paramhasNextPage*ThehasN
7、extPagetoset.*/publicvoidsetHasNextPage(booleanhasNextPage){this.hasNextPage=hasNextPage;}/***@return*ReturnsthehasPrePage.*/publicbooleangetHasPrePage(){returnhasPrePage;}/***@paramhasPrePage*ThehasPrePagetoset.*/publicvoidsetHasPrePage(booleanhasPrePage){this.hasP
8、rePage=hasPrePage;}/***@returnReturnsthetotalPage.**/publicintgetTotalPage(){returntotalPage;}/***@paramtotalPage*ThetotalPagetoset.*/publ
此文档下载收益归作者所有