eduexpinfodao.java

来自「上一上传oa系统漏掉web-inf文件夹」· Java 代码 · 共 68 行

JAVA
68
字号
package com.oa.db;

import java.util.List;

import org.hibernate.HibernateException;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

public class EduexpinfoDAO extends HibernateDaoSupport{
	
	public List ByStaffbasicinfoidQueryEduexpinfo(int cd) {//通过staffbasicinfoid查找员工教育经历
		List list = null;
		try {
			list = this.getHibernateTemplate().find("from Eduexpinfo where staffbasicinfoid=?",cd);
		} catch (HibernateException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return list;
	}
	
	public void Save(Eduexpinfo vo) {// 保存员工教育经历	
		try {
			this.getHibernateTemplate().save(vo);
		} catch (HibernateException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	public List byiddeleteEduexpinfo(int cd) {//通过id删除员工教育经历
		List list = null;
		try {
			list = this.getHibernateTemplate().find("from Eduexpinfo where id=?",cd);
			if(list!=null&&list.size()!=0){
				Eduexpinfo eo = (Eduexpinfo)list.get(0);
				this.getHibernateTemplate().delete(eo);
			}
		} catch (HibernateException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return list;
	}
	
	public List byidqueryEduexpinfo(int cd) {//通过id查询员工教育经历
		List list = null;
		try {
			list = this.getHibernateTemplate().find("from Eduexpinfo where id=?",cd);
		} catch (HibernateException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return list;
	}
	
	public void UpdateEduexpinfo(Eduexpinfo vo) {// 更新教育经历	
		try {
			this.getHibernateTemplate().update(vo);
		} catch (HibernateException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?