?? 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;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -