【文件属性】:
文件名称:编写操作类-hibernate框架详解
文件大小:4.94MB
文件格式:PPT
更新时间:2021-04-26 09:27:40
hibernate
6、编写操作类
package com.cn.dao;
import com.cn.util.*;
import com.cn.vo.*;
public class Detaildao {
public Detail findUserById(Integer id) {
Session s = null;
try {
s = HibernateUitl.getSession();
Detail user =(Detail)s.get(Detail.class, id);
return user;
} finally {
if (s != null)
s.close();
}
}