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);
}
}

相关文章

最新评论