📄 deptinfodaoimpl.java
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -