问题描述
三个框架的分页
解决方案
解决方案二:
publicListget*****(intpageNO){DetachedCriteriadc=DetachedCriteria.forClass(****.class);Listlist=*****Dao.getList(dc,pageNO,15);inta=0;if(list.equals(null)){a=1;}returnlist;}publicPageBeangetBean(intpageNO){*****jg;DetachedCriteriadc=DetachedCriteria.forClass(*****.class);PageBeanpb=collegeDao.getPageBean(dc,pageNO,15);returnpb;}packagecom.sy.util;importjava.util.List;@SuppressWarnings("unchecked")publicclassPage{privateintpageSize;privateinttotalPage;privateintrowCount;privateintcurrentPage;privateintprePage;privateintnextPage;privatebooleanhasNextPage;privatebooleanhasPreviousPage;privateListlist;publicPage(){this.pageSize=10;}publicintgetPageSize(){returnpageSize;}publicvoidsetPageSize(intpageSize){this.pageSize=pageSize;}publicintgetTotalPage(){returntotalPage;}publicvoidsetTotalPage(inttotalPage){this.totalPage=totalPage;}publicintgetRowCount(){returnrowCount;}publicvoidsetRowCount(introwCount){this.rowCount=rowCount;}publicintgetCurrentPage(){returncurrentPage;}publicvoidsetCurrentPage(intcurrentPage){this.currentPage=currentPage;}publicintgetPrePage(){returnprePage;}publicvoidsetPrePage(intprePage){this.prePage=prePage;}publicintgetNextPage(){returnnextPage;}publicvoidsetNextPage(intnextPage){this.nextPage=nextPage;}publicbooleanisHasNextPage(){returnhasNextPage;}publicvoidsetHasNextPage(booleanhasNextPage){this.hasNextPage=hasNextPage;}publicbooleanisHasPreviousPage(){returnhasPreviousPage;}publicvoidsetHasPreviousPage(booleanhasPreviousPage){this.hasPreviousPage=hasPreviousPage;}publicListgetList(){returnlist;}publicvoidsetList(Listlist){this.list=list;}}