本站首页    管理页面    写新日志    退出


«October 2025»
1234
567891011
12131415161718
19202122232425
262728293031


公告
 本博客在此声明所有文章均为转摘,只做资料收集使用。

我的分类(专题)

日志更新

最新评论

留言板

链接

Blog信息
blog名称:
日志总数:1304
评论数量:2242
留言数量:5
访问次数:7640141
建立时间:2006年5月29日




[Hibernate]使用 Hibernate 和 Spring AOP 构建泛型类型安全的 DAO
软件技术,  电脑与网络

lhwork 发表于 2006/6/12 10:01:04

由于 Java™ 5 泛型的采用,有关泛型类型安全 Data Access Object (DAO) 实现的想法变得切实可行。在本文中,系统架构师 Per Mellqvist 展示了基于 Hibernate 的泛型 DAO 实现类。然后展示如何使用 Spring AOP introductions 将类型安全接口添加到类中以便于查询执行。 对于大多数开发人员,为系统中的每个 DAO 编写几乎相同的代码到目前为止已经成为一种习惯。虽然所有人都将这种重复标识为 “代码味道”,但我们大多数都已经学会


阅读全文(3073) | 回复(0) | 编辑 | 精华 | 删除
 


[Hibernate]Hibernate 3.2: Transformers for HQL and SQL
软件技术,  电脑与网络

lhwork 发表于 2006/6/12 9:50:00

People using the Criteria API have either transparently or knowingly used a ResultTransformer. A ResultTransformer is a nice and simple interface that allows you to transform any Criteria result element. E.g. you can make any Criteria result be returned as a java.util.Map or as a non-entity Bean. Criteria Transformers Imagine you have a StudentDTO


阅读全文(12682) | 回复(0) | 编辑 | 精华 | 删除
 


[Hibernate]Generic DAO pattern with JDK 5.0
软件技术,  电脑与网络

lhwork 发表于 2006/6/12 9:48:41

One of the things in Hibernate in Action that needs serious improvement is the section about data access objects, the good old DAO pattern. Things gone wrong Some of the mistakes I've made in the first edition: I assumed that DAO is not only a well known pattern, but that most people already had experience how to write state-oriented data access object interfaces. It turns out that most developers are very familiar with statement-oriented DA

阅读全文(3777) | 回复(0) | 编辑 | 精华 | 删除
 


[Hibernate]解析Hibernate Validator (3)
软件技术,  电脑与网络

lhwork 发表于 2006/6/7 15:24:45

还记得我们在验证时候所写的代码吗:   ClassValidator<Person> classValidator =  new  ClassValidator<Person> (Person. class );
  InvalidValue[]&nb

阅读全文(2174) | 回复(0) | 编辑 | 精华 | 删除
 


[Hibernate]解析Hibernate Validator (2)
软件技术,  电脑与网络

lhwork 发表于 2006/6/7 15:21:20

   /**
    * apply constraints on a bean instance and return all the failures.
    */
   public  InvalidValue[] get

阅读全文(2247) | 回复(0) | 编辑 | 精华 | 删除
 


[Hibernate]解析Hibernate Validator (1)
软件技术,  电脑与网络

lhwork 发表于 2006/6/7 15:13:14

任何获得Matrix授权的网站,转载请保留以下作者信息和链接:
作者:icess(作者的blog:http://blog.matrix.org.cn/page/icess)
关键字:Hibernate Validator 在前一篇文章 < Hibernate Validator 简介 > http://www.matrix.org.cn/resource/article/44/44153_Hibernate%20Validator%20.html中,我

阅读全文(2339) | 回复(0) | 编辑 | 精华 | 删除
 


[Hibernate]Hibernate Validator 简介
软件技术,  电脑与网络

lhwork 发表于 2006/6/7 15:11:52

在项目的业务属性中,你是不是要经常验证属性的取值范围呢. 想要了解比较优美的解决方案吗?           看看Hibernate Validator 是怎么做的吧.一见到她,相信你就会说: Oh God, 这就是我需要的. 任何获得Matrix授权的网站,转载请保留以下作者信息和链接:
作者:icess(作者的blog:http://blog.matrix.org.cn/page/icess)
关键字:Hibernate Validator 用Annotations 给类或

阅读全文(1852) | 回复(0) | 编辑 | 精华 | 删除
 


« 1 2 3 4 5 6 7 8 9 10



站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.094 second(s), page refreshed 144791678 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号