Hibernate - Persistent class

1. Hibernate recommand persisten class as a standard javabean naming convention, but not required, Hibernate can access fileds directory too.
But a no-argument constuctor is requeried for hibernate to instiante an object of the class by refection.

2. Indentifier property if optional too, but needed if we want to use the full feature set of hibernate, for hibernate will distinguish object by identifiers while some special operation. e.g:  merge(), saveOrUpdate.

3. Equals() and hasdCode() mehtod is recommanded to implenent when you want to store persisntent class in a Set or manipulate object span sessions.

4. There are other 2 ways to define enity object except java class, Map and xml, the defect maybe can not do compile check, metrit is more flexisble than java.

5. Tuplizier!!!!

Hibernate integrated with J2EE infrastructure:
Two main point:
1. Hidden Configuration.config().buildSessionFacotory operation.
2. Bound session factory to jndi namespace through many way. e.g: MBean
 

posted on 2007-06-14 11:12 Sheldon Sun 阅读(552) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航:
 
<2007年6月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

导航

统计

常用链接

留言簿(3)

随笔档案

文章档案

搜索

最新评论

阅读排行榜

评论排行榜