?? votetopicdaoimpl.java
字號:
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 + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -