📄 emplistdao.java
字号:
package com.yiboit.hhs.daos;
import java.sql.SQLException;
import java.util.List;
import javax.sql.DataSource;
import com.yiboit.hhs.EmpBean;
import com.yiboit.hhs.db.BaseDAO;
public class EmpListDAO extends BaseDAO {
private static final String QUERY =
"select emp_id as empId, emp_name as empName, emp_sex as empSex" +
", e.dept_id as deptId, d.dept_name as deptName, salary " +
" from emp e, dept d where e.dept_id = d.dept_id";
private List empList = null;
public EmpListDAO(DataSource ds) throws SQLException {
super(ds);
}
public void databaseAccess() throws SQLException {
this.empList = super.sqlUtil.selectMulti(QUERY, null, EmpBean.class);
}
public List getEmpList() {
return empList;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -