?? deptlistdao.java
字號:
package com.yiboit.hhs.daos;
import java.sql.SQLException;
import java.util.List;
import javax.sql.DataSource;
import com.yiboit.hhs.DeptBean;
import com.yiboit.hhs.db.BaseDAO;
public class DeptListDAO extends BaseDAO {
private static final String QUERY = "select dept_id as deptId, dept_name as deptName from dept";
private List deptList;
public DeptListDAO(DataSource ds) throws SQLException {
super(ds);
}
@Override
public void databaseAccess() throws SQLException {
try {
deptList = super.sqlUtil.selectMulti(QUERY, null, DeptBean.class);
} finally {
super.sqlUtil.close();
}
}
public List getDeptList() {
return this.deptList;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -