2007-12-27

泛型DAO(翻译)

关键字: 泛型 dao generics
泛型DAO 原文地址:http://www.hibernate.org/328.html 由于本人能力有限,加上来不及校对, 难免有些地方出现错误或者表达得不是特别准确,欢迎批评指正. 这是一个来自CaveatEmptor实例应用,在JDK5.0下实现的DAO模式. 这个模式在Java Persistence With Hibernate里面也有讲到. 另外有两个链接,可能会对你有用, Sessions and transactions 和 Open Session in View. 这次的DAO例子是基于接口的.很多工具, 像Hibernate已经提供了数据库的便携访问,所以我们不是 ...
(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)
2007-12-17

JSF: Managed Bean VS. Backing Bean

关键字: JSF JAVA managed bean backing bean
(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 ...
kevintse
搜索本博客
博客分类
最近加入圈子
最新评论