studentdao.java
来自「Hibernate开发及整合应用大全 蔡雪焘编著 本书用典型的示例剖析Hiber」· Java 代码 · 共 30 行
JAVA
30 行
package model.dao;
import model.Student;
import model.base.BaseStudentDAO;
import net.sf.hibernate.HibernateException;
/**
* This class has been automatically generated by Hibernate Synchronizer. For
* more information or documentation, visit The Hibernate Synchronizer page at
* http://www.binamics.com/hibernatesync or contact Joe Hudson at
* joe@binamics.com.
*
* This is the object class that relates to the student table. Any
* customizations belong here.
*/
public class StudentDAO extends BaseStudentDAO {
public static void main(String args[]) {
try {
_RootDAO.initialize();
StudentDAO dao = new StudentDAO();
Student stu = new Student();
stu.setStuName("tomclus");
stu.setCardId("123456");
dao.save(stu);
} catch (HibernateException e) {
e.printStackTrace();
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?