
2010年7月29日
摘要: Java并發編程實踐
閱讀全文
posted @
2011-08-24 18:01 jeffma 閱讀(2192) |
評論 (2) |
編輯 收藏
摘要: 重新調整表結構
閱讀全文
posted @
2011-05-25 15:28 jeffma 閱讀(701) |
評論 (0) |
編輯 收藏
摘要: 在JavaScript中的邏輯操作數可以不是boolean類型邏輯表達式的返回值和評估值也是有區別的
閱讀全文
posted @
2011-02-13 21:48 jeffma 閱讀(1551) |
評論 (3) |
編輯 收藏
摘要: HQL與Criteria對照表
閱讀全文
posted @
2010-12-10 00:19 jeffma 閱讀(1417) |
評論 (2) |
編輯 收藏
摘要: Struts2與Spring集成中的自動裝配策略,STRUTS_OBJECTFACTORY_SPRING_AUTOWIRE何時起作用?
閱讀全文
posted @
2010-11-30 17:01 jeffma 閱讀(5658) |
評論 (0) |
編輯 收藏
1) rapid-framework的解決方案
抽象類BaseHibernateDao中提供了抽象方法
public abstract Class getEntityClass();
由Dao子類實現該方法
2)appfuse的解決方案
在GenericDaoHibernate中提供了構造方法和setter
public GenericDaoHibernate(final Class<T> persistentClass),不允許無參的構造方法
3)springside的解決方案
SimpleHibernateDao獲取的其父類SimpleHibernateDao的泛型類型
public SimpleHibernateDao() {
this.entityClass = ReflectionUtils.getSuperClassGenricType(getClass());
}
ReflectionUtils.getSuperClassGenricType:
Class<T> entityClass =(Class<T>)
((ParameterizedType) getClass().getGenericSuperclass())
.getActualTypeArguments()[0];
posted @
2010-07-29 09:59 jeffma 閱讀(2835) |
評論 (0) |
編輯 收藏