votetopicdaoimpl.java
来自「JEECSM是JavaEE版网站管理系统(Java Enterprise Edi」· Java 代码 · 共 24 行
JAVA
24 行
package com.jeecms.auxiliary.dao.impl;
import org.springframework.stereotype.Repository;
import com.jeecms.auxiliary.dao.VoteTopicDao;
import com.jeecms.auxiliary.entity.VoteTopic;
import com.jeecms.core.JeeCoreDaoImpl;
import com.ponyjava.common.hibernate3.Finder;
import com.ponyjava.common.page.Pagination;
@Repository
public class VoteTopicDaoImpl extends JeeCoreDaoImpl<VoteTopic> implements
VoteTopicDao {
public VoteTopic getCurrentTopic(Long webId) {
String hql = "from VoteTopic v where v.website.id=? and v.current=true and v.disabled=false order by v.id desc";
return (VoteTopic) findUnique(hql, webId);
}
public Pagination getPage(Long webId, int pageNo, int pageSize) {
String hql = "from VoteTopic bean where bean.website.id=:webId order by bean.id desc";
Finder f = Finder.create(hql).setParam("webId", webId);
return find(f, pageNo, pageSize);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?