⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 actiondaoimpl.java

📁 jsf+spring+ibatis 的一个程序,主要用来介绍JSF程序.
💻 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 + -