資源簡介
ssh三大框架,三層架構 整合測試!完整分頁代碼,JdbcTemplate等測試,存儲過程調用,留著以后復習吧,
代碼片段和文件信息
package?acc.util;
import?java.util.List;
import?accp.bean.Fuck;
public?class?PageBean?{
private?int?totalCount;//總記錄數
private?int?currentPage;//當前頁
private?int?pageSize;?//第頁顯示的條數
private?int?totalPage;//總頁數
private?String?orader;?//排序
private?int?startIndex;?//顯示的頁碼??
/**?
?????*?起始顯示頁數?
?????*?@return?
?????*/??
????public?int?getStartIndex()?{??
????????for(int?i=1;i<=this.getTotalPage();i+=8){??
????????????if(this.getCurrentPage()>=i&&this.getCurrentPage()????????????????startIndex=i;??
????????????????break;??
????????}??
????????}??
????????return?startIndex;??
????}??
public?String?getOrader()?{
return?orader;
}
public?void?setOrader(String?orader)?{
this.orader?=?orader;
}
public?int?getTotalCount()?{
return?totalCount;
}
public?void?setTotalCount(int?totalCount)?{
this.totalCount?=?totalCount;
}
public?int?getCurrentPage()?{
return?currentPage;
}
public?void?setCurrentPage(int?currentPage)?{
//如果當前頁大于總頁數
if(this.getTotalPage() currentPage?=?this.totalPage;
}
if(0>=currentPage){
currentPage=1;
}
this.currentPage?=?currentPage;
}
public?int?getPageSize()?{
if(pageSize<=0){
pageSize=5;
}
return?pageSize;
}
public?void?setPageSize(int?pageSize)?{
this.pageSize?=?pageSize;
}
//得到總頁數?根據總行數
public?int?getTotalPage()?{
//總頁數
int?temp;
totalPage=(temp=(totalCount%pageSize))==0
?totalCount/pageSize
????:totalCount/pageSize+1;
????return?totalPage;
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????6859??2013-07-15?23:48??SSHnew\.classpath
?????文件????????541??2013-07-09?18:14??SSHnew\.myhibernatedata
?????文件????????291??2013-07-05?09:41??SSHnew\.myme
?????文件????????240??2013-07-05?09:44??SSHnew\.mystrutsdata
?????文件???????2242??2013-07-05?10:31??SSHnew\.project
?????文件????????500??2013-07-05?09:41??SSHnew\.settings\.jsdtscope
?????文件????????395??2013-07-05?09:41??SSHnew\.settings\org.eclipse.jdt.core.prefs
?????文件????????456??2013-07-05?09:41??SSHnew\.settings\org.eclipse.wst.common.component
?????文件????????252??2013-07-05?09:41??SSHnew\.settings\org.eclipse.wst.common.project.facet.core.xm
?????文件?????????49??2013-07-05?09:41??SSHnew\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件??????????6??2013-07-05?09:41??SSHnew\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????文件????????462??2013-07-05?10:19??SSHnew\.springBeans
?????文件????????426??2013-07-09?18:14??SSHnew\hibernate.reveng.xm
?????文件???????1658??2013-07-15?23:50??SSHnew\src\acc\util\PageBean.java
?????文件???????4182??2013-07-15?23:26??SSHnew\src\accp\action\UserAction.java
?????文件????????912??2013-07-09?18:17??SSHnew\src\accp\bean\Fuck.hbm.xm
?????文件????????951??2013-07-09?18:15??SSHnew\src\accp\bean\Fuck.java
?????文件???????8052??2013-07-15?23:59??SSHnew\src\accp\dao\imple\UserDaoImple.java
?????文件????????452??2013-07-15?21:30??SSHnew\src\accp\dao\UserDao.java
?????文件????????359??2013-07-12?15:26??SSHnew\src\accp\procTest\GenreMapper.java
?????文件???????1714??2013-07-12?15:13??SSHnew\src\accp\procTest\TestStoredProcedure.java
?????文件????????779??2013-07-12?16:21??SSHnew\src\accp\procTest\ti
?????文件???????2022??2013-07-12?15:59??SSHnew\src\accp\procTest\ti
?????文件???????1485??2013-07-12?16:53??SSHnew\src\accp\procTest\ti
?????文件???????1288??2013-07-15?21:30??SSHnew\src\accp\service\imple\ServiceImple.java
?????文件????????458??2013-07-15?21:30??SSHnew\src\accp\services\UserService.java
?????文件???????4388??2013-07-15?12:24??SSHnew\src\applicationContext.xm
?????文件????????800??2013-07-15?23:51??SSHnew\src\struts.xm
?????文件???????1291??2013-07-15?23:55??SSHnew\WebRoot\index.jsp
?????文件?????????36??2013-07-05?09:41??SSHnew\WebRoot\me
............此處省略133個文件信息
- 上一篇:最簡單的基于FFMPEG的AVDevice的 1.2
- 下一篇:巴巴運動網完整源代碼
評論
共有 條評論