泛型DAO
原文地址:http://www.hibernate.org/328.html
由于本人能力有限,加上来不及校对, 难免有些地方出现错误或者表达得不是特别准确,欢迎批评指正.
这是一个来自CaveatEmptor实例应用,在JDK5.0下实现的DAO模式. 这个模式在Java Persistence With Hibernate里面也有讲到. 另外有两个链接,可能会对你有用, Sessions and transactions 和 Open Session in View.
这次的DAO例子是基于接口的.很多工具, 像Hibernate已经提供了数据库的便携访问,所以我们不是 ...
- 02:34
- 浏览 (254)
- 论坛浏览 (1953)
- 评论 (2)
(Class<T> ) ((ParameterizedType) getClass()
.getGenericSuperclass()).getActualTypeArguments()[0];
the code above causes a cast exception:
java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType
and it is because:
Reflection on generic parameters can happen only if you define par ...
- 14:35
- 浏览 (331)
- 评论 (0)
(Quoted from here)
Managed bean is about how the bean is created and initialized. As you know, jsf uses the lazy initialization model. It means that the bean in the particular scope is created and initialized not at the moment when the scope is started, but on-demand, i.e. when the bean is first tim ...
- 16:07
- 浏览 (343)
- 论坛浏览 (395)
- 评论 (2)
- 浏览: 925 次
- 性别:

- 来自: 广州

- 详细资料
搜索本博客
最近加入圈子
最新评论
-
泛型DAO(翻译)
HibernateUtil.java及文中相关代码请参见: http://www ...
-- by QiaoDuanni -
泛型DAO(翻译)
非常好的设计模式。
-- by rasonyang -
JSF: Managed Bean VS. Ba ...
"because the JSF specification has no ex ...
-- by kevintse -
JSF: Managed Bean VS. Ba ...
you are very strong,i don't read if diff ...
-- by xuejianshan






评论排行榜