📄 actiondaoimpl.java
字号:
package com.wxd.common.popedom.persistence.dao;
import java.util.List;
import java.util.Map;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import com.wxd.common.popedom.persistence.entity.Action;
public class ActionDaoImpl extends HibernateDaoSupport implements ActionDao {
public void save(Action action){
this.getHibernateTemplate().saveOrUpdate(action);
}
public void delete(Action action){
this.getHibernateTemplate().delete(action);
}
public Action getActionFromId(int actionId) {
return (Action)getSession().createQuery("from Action action where action.id=:id").setInteger("id", new Integer(actionId)).uniqueResult();
}
public Action getActionFromName(String actionName) {
return (Action)getSession().createQuery("from Action action where action.actionView=:name").setString("name", actionName).uniqueResult();
}
public List getAllActions() {
return this.getHibernateTemplate().loadAll(Action.class);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -