package c20.dao;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import c20.entity.Article;
import c20.helper.PageBean;
import c20.helper.PageResult;
public class ArticleDao extends PageSupport {
/**
* 日志操作对象
*/
private static final Log log = LogFactory.getLog(ArticleDao.class);
public List getArticles(){
log.debug("finding Article instance all");
try {
String queryString = "from Article as model order by model.articleNo desc";
return getHibernateTemplate().find(queryString);
} catch (RuntimeException re) {
log.error("find all failed", re);
throw re;
}
}
public PageResult getArticles(PageBean pageBean){
log.debug("finding getArticles instance all");
try {
String queryString = "from Article as model order by model.articleNo desc";
return this.getPageTemplate().find(queryString, pageBean);
} catch (RuntimeException re) {
log.error("find all failed", re);
throw re;
}
}
public void addArticle(Article article){
getHibernateTemplate().save(article);
}
public void modArticle(Article article){
getHibernateTemplate().update(article);
}
public void delArticle(Article article){
getHibernateTemplate().delete(article);
}
public Article getArticle(Integer articleNo){
log.debug("get Article instance by articleNo:" + articleNo);
try {
return (Article)getHibernateTemplate().get(Article.class, articleNo);
} catch (RuntimeException re) {
log.error("get by articleNo failed", re);
throw re;
}
}
public List findByArticleName(String name){
log.debug("findByArticleName name:" + name);
try {
String queryString = "from Article as model where model.name=? order by model.articleNo desc";
return getHibernateTemplate().find(queryString, name);
} catch (RuntimeException re) {
log.error("findByArticleName failed", re);
throw re;
}
}
public List findByArticleUser(int userNo){
log.debug("findByArticleUser userNo:" + userNo);
try {
String queryString = "from Article as model where model.userNo=? order by model.articleNo desc";
return getHibernateTemplate().find(queryString, new Integer(userNo));
} catch (RuntimeException re) {
log.error("findByArticleUser failed", re);
throw re;
}
}
public PageResult findArticleByUser(int userNo, PageBean pageBean){
log.debug("findByArticleUser userNo:" + userNo);
try {
String queryString = "from Article as model where model.userNo=? order by model.articleNo desc";
return getPageTemplate().find(queryString, new Integer(userNo), pageBean);
} catch (RuntimeException re) {
log.error("findByArticleUser failed", re);
throw re;
}
}
public PageResult findArticleByUserAndState(int userNo, int state, PageBean pageBean){
log.debug("findByArticleUser userNo:" + userNo);
try {
String queryString = "from Article as model where model.userNo=? and model.state=? order by model.articleNo desc";
return getPageTemplate().find(queryString, new Object[]{new Integer(userNo), new Integer(state)}, pageBean);
} catch (RuntimeException re) {
log.error("findByArticleUser failed", re);
throw re;
}
}
public PageResult findArticleByState(int state, PageBean pageBean){
log.debug("findArticleByState state:" + state);
try {
String queryString = "from Article as model where model.state=? order by model.articleNo desc";
return getPageTemplate().find(queryString, new Integer(state), pageBean);
} catch (RuntimeException re) {
log.error("findArticleByState failed", re);
throw re;
}
}
public PageResult findArticleByAuditState(String auditState, PageBean pageBean){
log.debug("findArticleByAuditState auditState:" + auditState);
try {
String queryString = "from Article as model where model.state=? and model.auditState=? order by model.articleNo desc";
return getPageTemplate().find(queryString, new Object[]{new Integer(Article.PUBLISH), auditState}, pageBean);
} catch (RuntimeException re) {
log.error("findArticleByAuditState failed", re);
throw re;
}
}
public PageResult findArticleByType(int articleTypeNo, PageBean pageBean){
log.debug("findArticleByType articleTypeNo:" + articleTypeNo);
try {
String queryString = "from Article as model where model.articleTypeNo=? order by model.articleNo desc";
return getPageTemplate().find(queryString, new Integer(articleTypeNo), pageBean);
} catch (RuntimeException re) {
log.error("findArticleByType failed", re);
throw re;
}
}
public List findArticleByPdInstance(long piId){
log.debug("findArticleByPdInstance piId:" + piId);
try {
String queryString = "from Article as model where model.piId=? order by model.articleNo desc";
return getHibernateTemplate().find(queryString, new Long(piId));
} catch (RuntimeException re) {
log.error("findArticleByPdInstance failed", re);
throw re;
}
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
struts+hibernate+spring+jbpm智能工作流系统
共280个文件
class:73个
java:72个
jar:51个
4星 · 超过85%的资源 需积分: 9 23 下载量 195 浏览量
2009-08-17
16:57:25
上传
评论 1
收藏 19.13MB RAR 举报
温馨提示
struts+hibernate+spring+jbpm 智能工作流系统(包含构建数据库脚本和项目脚本),部署即可
资源推荐
资源详情
资源评论
收起资源包目录
struts+hibernate+spring+jbpm智能工作流系统 (280个子文件)
ArticleDao.class 6KB
MyArticlePubAction.class 5KB
UserdutyDao.class 5KB
ArticleAuditAction.class 5KB
MyArticleAddSubAction.class 5KB
ArticleAuditSubAction.class 4KB
MyArticlePubSubAction.class 4KB
ArticleTypeAddSubAction.class 4KB
LoginAction.class 4KB
UserSession.class 4KB
MyArticleListAction.class 4KB
ArticleAuditListAction.class 4KB
MyArticleAction.class 4KB
ArticleServiceImpl.class 4KB
ArticleTypeDao.class 4KB
UserAction.class 3KB
UserServiceImpl.class 3KB
MyArticleModSubAction.class 3KB
MyArticleModAction.class 3KB
UserInfoDao.class 3KB
PageBean.class 3KB
ModPassSubAction.class 3KB
UserModSubAction.class 3KB
UserModAction.class 3KB
MyArticleDelSubAction.class 3KB
UserdutyModSubAction.class 3KB
ArticleTypeModSubAction.class 3KB
UserAddSubAction.class 3KB
PageTemplateImpl.class 3KB
ArticleTypeModAction.class 3KB
ArticleTypeServiceImpl.class 3KB
UserdutyServiceImpl.class 3KB
UserdutyModAction.class 3KB
UserdutyAddSubAction.class 3KB
ConvertUtil.class 3KB
UserAddAction.class 3KB
ArticleTypeAction.class 3KB
UserdutyAction.class 3KB
ArticleTypeDelSubAction.class 2KB
UserdutyDelSubAction.class 2KB
UserDelSubAction.class 2KB
MyArticleAddAction.class 2KB
Article.class 2KB
PubActionHandler.class 2KB
AuditYesActionHandler.class 2KB
UserdutyAddAction.class 2KB
MainAction.class 2KB
MenuAction.class 2KB
LogoutAction.class 2KB
AuditFinishYesActionHandler.class 2KB
AuditFinishNoActionHandler.class 2KB
AuditNoActionHandler.class 2KB
ArticleTypeAddAction.class 2KB
PageTemplateImpl$1.class 2KB
AppInitServlet.class 2KB
UserInfo.class 1KB
GbkFilter.class 1KB
Userduty.class 1KB
UploadDeployForm.class 1KB
ArticleType.class 1005B
PageSupport.class 995B
ModPassAction.class 979B
BeanFactory.class 927B
PageResult.class 810B
ActionException.class 726B
ArticleService.class 651B
UserForm.class 581B
UserService.class 564B
NotExistActionException.class 530B
InvalidActionException.class 527B
ArticleTypeService.class 436B
UserdutyService.class 409B
PageTemplate.class 382B
.classpath 4KB
home.css 7KB
default.css 5KB
Thumbs.db 7KB
group_bg.gif 200B
lev2_head_bk01.gif 42B
menu_op_bg.gif 40B
menu_bg.gif 38B
TT.gif 36B
spring.jar 2.56MB
jboss.jar 1.95MB
hibernate3.jar 1.88MB
axis.jar 1.53MB
clover.jar 1.45MB
xercesImpl.jar 1.15MB
ant-1.6.2-stripped.jar 977KB
tomahawk.jar 877KB
jboss-common.jar 803KB
hsqldb.jar 621KB
jbpm-src-3.1.4.jar 595KB
jbpm-3.1.4.jar 589KB
jboss-jmx.jar 583KB
struts.jar 531KB
mysql-connector-java-5.0.4-bin.jar 484KB
antlr-2.7.5H3.jar 426KB
jboss-j2ee.jar 422KB
standard-1.1.2.jar 384KB
共 280 条
- 1
- 2
- 3
资源评论
- 未来纪元2012-03-22对ssh整合jbpm工作流有帮助,不过不大,而且资源分太贵
ljhlove08
- 粉丝: 3
- 资源: 13
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功