deptinfodaoimpl.java
来自「struts的一些基本开发」· Java 代码 · 共 29 行
JAVA
29 行
package cn.com.csuinfosoft.dao.impl;
import java.util.List;
import net.sf.hibernate.HibernateException;
import net.sf.hibernate.Query;
import net.sf.hibernate.Session;
import cn.com.csuinfosoft.dao.DAOException;
import cn.com.csuinfosoft.dao.DeptInfoDAO;
import cn.com.csuinfosoft.hibernate.HibernateHelper;
public class DeptInfoDAOImpl implements DeptInfoDAO {
public List queryDeptInfo() throws DAOException {
Session session = HibernateHelper.getSessionObject();
List result = null;
try {
Query query = session.createQuery("from DeptInfoVO");
result = query.list();
} catch (HibernateException e) {
throw new DAOException(e);
}
return result;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?