struts2+spring+hibernate分页代码[比较多]第3/7页
更新时间:2008年09月27日 15:27:36 作者:
J2EE系统中分页显示,修改dao层,service层,action层,两个分页类文件,代码如下
实现类:
Java代码
复制代码 代码如下:
package com.last999.im.news.service.impl;
import java.util.List;
import com.last999.im.news.web.PageTool;
import com.last999.im.news.entity.KindEntity;
import com.last999.im.news.service.KindEntityManage;
import com.last999.im.news.dao.KindEntityDao;
public class KindEntityManageImpl implements KindEntityManage{
private KindEntityDao kindEntityDao;
public KindEntityDao getKindEntityDao(){
return this.kindEntityDao;
}
public void setKindEntityDao(KindEntityDao kindEntityDao) {
this.kindEntityDao=kindEntityDao;
}
public void addKindEntity(KindEntity kindEntity){
this.getKindEntityDao().save(kindEntity);
}
public List findAllKind(){
return this.getKindEntityDao().findAll();
}
public int getRows(){
return this.getKindEntityDao().getRows();
}
public List getKindEntity(PageTool pageInfo){
return this.getKindEntityDao().getKindEntity(pageInfo);
}
}
复制代码 代码如下:
package com.last999.im.news.service.impl;
import java.util.List;
import com.last999.im.news.web.PageTool;
import com.last999.im.news.entity.KindEntity;
import com.last999.im.news.service.KindEntityManage;
import com.last999.im.news.dao.KindEntityDao;
public class KindEntityManageImpl implements KindEntityManage{
private KindEntityDao kindEntityDao;
public KindEntityDao getKindEntityDao(){
return this.kindEntityDao;
}
public void setKindEntityDao(KindEntityDao kindEntityDao) {
this.kindEntityDao=kindEntityDao;
}
public void addKindEntity(KindEntity kindEntity){
this.getKindEntityDao().save(kindEntity);
}
public List findAllKind(){
return this.getKindEntityDao().findAll();
}
public int getRows(){
return this.getKindEntityDao().getRows();
}
public List getKindEntity(PageTool pageInfo){
return this.getKindEntityDao().getKindEntity(pageInfo);
}
}
您可能感兴趣的文章:
- struts+spring+hibernate三个框架的整合
- 详解JAVAEE——SSH三大框架整合(spring+struts2+hibernate)
- Spring集成Struts与Hibernate入门详解
- struts2.3.24+spring4.1.6+hibernate4.3.11+mysql5.5.25开发环境搭建图文教程
- SSH框架网上商城项目第1战之整合Struts2、Hibernate4.3和Spring4.2
- Spring,hibernate,struts经典面试笔试题(含答案)
- Hibernate+Spring+Struts扩展Struts
- Spring+Hibernate+Struts(SSH)框架整合实战
相关文章
Hibernate save() saveorupdate()的用法
在Hibernate中,最核心的概念就是对PO的状态管理。2008-11-11经常听朋友说什么J2EE,终于知道点什么是J2EE了,汗一个
经常听朋友说什么J2EE,终于知道点什么是J2EE了,汗一个...2007-12-12
最新评论