📄 studentdaoi.java
字号:
package com.yumeng.ssidemo.dao;
import java.sql.SQLException;
import java.util.List;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import com.yumeng.ssidemo.po.Student;
public class StudentDAOI extends SqlMapClientDaoSupport implements StudentDAO {
public void deleteStudent(int id) throws SQLException {
getSqlMapClientTemplate().delete("deleteStudent", id);
}
public void insertStudent(Student student) throws SQLException {
getSqlMapClientTemplate().insert("insertStudent",student);
}
public void updateStudent(Student student) throws SQLException {
getSqlMapClientTemplate().update("updateStudent", student);
}
public List selectAllStudent() throws SQLException {
return getSqlMapClientTemplate().queryForList("selectStudent");
}
public Student selectStudentById(int id) throws SQLException {
return (Student)getSqlMapClientTemplate().queryForObject("selectStudentById", id);
}
public Student selectStudentByName(String name) throws SQLException {
return (Student)getSqlMapClientTemplate().queryForObject("selectStudentByName", name);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -