git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@14119 1b8cb986-b30d-0410-93ca-fae66ebed9b2

This commit is contained in:
Steve Ebersole 2007-10-19 05:17:33 +00:00
parent c98631e861
commit 45572536fa
26 changed files with 109 additions and 54 deletions

View File

@ -25,7 +25,6 @@
<year>&copyrightYear;</year>
<holder>&copyrightHolder;</holder>
</copyright>
<xi:include href="translators.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="legal_notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</bookinfo>
@ -33,13 +32,13 @@
<xi:include href="content/preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/tutorial.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/tutorial.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/architecture.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/architecture.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/persistent_classes.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/persistent_classes.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/basic_mapping.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/collection_mapping.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />

View File

@ -1,3 +1,6 @@
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="architecture">
<title>体系结构(Architecture)</title>

View File

@ -1,4 +1,7 @@
<chapter id="associations">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="associations">
<title>关联关系映射</title>

View File

@ -1,4 +1,7 @@
<chapter id="mapping">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="mapping">
<title>对象/关系数据库映射基础(Basic O/R Mapping)</title>
<sect1 id="mapping-declaration" revision="1">

View File

@ -1,4 +1,7 @@
<chapter id="batch">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="batch">
<title>批量处理Batch processing</title>
<para>
使用Hibernate将 100 000 条记录插入到数据库的一个很自然的做法可能是这样的
@ -279,4 +282,4 @@ session.close();]]></programlisting>
</sect1>
</chapter>
</chapter>

View File

@ -1,4 +1,7 @@
<chapter id="best-practices" revision="2">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="best-practices" revision="2">
<title>最佳实践(Best Practices)</title>
<variablelist spacing="compact">

View File

@ -1,4 +1,7 @@
<chapter id="collections">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
 <chapter id="collections">
<title>集合类(Collections)映射</title>

View File

@ -1,4 +1,7 @@
<chapter id="components">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="components">
<title>组件Component映射</title>
<para>
@ -336,4 +339,4 @@
更好的是,你可以通过<literal>Configuration</literal>对象来访问或者修改Hibernate的运行时元模型。
</para>
</sect1>
</chapter>
</chapter>

View File

@ -1,4 +1,7 @@
<chapter id="session-configuration" revision="1">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="session-configuration" revision="1">
<title>
配置

View File

@ -1,4 +1,7 @@
<chapter id="events">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="events">
<title>
拦截器与事件(Interceptors and events)
</title>

View File

@ -1,4 +1,7 @@
<chapter id="example-mappings">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="example-mappings">
<title>示例:复杂映射实例</title>
<para>
本章展示了一些较为复杂的关系映射。
@ -647,4 +650,4 @@ alter table line_items
</sect1>
</chapter>
</chapter>

View File

@ -1,4 +1,7 @@
<chapter id="example-parentchild">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="example-parentchild">
<title>示例:父子关系(Parent Child Relationships)</title>
<para>
刚刚接触Hibernate的人大多是从父子关系parent / child type relationship的建模入手的。父子关系的建模有两种方法。由于种种原因最方便的方法是把<literal>Parent</literal><literal>Child</literal>都建模成实体类,并创建一个从<literal>Parent</literal>指向<literal>Child</literal>&lt;one-to-many&gt;关联,对新手来说尤其如此。还有一种方法,就是将<literal>Child</literal>声明为一个<literal>&lt;composite-element&gt;</literal>(组合元素)。 事实上在Hibernate中one to many关联的默认语义远没有composite element贴近parent / child关系的通常语义。下面我们会阐述如何使用<emphasis>带有级联的双向一对多关联(bidirectional one to many association with cascades)</emphasis>去建立有效、优美的parent / child关系。这一点也不难
@ -303,4 +306,4 @@ public boolean onSave(Object entity,
</para>
</sect1>
</chapter>
</chapter>

View File

@ -1,4 +1,7 @@
<chapter id="example-weblog">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="example-weblog">
<title>示例Weblog 应用程序</title>
<sect1 id="example-weblog-classes">

View File

@ -1,4 +1,7 @@
<chapter id="filters">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="filters">
<title>过滤数据</title>
<para>
@ -137,4 +140,4 @@ List results = session.createQuery("from Employee as e where e.salary > :targetS
</sect1>
</chapter>
</chapter>

View File

@ -1,4 +1,7 @@
 <chapter id="inheritance">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
 <chapter id="inheritance">
<title>继承映射(Inheritance Mappings)</title>
<sect1 id="inheritance-strategies" revision="3">

View File

@ -1,4 +1,7 @@
<chapter id="performance">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="performance">
<title>提升性能
</title>
<sect1 id="performance-fetching" revision="2">
@ -1312,4 +1315,4 @@ log.info(Cat.class.getName() + " changed " + changes + "times" );]]></programli
</sect1>
</chapter>
</chapter>

View File

@ -1,4 +1,7 @@
<chapter id="persistent-classes" revision="2">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="persistent-classes" revision="2">
<title>持久化类(Persistent Classes)</title>
<para>

View File

@ -1,5 +1,4 @@
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<preface id="preface" revision="2">
@ -67,4 +66,4 @@
Hibernate是一个专业的开放源代码项目(Professional Open Source project)也是JBoss Enterprise Middleware System(JEMS),JBoss企业级中间件系统的一个核心组件。
</para>
</preface>
</preface>

View File

@ -1,4 +1,7 @@
<chapter id="querycriteria">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="querycriteria">
<title>
条件查询(Criteria Queries)
</title>

View File

@ -1,4 +1,7 @@
<chapter id="queryhql">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="queryhql">
<title>HQL: Hibernate查询语言</title>
<para>
Hibernate配备了一种非常强大的查询语言这种语言看上去很像SQL。但是不要被语法结构
@ -1085,4 +1088,4 @@ Collection counts = s.filter( collection, "select this.type, count(this) group b
</sect1>
</chapter>
</chapter>

View File

@ -1,4 +1,7 @@
<chapter id="querysql" revision="2">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="querysql" revision="2">
<title>Native SQL查询</title>
<para>
你也可以使用你的数据库的Native SQL语言来查询数据。这对你在要使用数据库的某些特性的时候(比如说在查询提示或者Oracle中的
@ -712,4 +715,4 @@ END updatePerson;]]></programlisting>
</sql-query>]]></programlisting>
</sect1>
</chapter>
</chapter>

View File

@ -1,4 +1,7 @@
<chapter id="quickstart">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="quickstart">
<title>在Tomcat中快速上手</title>
<sect1 id="quickstart-intro" revision="2">
@ -458,4 +461,4 @@ tx.commit();]]></programlisting>
</sect1>
</chapter>
</chapter>

View File

@ -1,4 +1,7 @@
<chapter id="objectstate">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="objectstate">
<title>与对象共事</title>

View File

@ -1,4 +1,7 @@
<chapter id="transactions" revision="2">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="transactions" revision="2">
<title>事务和并发</title>
<para>
Hibernate的事务和并发控制很容易掌握。Hibernate直接使用JDBC连接和JTA资源不添加任何附加锁定

View File

@ -1,4 +1,7 @@
<chapter id="tutorial">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="tutorial">
<title>
Hibernate入门
</title>

View File

@ -1,19 +1,7 @@
<!--
~ Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
~
~ This copyrighted material is made available to anyone wishing to use, modify,
~ copy, or redistribute it subject to the terms and conditions of the GNU
~ Lesser General Public License, v. 2.1. This program is distributed in the
~ hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
~ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ Lesser General Public License for more details. You should have received a
~ copy of the GNU Lesser General Public License, v.2.1 along with this
~ distribution; if not, write to the Free Software Foundation, Inc.,
~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
~
~ Red Hat Author(s): Steve Ebersole
-->
<chapter id="xml">
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="xml">
<title>XML映射</title>
<para><emphasis>
注意这是Hibernate 3.0的一个实验性的特性。这一特性仍在积极开发中。