文件名称:编写操作类-hibernate框架详解
文件大小:4.94MB
文件格式:PPT
更新时间:2024-05-16 03:14:20
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(); } }