《hibernate开发指南》(pdf)下载
《HibernateGuide》hibernate开发指南,中文pdf版电子书下载,本文是由笔者2003 年底一个咨询项目中,为客户做的持久层设计培训文案整理而来。其中的内容涉及Hibernate 的使用,以及一部分笔者实际咨询项目中的经验积累,另一方面,大部分是笔者Hibernate 的官方论坛中与众多技术专家交流所得。既来于斯,则归于斯。希望能聊有所用。本文并非试图替代Hibernate Reference,相对而言,Hibernate Reference的编写目的是为开发者提供更简便的条目索引,而本文目标则在于为开发人员提供一个入门和掌握Hibernate的途径。
译者:夏昕
Hibernate 开发指南.......................................................................................................3
准备工作..........................................................................................................5
构建Hibernate基础代码...............................................................................5
由数据库产生基础代码...........................................................................6
Hibernate配置..............................................................................................17
第一段代码....................................................................................................19
Hibernate基础语义......................................................................................21
Configuration ........................................................................................21
SessionFactory.......................................................................................22
Session....................................................................................................22
Hibernate高级特性......................................................................................................24
XDoclet与Hibernate映射...........................................................................24
数据检索........................................................................................................33
Criteria Query...............................................................................33
Criteria查询表达式................................................................33
Criteria高级特性....................................................................35
限定返回的记录范围.............................................................35
对查询结果进行排序.............................................................35
Hibernate Query Language (HQL).........................................36
数据关联........................................................................................................37
一对一关联.............................................................................37
一对多关联.............................................................................39
? 单向一对多关系......................................................39
? 双向一对多关系......................................................44
多对多关联.............................................................................49
数据访问........................................................................................................56
PO和VO...............................................................................................56
关于unsaved-value ...............................................................................59
Inverse和Cascade.........................................................................61
延迟加载(Lazy Loa**)............................................................61
事务管理........................................................................................................65
基于JDBC的事务管理.........................................................................66
基于JTA的事务管理...........................................................................67
锁(locking).........................................................................................70
悲观锁(Pessimistic Locking).......................................70
乐观锁(Optimistic Locking)..........................................71
Hibernate分页..........................................................................................75
Cache管理....................................................................................................77
Session管理...............................................................................................81
Hibernate in Spring...........................................................................................86
编后赘言........................................................................................................................