![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hibernate
賣逗逗
现在主要从事spark推荐系统方面开发学习
展开
-
hibernate缓存的使用
缓存的使用我们先来模拟一个缓存的机制以查询学生为示例:public class Test {public static void main(String[] args) throws Exception { MyClassDao myClassDao = new MyClassDao(); StudentDao studentDao = new StudentD转载 2013-09-05 16:49:53 · 860 阅读 · 0 评论 -
Struts+Spring+Hibernate处理Lob(Blob,Clob)
在使用struts+spring+hibernate的开发中,有些时候用户会有数据库存储文件的需求,在数据库中一般会采用Blob字段或Clob字段来存储二进制图片、流媒体或文件。现就将在实际开发中遇到的问题及解决方法告之。一、问题需求: 1.在持久化类中字段该用什么类型? 2.在Struts中文件对应的数据类型是什么? 3.在Hibernate中字段对应的类型是什么? 4.转载 2013-09-05 16:52:44 · 910 阅读 · 0 评论 -
hibernate执行sql
1.执行sql,返回一个结果集,适用查询一个字段并返回一条记录 Java代码 public Long findSeqTbTest() { String sql = "select SEQ_TB_TEST.nextval from dual"; SQLQuery query = this.getSession().createSQLQuery转载 2014-01-17 10:49:54 · 717 阅读 · 0 评论