📄 index.html
字号:
<title>HIBERNATE - 符合Java习惯的关系数据库持久化</title><link rel="stylesheet" href="../styles/html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.60.1"><link rel="home" href="index.html" title="HIBERNATE - 符合Java习惯的关系数据库持久化"><link rel="next" href="pr01.html" title="前言"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">HIBERNATE - 符合Java习惯的关系数据库持久化</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="pr01.html">Next</a></td></tr></table><hr></div><div class="book" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="d0e1"></a>HIBERNATE - 符合Java习惯的关系数据库持久化</h1></div><div><h2 class="subtitle">Hibernate2 参考文档</h2></div><div><p class="releaseinfo">2.1.2</p></div></div><div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="pr01.html">前言</a></dt><dt>1. <a href="quickstart.html">在Tomcat中快速上手</a></dt><dd><dl><dt>1.1. <a href="quickstart.html#d0e91">开始Hibernate之旅</a></dt><dt>1.2. <a href="quickstart.html#d0e246">第一个可持久化类</a></dt><dt>1.3. <a href="quickstart.html#d0e272">映射cat</a></dt><dt>1.4. <a href="quickstart.html#d0e318">与猫同乐</a></dt><dt>1.5. <a href="quickstart.html#d0e410">结语</a></dt></dl></dd><dt>2. <a href="architecture.html">体系结构</a></dt><dd><dl><dt>2.1. <a href="architecture.html#architecture-s1">总览</a></dt><dt>2.2. <a href="architecture.html#architecture-s2">持久化对象标识(Persistent Object Identity )</a></dt><dt>2.3. <a href="architecture.html#architecture-s3">JMX集成</a></dt><dt>2.4. <a href="architecture.html#architecture-s4">JCA支持</a></dt></dl></dd><dt>3. <a href="session-configuration.html">SessionFactory配置</a></dt><dd><dl><dt>3.1. <a href="session-configuration.html#session-configuration-s1">可编程配置方式</a></dt><dt>3.2. <a href="session-configuration.html#session-configuration-s2">获取SessionFactory</a></dt><dt>3.3. <a href="session-configuration.html#session-configuration-s3">用户自行提供JDBC连接</a></dt><dt>3.4. <a href="session-configuration.html#session-configuration-s4">Hibernate提供的JDBC连接</a></dt><dt>3.5. <a href="session-configuration.html#session-configuration-s5">其它配置属性</a></dt><dd><dl><dt>3.5.1. <a href="session-configuration.html#session-configuration-s5-1">SQL Dialects SQL 方言</a></dt><dt>3.5.2. <a href="session-configuration.html#session-configuration-s5-2">外连接抓取(Outer Join Fetching )</a></dt><dt>3.5.3. <a href="session-configuration.html#session-configuration-s5-3">二进制流</a></dt><dt>3.5.4. <a href="session-configuration.html#session-configuration-s5-4">在控制台记录SQL</a></dt><dt>3.5.5. <a href="session-configuration.html#session-configuration-s5-5">自定义 ConnectionProvider</a></dt><dt>3.5.6. <a href="session-configuration.html#session-configuration-s5-5b">常用数据库属性</a></dt><dt>3.5.7. <a href="session-configuration.html#session-configuration-s5-6">自定义CacheProvider</a></dt><dt>3.5.8. <a href="session-configuration.html#session-configuration-s5-7">事务策略</a></dt><dt>3.5.9. <a href="session-configuration.html#session-configuration-s5-8">绑定SessionFactory到JNDI</a></dt><dt>3.5.10. <a href="session-configuration.html#session-configuration-s5-9">查询语言替换 </a></dt></dl></dd><dt>3.6. <a href="session-configuration.html#session-configuration-s6">XML配置文件</a></dt><dt>3.7. <a href="session-configuration.html#session-configuration-s7">Logging</a></dt><dt>3.8. <a href="session-configuration.html#session-configuration-s8">NamingStrategy(命名策略)</a></dt></dl></dd><dt>4. <a href="persistent-classes.html">持久化类(Persistent Classes)</a></dt><dd><dl><dt>4.1. <a href="persistent-classes.html#persistent-classes-s1">简单示例</a></dt><dd><dl><dt>4.1.1. <a href="persistent-classes.html#persistent-classes-s1-1">为持久化字段声明访问器(accessors)和是否可变的标志(mutators)</a></dt><dt>4.1.2. <a href="persistent-classes.html#persistent-classes-s1-2">实现一个默认的构造方法(constructor)</a></dt><dt>4.1.3. <a href="persistent-classes.html#persistent-classes-s1-3">提供一个标识属性(identifier property)(可选) </a></dt><dt>4.1.4. <a href="persistent-classes.html#persistent-classes-s1-4">建议使用不是final的类 (可选)</a></dt></dl></dd><dt>4.2. <a href="persistent-classes.html#persistent-classes-s2">继承(Inheritance )</a></dt><dt>4.3. <a href="persistent-classes.html#persistent-classes-s3">持久化生命周期(Lifecycle)中的回调(Callbacks)</a></dt><dt>4.4. <a href="persistent-classes.html#persistent-classes-s4">合法性检查(Validatable)</a></dt><dt>4.5. <a href="persistent-classes.html#persistent-classes-s5">XDoclet示例</a></dt></dl></dd><dt>5. <a href="or-mapping.html">O/R Mapping基础</a></dt><dd><dl><dt>5.1. <a href="or-mapping.html#or-mapping-s1">映射声明(Mapping declaration)</a></dt><dd><dl><dt>5.1.1. <a href="or-mapping.html#or-mapping-s1-1">Doctype</a></dt><dt>5.1.2. <a href="or-mapping.html#or-mapping-s1-2">hibernate-mapping</a></dt><dt>5.1.3. <a href="or-mapping.html#or-mapping-s1-3">class</a></dt><dt>5.1.4. <a href="or-mapping.html#or-mapping-s1-4">id</a></dt><dd><dl><dt>5.1.4.1. <a href="or-mapping.html#or-mapping-s1-4--generator">generator</a></dt><dt>5.1.4.2. <a href="or-mapping.html#or-mapping-s1-4-hilo">高/低位算法(Hi/Lo Algorithm)</a></dt><dt>5.1.4.3. <a href="or-mapping.html#or-mapping-s1-4-uuid">UUID算法(UUID Algorithm )</a></dt><dt>5.1.4.4. <a href="or-mapping.html#or-mapping-s1-4-sequences">标识字段和序列(Identity Columns and Sequences)</a></dt><dt>5.1.4.5. <a href="or-mapping.html#or-mapping-s1-4-assigned">程序分配的标识符(Assigned Identifiers)</a></dt></dl></dd><dt>5.1.5. <a href="or-mapping.html#or-mapping-s1-4b">composite-id 联合ID</a></dt><dt>5.1.6. <a href="or-mapping.html#or-mapping-s1-5">识别器(discriminator)</a></dt><dt>5.1.7. <a href="or-mapping.html#or-mapping-s1-6">版本(version)(可选)</a></dt><dt>5.1.8. <a href="or-mapping.html#or-mapping-s1-6b">时间戳(timestamp )(可选)</a></dt><dt>5.1.9. <a href="or-mapping.html#or-mapping-s1-7">property</a></dt><dt>5.1.10. <a href="or-mapping.html#or-mapping-s1-8">多对一(many-to-one)</a></dt><dt>5.1.11. <a href="or-mapping.html#or-mapping-s1-9">一对一</a></dt><dt>5.1.12. <a href="or-mapping.html#or-mapping-s1-10">组件(component), 动态组件(dynamic-component)</a></dt><dt>5.1.13. <a href="or-mapping.html#or-mapping-s1-11">子类(subclass)</a></dt><dt>5.1.14. <a href="or-mapping.html#or-mapping-s1-11b">连接的子类(joined-subclass)</a></dt><dt>5.1.15. <a href="or-mapping.html#or-mapping-s1-12">map, set, list, bag</a></dt><dt>5.1.16. <a href="or-mapping.html#or-mapping-s1-13">引用(import)</a></dt></dl></dd><dt>5.2. <a href="or-mapping.html#or-mapping-s2">Hibernate 的类型</a></dt><dd><dl><dt>5.2.1. <a href="or-mapping.html#or-mapping-s2-1">实体(Entities)和值(values)</a></dt><dt>5.2.2. <a href="or-mapping.html#or-mapping-s2-2">基本值类型</a></dt><dt>5.2.3. <a href="or-mapping.html#or-mapping-s2-3">持久化枚举(Persistent enum)类型</a></dt><dt>5.2.4. <a href="or-mapping.html#or-mapping-s2-4">自定义值类型</a></dt><dt>5.2.5. <a href="or-mapping.html#or-mapping-s2-5">映射到"任意"(any)类型</a></dt></dl></dd><dt>5.3. <a href="or-mapping.html#or-mapping-s3">SQL中引号包围的标识符</a></dt><dt>5.4. <a href="or-mapping.html#or-mapping-s4">自定义DDL</a></dt><dt>5.5. <a href="or-mapping.html#or-mapping-s5">映射文件的模块化(Modular mapping files)</a></dt></dl></dd><dt>6. <a href="collections.html">集合类(Collections)</a></dt><dd><dl><dt>6.1. <a href="collections.html#collections-s1-1">持久化集合类(Persistent Collections)</a></dt><dt>6.2. <a href="collections.html#collections-s1-3">映射集合(Mapping a Collection)</a></dt><dt>6.3. <a href="collections.html#collections-s1-5">值集合和多对多关联(Collections of Values and Many To Many Associations)</a></dt><dt>6.4. <a href="collections.html#collections-s1-6">一对多关联(One To Many Associations)</a></dt><dt>6.5. <a href="collections.html#collections-s1-7">延迟初始化(延迟加载)(Lazy Initialization)</a></dt><dt>6.6. <a href="collections.html#collections-s1-8a">集合排序(Sorted Collections)</a></dt><dt>6.7. <a href="collections.html#collections-s1-8b">对collection排序的其他方法(Other Ways To Sort a Collection)</a></dt><dt>6.8. <a href="collections.html#collections-s1-9">垃圾收集(Garbage Collection)</a></dt><dt>6.9. <a href="collections.html#collections-s1-10">双向关联(Bidirectional Associations)</a></dt><dt>6.10. <a href="collections.html#collections-s1-11a">三重关联(Ternary Associations)</a></dt><dt>6.11. <a href="collections.html#collections-s1-11b">异类关联(Heterogeneous Associations)</a></dt><dt>6.12. <a href="collections.html#collections-s1-12">集合例子(Collection Example)</a></dt><dt>6.13. <a href="collections.html#collections-s1-13"><idbag></a></dt></dl></dd><dt>7. <a href="components.html">组件(Components)</a></dt><dd><dl><dt>7.1. <a href="components.html#components-s2-1">作为依赖的对象(As Dependent Objects)</a></dt><dt>7.2. <a href="components.html#components-s2-2">In Collections</a></dt><dt>7.3. <a href="components.html#components-s2-2b">作为一个Map的索引(As a Map Index )</a></dt><dt>7.4. <a href="components.html#components-s2-3">作为联合标识符(As Composite Identifiers)</a></dt><dt>7.5. <a href="components.html#components-s2-4">动态组件 (Dynamic components)</a></dt></dl></dd><dt>8. <a href="manipulating-data.html">操作持久化数据(Manipulating Persistent Data)</a></dt><dd><dl><dt>8.1. <a href="manipulating-data.html#manipulating-data-s1">创建一个持久化对象</a></dt><dt>8.2. <a href="manipulating-data.html#manipulating-data-s2">装载对象</a></dt><dt>8.3. <a href="manipulating-data.html#manipulating-data-s3">Querying</a></dt><dd><dl><dt>8.3.1. <a href="manipulating-data.html#manipulating-data-s4">标量查询(Scalar query)</a></dt><dt>8.3.2. <a href="manipulating-data.html#manipulating-data-s5">查询接口(Query interface)</a></dt><dt>8.3.3. <a href="manipulating-data.html#manipulating-data-s5b">可滚动迭代(Scrollable iteration)</a></dt><dt>8.3.4. <a href="manipulating-data.html#manipulating-data-s6">过滤集合类(Filtering collections)</a></dt><dt>8.3.5. <a href="manipulating-data.html#manipulating-data-s6b">条件查询</a></dt><dt>8.3.6. <a href="manipulating-data.html#manipulating-data-s6bc">使用本地SQL的查询</a></dt></dl></dd><dt>8.4. <a href="manipulating-data.html#manipulating-data-s7">更改在当前session中保存或者装载的对象</a></dt><dt>8.5. <a href="manipulating-data.html#manipulating-data-s8">更改在以前session中保存或者装载的对象</a></dt><dt>8.6. <a href="manipulating-data.html#manipulating-data-s8b">把在先前的session中保存或装载的对象重新与新session建立关联(reassociate)</a></dt><dt>8.7. <a href="manipulating-data.html#manipulating-data-s9">删除持久化对象</a></dt><dt>8.8. <a href="manipulating-data.html#manipulating-data-s10">对象图(Graphs of objects)</a></dt><dd><dl><dt>8.8.1. <a href="manipulating-data.html#manipulating-data-s11a">自动管理生命周期的对象(lifecycle object)</a></dt><dt>8.8.2. <a href="manipulating-data.html#manipulating-data-s11b">通过可触及性决定持久化(Persistence by Reachability)</a></dt></dl></dd><dt>8.9. <a href="manipulating-data.html#manipulating-data-s12">清洗(Flushing) -- 这个词很难翻译,不能使用“刷新”,因为刷新一词已经被"refresh"使用了。有什么好的建议?</a></dt><dt>8.10. <a href="manipulating-data.html#manipulating-data-s13">结束一个Session</a></dt><dd><dl><dt>8.10.1. <a href="manipulating-data.html#manipulating-data-s13-1">清洗(Flush)session</a></dt><dt>8.10.2. <a href="manipulating-data.html#manipulating-data-s13-2">提交事务</a></dt><dt>8.10.3. <a href="manipulating-data.html#manipulating-data-s13-3">关闭session</a></dt><dt>8.10.4. <a href="manipulating-data.html#manipulating-data-s13-4">处理异常</a></dt></dl></dd><dt>8.11. <a href="manipulating-data.html#manipulating-data-s15">拦截器(Interceptors)</a></dt><dt>8.12. <a href="manipulating-data.html#manipulating-data-s16">元数据(Metadata) API</a></dt></dl></dd><dt>9. <a href="parent-child.html">父子关系(Parent Child Relationships)</a></dt><dd><dl><dt>9.1. <a href="parent-child.html#parent-child-collections">关于collections</a></dt><dt>9.2. <a href="parent-child.html#parent-child-bidir">双向的一对多关系(Bidirectional one to many)</a></dt><dt>9.3. <a href="parent-child.html#parent-child-cascades">级联(Cascades)</a></dt><dt>9.4. <a href="parent-child.html#parent-child-update">级联更新(Using cascading update())</a></dt><dt>9.5. <a href="parent-child.html#parent-child-conclusion">结论</a></dt></dl></dd><dt>10. <a href="query-language.html">Hibernate查询语言(Query Language), 即HQL</a></dt><dd><dl><dt>10.1. <a href="query-language.html#query-language-s1">大小写敏感性(Case Sensitivity)</a></dt><dt>10.2. <a href="query-language.html#query-language-s2">from 子句</a></dt><dt>10.3. <a href="query-language.html#query-language-s3">联合(Associations)和连接(joins)</a></dt><dt>10.4. <a href="query-language.html#query-language-s4">select子句</a></dt><dt>10.5. <a href="query-language.html#query-language-s4a">统计函数(Aggregate functions)</a></dt><dt>10.6. <a href="query-language.html#query-language-s4b">多态(polymorphism)</a></dt><dt>10.7. <a href="query-language.html#query-language-s5">where子句</a></dt><dt>10.8. <a href="query-language.html#query-language-s6">表达式(Expressions)</a></dt><dt>10.9. <a href="query-language.html#query-language-s7">order by 子句</a></dt><dt>10.10. <a href="query-language.html#query-language-s8">group by 子句</a></dt><dt>10.11. <a href="query-language.html#query-language-s9">子查询</a></dt><dt>10.12. <a href="query-language.html#query-language-s10">示例</a></dt><dt>10.13. <a href="query-language.html#query-language-s11">提示和技巧(Tips & Tricks)</a></dt></dl></dd><dt>11. <a href="worked-example.html">实例(A Worked Example)</a></dt><dd><dl><dt>11.1. <a href="worked-example.html#worked-example-classes">持久化类</a></dt><dt>11.2. <a href="worked-example.html#worked-example-mappings">Hibernate 映射</a></dt><dt>11.3. <a href="worked-example.html#worked-example-code">Hibernate 代码</a></dt></dl></dd><dt>12. <a href="performance.html">性能提升(Improving Performance)</a></dt><dd><dl><dt>12.1. <a href="performance.html#performance-s4">用于延迟装载的代理</a></dt><dt>12.2. <a href="performance.html#performance-s3">第二层缓存(The Second Level Cache)s</a></dt><dd><dl><dt>12.2.1. <a href="performance.html#performance-s3-1">映射(Mapping)</a></dt><dt>12.2.2. <a href="performance.html#performance-s3-2">只读缓存</a></dt><dt>12.2.3. <a href="performance.html#performance-s3-3">读/写缓存</a></dt><dt>12.2.4. <a href="performance.html#performance-s3-4">不严格的读/写缓存</a></dt><dt>12.2.5. <a href="performance.html#performance-s3-5">事务缓存(transactional)</a></dt></dl></dd><dt>12.3. <a href="performance.html#performance-s5">管理Session缓存</a></dt><dt>12.4. <a href="performance.html#performance-s6">查询缓存(Query Cache)</a></dt></dl></dd><dt>13. <a href="collection-performance.html">理解集合类的性能(Understanding Collection Performance)</a></dt><dd><dl><dt>13.1. <a href="collection-performance.html#collection-performance-taxonomy">分类(Taxonomy)</a></dt><dt>13.2. <a href="collection-performance.html#collection-performance-mostefficient-1">Lists, maps 和sets用于更新效率最高</a></dt><dt>13.3. <a href="collection-performance.html#collection-performance-mostefficient-2">Bag和list是反向集合类中效率最高的</a></dt><dt>13.4. <a href="collection-performance.html#collection-performance-oneshotdelete">一次性删除(One shot delete)</a></dt></dl></dd><dt>14. <a href="query-criteria.html">条件查询(Criteria Query)</a></dt><dd><dl><dt>14.1. <a href="query-criteria.html#query-criteria-s1">创建一个Criteria实例</a></dt><dt>14.2. <a href="query-criteria.html#query-criteria-s2">缩小结果集范围</a></dt><dt>14.3. <a href="query-criteria.html#query-criteria-s3">对结果排序</a></dt><dt>14.4. <a href="query-criteria.html#query-criteria-s4">关联(Associations)</a></dt><dt>14.5. <a href="query-criteria.html#query-criteria-s5">动态关联对象获取(Dynamic association fetching)</a></dt><dt>14.6. <a href="query-criteria.html#query-criteria-s6">根据示例查询(Example queries)</a></dt></dl></dd><dt>15. <a href="query-sql.html">SQL查询</a></dt><dd><dl><dt>15.1. <a href="query-sql.html#query-sql-s1">创建一个基于SQL的Query</a></dt><dt>15.2. <a href="query-sql.html#query-sql-s2">别名和属性引用</a></dt><dt>15.3. <a href="query-sql.html#query-sql-s3">为SQL查询命名</a></dt></dl></dd><dt>16. <a href="inheritance.html">继承映射(Inheritance Mappings)</a></dt><dd><dl><dt>16.1. <a href="inheritance.html#inheritance-s1">三种策略</a></dt><dt>16.2. <a href="inheritance.html#inheritance-s2">限制</a></dt></dl></dd><dt>17. <a href="transactions.html">事务和并行(Transactions And Concurrency)</a></dt><dd><dl><dt>17.1. <a href="transactions.html#transactions-s1">配置,会话和工厂(Configurations, Sessions and Factories)</a></dt><dt>17.2. <a href="transactions.html#transactions-s2">线程和连接(Threads and connections)</a></dt><dt>17.3. <a href="transactions.html#transactions-s3">乐观锁定/版本化(Optimistic Locking / Versioning)</a></dt><dd><dl><dt>17.3.1. <a href="transactions.html#transactions-s3-1">使用长生命周期带有自动版本化的会话</a></dt><dt>17.3.2. <a href="transactions.html#transactions-s3-2">使用带有自动版本化的多个会话</a></dt><dt>17.3.3. <a href="transactions.html#transactions-s3-3">应用程序自己进行版本检查</a></dt></dl></dd><dt>17.4. <a href="transactions.html#transactions-s4">会话断开连接(Session disconnection)</a></dt><dt>17.5. <a href="transactions.html#transactions-s5">悲观锁定(Pessimistic Locking)</a></dt></dl></dd><dt>18. <a href="examples.html">映射实例(Mapping Examples)</a></dt><dd><dl><dt>18.1. <a href="examples.html#examples-s0">雇员/雇主(Employer/Employee)</a></dt><dt>18.2. <a href="examples.html#examples-s1">作者/著作(Author/Work)</a></dt><dt>18.3. <a href="examples.html#examples-s2">客户/订单/产品(Customer/Order/Product)</a></dt></dl></dd><dt>19. <a href="toolsetguide.html">工具箱指南</a></dt><dd><dl><dt>19.1. <a href="toolsetguide.html#toolsetguide-s1">Schema 生成器(Schema Generation)</a></dt><dd><dl><dt>19.1.1. <a href="toolsetguide.html#toolsetguide-s1-2">对schema定制化(Customizing the schema)</a></dt><dt>19.1.2. <a href="toolsetguide.html#toolsetguide-s1-3">运行该工具</a></dt><dt>19.1.3. <a href="toolsetguide.html#toolsetguide-s1-4">属性(Properties)</a></dt><dt>19.1.4. <a href="toolsetguide.html#toolsetguide-s1-5">使用Ant(Using Ant)</a></dt><dt>19.1.5. <a href="toolsetguide.html#toolsetguide-s1-6">对schema的增量更新(Incremental schema updates)</a></dt><dt>19.1.6. <a href="toolsetguide.html#toolsetguide-s1-7">用Ant来增量更新schema(Using Ant for incremental schema updates)</a></dt></dl></dd><dt>19.2. <a href="toolsetguide.html#toolsetguide-s2">代码生成(Code Generation)</a></dt><dd><dl><dt>19.2.1. <a href="toolsetguide.html#toolsetguide-s2-1">配置文件(可选)</a></dt><dt>19.2.2. <a href="toolsetguide.html#toolsetguide-s2-2">meta属性</a></dt><dt>19.2.3. <a href="toolsetguide.html#toolsetguide-s2-3">基本的finder生成器(Basic finder generator)</a></dt><dt>19.2.4. <a href="toolsetguide.html#toolsetguide-s2-4">基于Velocity的渲染器/生成器(Velocity based renderer/generator)</a></dt></dl></dd><dt>19.3. <a href="toolsetguide.html#toolsetguide-s3">映射文件生成器(Mapping File Generation)</a></dt><dd><dl><dt>19.3.1. <a href="toolsetguide.html#toolsetguide-s3-1">运行此工具</a></dt></dl></dd></dl></dd><dt>20. <a href="best-practices.html">最佳实践(Best Practices)</a></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="pr01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> 前言</td></tr></table></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -