| 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 编写几乎相同的代码到目前为止已经成为一种习惯。虽然所有人都将这种重复标识为 “代码味道”,但我们大多数都已经学会 |
|
|
[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 |
|
|
[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 |
|
|
[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中,我 |
|
|
[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 给类或 |
|
|