Author: stliu
Date: 2010-02-07 23:24:37 -0500 (Sun, 07 Feb 2010)
New Revision: 18715
Removed:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/bibliography.xml
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/Preface.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/architecture.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/association_mapping.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/basic_mapping.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/batch.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/best_practices.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/collection_mapping.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/component_mapping.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/configuration.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/events.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/example_mappings.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/example_parentchild.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/example_weblog.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/filters.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/inheritance_mapping.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/performance.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/persistent_classes.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/portability.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/query_criteria.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/query_hql.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/query_sql.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/session_api.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/toolset_guide.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/transactions.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/tutorial.xml
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/xml.xml
Log:
HHH-4729 Import work done by Red Hat translation team
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/Preface.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/Preface.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/Preface.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -23,15 +27,13 @@
~ Boston, MA 02110-1301 USA
-->
-<!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-
-<preface id="preface">
+<preface>
<title>Preface</title>
<para>
Working with object-oriented software and a relational database can be
cumbersome
- and time consuming in today's enterprise environments. Hibernate is an
Object/Relational
- Mapping tool for Java environments. The term Object/Relational Mapping (ORM)
refers to
+ and time consuming in today's enterprise environments. Hibernate is an
object/relational
+ mapping tool for Java environments. The term object/relational mapping (ORM)
refers to
the technique of mapping a data representation from an object model to a
relational
data model with a SQL-based schema.
</para>
@@ -86,12 +88,12 @@
</listitem>
<listitem>
<para>
- Use this reference documentation as your primary source of
- information. Consider reading <biblioref
linkend="biblio-JPwH"/>
- if you need more help with application design, or if you prefer
- a step-by-step tutorial. Also visit
- <ulink url="http://caveatemptor.hibernate.org"/> and
download
- the example application from <biblioref
linkend="biblio-JPwH"/>.
+ Use this reference documentation as your primary source of information.
+ Consider reading <emphasis>Java Persistence with
Hibernate</emphasis>
+ (
http://www.manning.com/bauer2) if you need more help with application
+ design, or if you prefer a step-by-step tutorial. Also visit
+
http://caveatemptor.hibernate.org and download the example application
+ for Java Persistence with Hibernate.
</para>
</listitem>
<listitem>
@@ -101,8 +103,8 @@
</listitem>
<listitem>
<para>
- Links to third party demos, examples, and tutorials are maintained
- on the Hibernate website.
+ Third party demos, examples, and tutorials are linked on the Hibernate
+ website.
</para>
</listitem>
<listitem>
@@ -128,13 +130,22 @@
Hibernate is a Professional Open Source project and a critical component of the
JBoss Enterprise Middleware System (JEMS) suite of products.
</para>
-
- <section>
+
+ <!-- Insert relevant fallback material here. Conventions and is a relevant
placement BookInfo.xml-->
+ <!--FOR PUBLICAN -->
+ <xi:include
xmlns:xi="http://www.w3.org/2001/XInclude"
+ href="Common_Content/Conventions.xml">
+ <!--FOR JDOCBOOK:-->
+ <xi:fallback
xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ </xi:include>
+
+ <section>
<title>Feedback</title>
<para>
Use <ulink
url="http://opensource.atlassian.com/projects/hibernate">Hib...
JIRA</ulink>
to report errors or request enhacements to this documentation.
</para>
- </section>
+ </section>
+
</preface>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/architecture.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/architecture.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/architecture.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,9 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
+
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -22,14 +27,11 @@
~ 51 Franklin Street, Fifth Floor
~ Boston, MA 02110-1301 USA
-->
-
-<!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>
- <sect1 id="architecture-overview" revision="1">
+ <section id="architecture-overview" revision="1">
<title>Overview</title>
<para>
@@ -38,15 +40,13 @@
<mediaobject>
<imageobject role="fo">
- <imagedata fileref="../images/overview.svg"
format="SVG" align="center"/>
+ <imagedata fileref="images/overview.svg"
format="SVG" align="center"/>
</imageobject>
<imageobject role="html">
- <imagedata fileref="../images/overview.png"
format="PNG" align="center"/>
+ <imagedata fileref="images/overview.png"
format="PNG" align="center"/>
</imageobject>
</mediaobject>
-
-
<para>
We do not have the scope in this document to provide a more detailed view of
all the runtime architectures available;
Hibernate is flexible and supports several different approaches. We will,
however,
@@ -58,34 +58,32 @@
provide persistence services, and persistent objects, to the application.
</para>
- <para>
- The "minimal" architecture has the application
+ <para>
+ The "minimal" architecture has the application
provide its own JDBC connections and manage its own transactions. This
approach
uses a minimal subset of Hibernate's APIs:
</para>
<mediaobject>
<imageobject role="fo">
- <imagedata fileref="../images/lite.svg"
format="SVG" align="center"/>
+ <imagedata fileref="images/lite.svg" format="SVG"
align="center"/>
</imageobject>
<imageobject role="html">
- <imagedata fileref="../images/lite.png"
format="PNG" align="center"/>
+ <imagedata fileref="images/lite.png" format="PNG"
align="center"/>
</imageobject>
</mediaobject>
-
-
- <para>
+ <para>
The "comprehensive" architecture abstracts the application away
from the
underlying JDBC/JTA APIs and allows Hibernate to manage the details.
</para>
<mediaobject>
<imageobject role="fo">
- <imagedata fileref="../images/full_cream.svg"
format="SVG" align="center"/>
+ <imagedata fileref="images/full_cream.svg"
format="SVG" align="center"/>
</imageobject>
<imageobject role="html">
- <imagedata fileref="../images/full_cream.png"
format="PNG" align="center"/>
+ <imagedata fileref="images/full_cream.png"
format="PNG" align="center"/>
</imageobject>
</mediaobject>
@@ -189,9 +187,9 @@
<literal>Transaction</literal>/<literal>TransactionFactory</literal>
and/or
<literal>ConnectionProvider</literal> APIs to communicate with
JTA or JDBC directly.
</para>
- </sect1>
+ </section>
- <sect1 id="architecture-states" revision="1">
+ <section id="architecture-states" revision="1">
<title>Instance states</title>
<para>
An instance of a persistent class can be in one of three different states.
These states are
@@ -239,9 +237,9 @@
</listitem>
</varlistentry>
</variablelist>
- </sect1>
+ </section>
- <sect1 id="architecture-jmx" revision="1">
+ <section id="architecture-jmx" revision="1">
<title>JMX Integration</title>
<para>
@@ -289,17 +287,17 @@
Another feature available as a JMX service is runtime Hibernate statistics.
See
<xref linkend="configuration-optional-statistics"/> for more
information.
</para>
- </sect1>
+ </section>
- <sect1 id="architecture-jca" revision="1">
+ <section id="architecture-jca" revision="1">
<title>JCA Support</title>
<para>
Hibernate can also be configured as a JCA connector. Please see the website
for more
information. Please note, however, that at this stage Hibernate JCA support
is under development.
</para>
- </sect1>
+ </section>
- <sect1 id="architecture-current-session" revision="2">
+ <section id="architecture-current-session" revision="2">
<title>Contextual sessions</title>
<para>
Most applications using Hibernate need some form of "contextual"
session, where a given
@@ -383,7 +381,7 @@
short names: "jta", "thread", and "managed".
</para>
- </sect1>
+ </section>
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/association_mapping.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/association_mapping.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/association_mapping.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,9 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
+
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -22,14 +27,11 @@
~ 51 Franklin Street, Fifth Floor
~ Boston, MA 02110-1301 USA
-->
-
-<!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>Association Mappings</title>
- <sect1 id="assoc-intro" revision="1">
+ <section id="assoc-intro" revision="1">
<title>Introduction</title>
<para>
@@ -52,12 +54,12 @@
nullability constraints.
</para>
- </sect1>
+ </section>
- <sect1 id="assoc-unidirectional" revision="1">
+ <section id="assoc-unidirectional" revision="1">
<title>Unidirectional associations</title>
- <sect2 id="assoc-unidirectional-m21">
+ <section id="assoc-unidirectional-m21">
<title>Many-to-one</title>
<para>
@@ -84,9 +86,9 @@
create table Address ( addressId bigint not null primary key )
]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="assoc-unidirectional-121">
+ <section id="assoc-unidirectional-121">
<title>One-to-one</title>
<para>
@@ -139,9 +141,9 @@
create table Address ( personId bigint not null primary key )
]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="assoc-unidirectional-12m">
+ <section id="assoc-unidirectional-12m">
<title>One-to-many</title>
<para>
@@ -174,14 +176,14 @@
You should instead use a join table for this kind of association.
</para>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="assoc-unidirectional-join" revision="1">
+ <section id="assoc-unidirectional-join" revision="1">
<title>Unidirectional associations with join tables</title>
- <sect2 id="assoc-unidirectional-join-12m">
+ <section id="assoc-unidirectional-join-12m">
<title>One-to-many</title>
<para>
@@ -213,9 +215,9 @@
create table Address ( addressId bigint not null primary key )
]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="assoc-unidirectional-join-m21">
+ <section id="assoc-unidirectional-join-m21">
<title>Many-to-one</title>
<para>
@@ -247,9 +249,9 @@
create table Address ( addressId bigint not null primary key )
]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="assoc-unidirectional-join-121">
+ <section id="assoc-unidirectional-join-121">
<title>One-to-one</title>
<para>
@@ -283,9 +285,9 @@
create table Address ( addressId bigint not null primary key )
]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="assoc-unidirectional-join-m2m">
+ <section id="assoc-unidirectional-join-m2m">
<title>Many-to-many</title>
<para>
@@ -314,14 +316,14 @@
create table Address ( addressId bigint not null primary key )
]]></programlisting>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="assoc-bidirectional" revision="1">
+ <section id="assoc-bidirectional" revision="1">
<title>Bidirectional associations</title>
- <sect2 id="assoc-bidirectional-m21" revision="2">
+ <section id="assoc-bidirectional-m21" revision="2">
<title>one-to-many / many-to-one</title>
<para>
@@ -392,9 +394,9 @@
element.
</para>
- </sect2>
+ </section>
- <sect2 id="assoc-bidirectional-121">
+ <section id="assoc-bidirectional-121">
<title>One-to-one</title>
<para>
@@ -450,14 +452,14 @@
create table Address ( personId bigint not null primary key )
]]></programlisting>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="assoc-bidirectional-join" revision="1">
+ <section id="assoc-bidirectional-join" revision="1">
<title>Bidirectional associations with join tables</title>
- <sect2 id="assoc-bidirectional-join-12m">
+ <section id="assoc-bidirectional-join-12m">
<title>one-to-many / many-to-one</title>
<para>
@@ -498,9 +500,9 @@
create table Address ( addressId bigint not null primary key )
]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="assoc-bidirectional-join-121">
+ <section id="assoc-bidirectional-join-121">
<title>one to one</title>
<para>
@@ -544,9 +546,9 @@
create table Address ( addressId bigint not null primary key )
]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="assoc-bidirectional-join-m2m" revision="1">
+ <section id="assoc-bidirectional-join-m2m"
revision="1">
<title>Many-to-many</title>
<para>
@@ -581,11 +583,11 @@
create table Address ( addressId bigint not null primary key )
]]></programlisting>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="assoc-complex">
+ <section id="assoc-complex">
<title>More complex association mappings</title>
<para>
@@ -644,7 +646,7 @@
to handle these kinds of cases using HQL or a criteria query.
</para>
- </sect1>
+ </section>
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/basic_mapping.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/basic_mapping.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/basic_mapping.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -23,12 +27,10 @@
~ Boston, MA 02110-1301 USA
-->
-<!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="2">
+ <section id="mapping-declaration" revision="2">
<title>Mapping declaration</title>
<para>
@@ -48,7 +50,8 @@
Here is an example mapping:
</para>
- <programlisting id="mapping-declaration-ex1"
revision="1"><![CDATA[<?xml version="1.0"?>
+ <!-- <programlisting id="mapping-declaration-ex1"
revision="1"> -->
+ <programlisting><![CDATA[<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
@@ -123,7 +126,7 @@
- <sect2 id="mapping-declaration-doctype" revision="3">
+ <section id="mapping-declaration-doctype"
revision="3">
<title>Doctype</title>
<para>
@@ -135,7 +138,7 @@
classpath.
</para>
- <sect3 id="mapping-declaration-entity-resolution">
+ <section id="mapping-declaration-entity-resolution">
<title>EntityResolver</title>
<para>
Hibernate will first attempt to resolve DTDs in its classpath.
@@ -166,29 +169,18 @@
<para>
The following is an example of utilizing user namespacing:
</para>
- <programlisting><![CDATA[<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" [
- <!ENTITY types SYSTEM "classpath://your/domain/types.xml">
-]>
-
-<hibernate-mapping package="your.domain">
- <class name="MyEntity">
- <id name="id" type="my-custom-id-type">
- ...
- </id>
- <class>
- &types;
-</hibernate-mapping>]]></programlisting>
+ <programlisting language="XML" role="XML">
+<xi:include parse="text" href="../extras/namespacing.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+</programlisting>
+
<para>
Where <literal>types.xml</literal> is a resource in the
<literal>your.domain</literal>
- package and contains a custom <link
linkend="mapping-types-custom">typedef</link>.
+ package and contains a custom typedef (see <xref
linkend="mapping-types-custom" />).
</para>
- </sect3>
- </sect2>
+ </section>
+ </section>
- <sect2 id="mapping-declaration-mapping" revision="3">
+ <section id="mapping-declaration-mapping"
revision="3">
<title>Hibernate-mapping</title>
<para>
@@ -284,9 +276,9 @@
<literal>Animal.hbm.xml</literal>.
</para>
- </sect2>
+ </section>
- <sect2 id="mapping-declaration-class" revision="3">
+ <section id="mapping-declaration-class" revision="3">
<title>Class</title>
<para>
@@ -601,9 +593,9 @@
a nested mapping element.
</para>
- </sect2>
+ </section>
- <sect2 id="mapping-declaration-id" revision="4">
+ <section id="mapping-declaration-id" revision="4">
<title>id</title>
<para>
@@ -679,7 +671,7 @@
legacy data with composite keys. Its use is strongly discouraged for
anything else.
</para>
- <sect3 id="mapping-declaration-id-generator"
revision="2">
+ <section id="mapping-declaration-id-generator"
revision="2">
<title>Generator</title>
<para>
@@ -700,7 +692,7 @@
All generators implement the interface
<literal>org.hibernate.id.IdentifierGenerator</literal>.
This is a very simple interface. Some applications can choose to
provide their own specialized
implementations, however, Hibernate provides a range of built-in
implementations. The shortcut
- names for the built-in generators are as follows:
+ names for the built-in generators are as follows: </para>
<variablelist>
<varlistentry>
@@ -827,11 +819,9 @@
</listitem>
</varlistentry>
</variablelist>
+ </section>
- </para>
- </sect3>
-
- <sect3 id="mapping-declaration-id-hilo"
revision="1">
+ <section id="mapping-declaration-id-hilo"
revision="1">
<title>Hi/lo algorithm</title>
<para>
The <literal>hilo</literal> and
<literal>seqhilo</literal> generators provide two alternate
@@ -861,9 +851,9 @@
server datasource to obtain connections enlisted with JTA, you must
configure
the
<literal>hibernate.transaction.manager_lookup_class</literal>.
</para>
- </sect3>
+ </section>
- <sect3 id="mapping-declaration-id-uuid">
+ <section id="mapping-declaration-id-uuid">
<title>UUID algorithm</title>
<para>
The UUID contains: IP address, startup time of the JVM that is
accurate to a quarter
@@ -871,9 +861,9 @@
possible to obtain a MAC address or memory address from Java code, so
this is
the best option without using JNI.
</para>
- </sect3>
+ </section>
- <sect3 id="mapping-declaration-id-sequences">
+ <section id="mapping-declaration-id-sequences">
<title>Identity columns and sequences</title>
<para>
For databases that support identity columns (DB2, MySQL, Sybase, MS
SQL), you
@@ -898,9 +888,9 @@
choose from the <literal>identity</literal>,
<literal>sequence</literal> and
<literal>hilo</literal> strategies.
</para>
- </sect3>
+ </section>
- <sect3 id="mapping-declaration-id-assigned">
+ <section id="mapping-declaration-id-assigned">
<title>Assigned identifiers</title>
<para>
If you want the application to assign identifiers, as opposed to
having
@@ -918,9 +908,9 @@
there is a version or timestamp property, or you define
<literal>Interceptor.isUnsaved()</literal>.
</para>
- </sect3>
+ </section>
- <sect3 id="mapping-declaration-id-select">
+ <section id="mapping-declaration-id-select">
<title>Primary keys assigned by triggers</title>
<para>
Hibernate does not generate DDL with triggers. It is for legacy
schemas only.
@@ -939,11 +929,11 @@
whose value is generated by a trigger.
</para>
- </sect3>
+ </section>
- </sect2>
+ </section>
- <sect2 id="mapping-declaration-id-enhanced">
+ <section id="mapping-declaration-id-enhanced">
<title>Enhanced identifier generators</title>
<para>
@@ -965,7 +955,7 @@
incrementing values, depending on the capabilities of the dialect being
used. The difference between this
and <literal>native</literal> is that table-based and
sequence-based storage have the same exact
semantic. In fact, sequences are exactly what Hibernate tries to emulate
with its table-based
- generators. This generator has a number of configuration parameters:
+ generators. This generator has a number of configuration parameters:</para>
<itemizedlist spacing="compact">
<listitem>
<para>
@@ -1008,7 +998,6 @@
</para>
</listitem>
</itemizedlist>
- </para>
<para>
The second of these new generators is
<literal>org.hibernate.id.enhanced.TableGenerator</literal>, which
is intended, firstly, as a replacement for the
<literal>table</literal> generator, even though it actually
@@ -1016,7 +1005,7 @@
as a re-implementation of
<literal>org.hibernate.id.MultipleHiLoPerTableGenerator</literal> that
utilizes the
notion of pluggable optimizers. Essentially this generator defines a
table capable of holding
a number of different increment values simultaneously by using multiple
distinctly keyed rows. This
- generator has a number of configuration parameters:
+ generator has a number of configuration parameters:</para>
<itemizedlist spacing="compact">
<listitem>
<para>
@@ -1065,14 +1054,13 @@
<listitem>
<para>
<literal>optimizer</literal> (optional - defaults
to <literal></literal>):
- See <xref
linkend="mapping-declaration-id-enhanced-optimizers"/>
+ See <xref
linkend="mapping-declaration-id-enhanced-optimizers" />
</para>
</listitem>
</itemizedlist>
- </para>
- </sect2>
+ </section>
- <sect2 id="mapping-declaration-id-enhanced-optimizers">
+ <section id="mapping-declaration-id-enhanced-optimizers">
<title>Identifier generator optimization</title>
<para>
For identifier generators that store values in the database, it is
inefficient for them to hit the
@@ -1107,9 +1095,9 @@
</listitem>
</itemizedlist>
</para>
- </sect2>
+ </section>
- <sect2 id="mapping-declaration-compositeid"
revision="3">
+ <section id="mapping-declaration-compositeid"
revision="3">
<title>composite-id</title>
<programlisting><![CDATA[<composite-id
@@ -1224,9 +1212,9 @@
for almost all applications.
</para>
- </sect2>
+ </section>
- <sect2 id="mapping-declaration-discriminator"
revision="3">
+ <section id="mapping-declaration-discriminator"
revision="3">
<title>Discriminator</title>
<para>
@@ -1312,9 +1300,9 @@
formula="case when CLASS_TYPE in ('a', 'b', 'c') then 0
else 1 end"
type="integer"/>]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="mapping-declaration-version" revision="4">
+ <section id="mapping-declaration-version"
revision="4">
<title>Version (optional)</title>
<para>
@@ -1380,7 +1368,7 @@
<para>
<literal>generated</literal> (optional - defaults
to <literal>never</literal>):
specifies that this version property value is generated by
the database.
- See the discussion of <link
linkend="mapping-generated">generated properties</link> for more
information.
+ See the discussion of generated properties for more
information (<xref linkend="mapping-generated" />).
</para>
</callout>
<callout arearefs="version7">
@@ -1407,9 +1395,9 @@
problems with transitive reattachment in Hibernate. It is especially
useful for people
using assigned identifiers or composite keys</emphasis>.
</para>
- </sect2>
+ </section>
- <sect2 id="mapping-declaration-timestamp" revision="4"
>
+ <section id="mapping-declaration-timestamp" revision="4"
>
<title>Timestamp (optional)</title>
<para>
@@ -1482,7 +1470,7 @@
<para>
<literal>generated</literal> (optional - defaults
to <literal>never</literal>):
specifies that this timestamp property value is actually
generated by the database.
- See the discussion of <link
linkend="mapping-generated">generated properties</link> for more
information.
+ See the discussion of generated properties for more
information (<xref linkend="mapping-generated" />).
</para>
</callout>
</calloutlist>
@@ -1499,10 +1487,10 @@
</para>
</note>
- </sect2>
+ </section>
- <sect2 id="mapping-declaration-property" revision="4">
+ <section id="mapping-declaration-property"
revision="4">
<title>Property</title>
<para>
@@ -1620,7 +1608,7 @@
<para>
<literal>generated</literal> (optional - defaults
to <literal>never</literal>):
specifies that this property value is actually generated by
the database.
- See the discussion of <link
linkend="mapping-generated">generated properties</link> for more
information.
+ See the discussion of generated properties for more
information (<xref linkend="mapping-generated"/>).
</para>
</callout>
</calloutlist>
@@ -1695,9 +1683,9 @@
if you do not want to use the attribute.
</para>
- </sect2>
+ </section>
- <sect2 id="mapping-declaration-manytoone"
revision="5">
+ <section id="mapping-declaration-manytoone"
revision="5">
<title>Many-to-one</title>
<para>
@@ -1908,9 +1896,9 @@
<programlisting><![CDATA[<many-to-one name="owner"
property-ref="identity.ssn"
column="OWNER_SSN"/>]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="mapping-declaration-onetoone" revision="3">
+ <section id="mapping-declaration-onetoone"
revision="3">
<title>One-to-one</title>
<para>
@@ -2084,9 +2072,9 @@
<programlisting><![CDATA[<one-to-one name="employee"
class="Employee"
property-ref="person"/>]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="mapping-declaration-naturalid">
+ <section id="mapping-declaration-naturalid">
<title>Natural-id</title>
<programlisting><![CDATA[<natural-id
mutable="true|false"/>
@@ -2122,9 +2110,9 @@
</listitem>
</itemizedlist>
- </sect2>
+ </section>
- <sect2 id="mapping-declaration-component"
revision="2">
+ <section id="mapping-declaration-component"
revision="2">
<title>Component and dynamic-component</title>
<para>
@@ -2233,9 +2221,9 @@
<xref linkend="components-dynamic"/> for more
information.
</para>
- </sect2>
+ </section>
- <sect2 id="mapping-declaration-properties"
revision="2">
+ <section id="mapping-declaration-properties"
revision="2">
<title>Properties</title>
<para>
@@ -2336,9 +2324,9 @@
legacy data is not recommended.
</para>
- </sect2>
+ </section>
- <sect2 id="mapping-declaration-subclass" revision="4">
+ <section id="mapping-declaration-subclass"
revision="4">
<title>Subclass</title>
<para>
@@ -2407,9 +2395,9 @@
For information about inheritance mappings see <xref
linkend="inheritance"/>.
</para>
- </sect2>
+ </section>
- <sect2 id="mapping-declaration-joinedsubclass"
revision="3">
+ <section id="mapping-declaration-joinedsubclass"
revision="3">
<title>Joined-subclass</title>
<para>
@@ -2514,9 +2502,9 @@
For information about inheritance mappings see <xref
linkend="inheritance"/>.
</para>
- </sect2>
+ </section>
- <sect2 id="mapping-declaration-unionsubclass"
revision="2">
+ <section id="mapping-declaration-unionsubclass"
revision="2">
<title>Union-subclass</title>
<para>
@@ -2590,9 +2578,9 @@
For information about inheritance mappings see <xref
linkend="inheritance"/>.
</para>
- </sect2>
+ </section>
- <sect2 id="mapping-declaration-join" revision="3">
+ <section id="mapping-declaration-join" revision="3">
<title>Join</title>
<para>
@@ -2696,9 +2684,9 @@
explained later.
</para>
- </sect2>
+ </section>
- <sect2 id="mapping-declaration-key">
+ <section id="mapping-declaration-key">
<title>Key</title>
<para>
@@ -2786,9 +2774,9 @@
<literal><key
not-null="true"></literal>.
</para>
- </sect2>
+ </section>
- <sect2 id="mapping-column" revision="4">
+ <section id="mapping-column" revision="4">
<title>Column and formula elements</title>
<para>
Mapping elements which accept a <literal>column</literal>
attribute will alternatively
@@ -2823,9 +2811,9 @@
<formula>'MAILING'</formula>
</many-to-one>]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="mapping-declaration-import">
+ <section id="mapping-declaration-import">
<title>Import</title>
<para>
@@ -2861,9 +2849,9 @@
</calloutlist>
</programlistingco>
- </sect2>
+ </section>
- <sect2 id="mapping-types-anymapping" revision="2">
+ <section id="mapping-types-anymapping" revision="2">
<title>Any</title>
<para>
@@ -2955,14 +2943,14 @@
</calloutlist>
</programlistingco>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="mapping-types">
+ <section id="mapping-types">
<title>Hibernate types</title>
- <sect2 id="mapping-types-entitiesvalues" revision="1">
+ <section id="mapping-types-entitiesvalues"
revision="1">
<title>Entities and values</title>
<para>
@@ -3027,9 +3015,9 @@
With the exception of collections, all built-in Hibernate types support
null semantics.
</para>
- </sect2>
+ </section>
- <sect2 id="mapping-types-basictypes" revision="3">
+ <section id="mapping-types-basictypes" revision="3">
<title>Basic value types</title>
<para>
@@ -3183,9 +3171,9 @@
represents the <literal>string</literal> type.
</para>
- </sect2>
+ </section>
- <sect2 id="mapping-types-custom" revision="2">
+ <section id="mapping-types-custom" revision="2">
<title>Custom value types</title>
<para>
@@ -3271,11 +3259,11 @@
monetary values are represented.
</para>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="mapping-entityname">
+ <section id="mapping-entityname">
<title>Mapping a class more than once</title>
<para>
It is possible to provide more than one mapping for a particular persistent
class. In this
@@ -3308,9 +3296,9 @@
<literal>class</literal>.
</para>
- </sect1>
+ </section>
- <sect1 id="mapping-quotedidentifiers">
+ <section id="mapping-quotedidentifiers">
<title>SQL quoted identifiers</title>
<para>
You can force Hibernate to quote an identifier in the generated SQL by
enclosing the table or
@@ -3325,17 +3313,17 @@
...
</class>]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="mapping-alternatives">
+ <section id="mapping-alternatives">
<title>Metadata alternatives</title>
<para>
XML does not suit all users so there are some alternative ways to define O/R
mapping metadata in Hibernate.
</para>
- <sect2 id="mapping-xdoclet">
+ <section id="mapping-xdoclet">
<title>Using XDoclet markup</title>
<para>
@@ -3454,9 +3442,9 @@
See the Hibernate website for more examples of XDoclet and Hibernate.
</para>
- </sect2>
+ </section>
- <sect2 id="mapping-annotations" revision="2">
+ <section id="mapping-annotations" revision="2">
<title>Using JDK 5.0 Annotations</title>
<para>
@@ -3505,10 +3493,10 @@
</para>
</note>
- </sect2>
- </sect1>
+ </section>
+ </section>
- <sect1 id="mapping-generated" revision="1">
+ <section id="mapping-generated" revision="1">
<title>Generated properties</title>
<para>
Generated properties are properties that have their values generated by the
@@ -3521,9 +3509,9 @@
</para>
<para>
Properties marked as generated must additionally be non-insertable and
non-updateable.
- Only <link
linkend="mapping-declaration-version">versions</link>,
- <link
linkend="mapping-declaration-timestamp">timestamps</link>, and
- <link linkend="mapping-declaration-property">simple
properties</link>, can be marked as
+ Only versions (<xref linkend="mapping-declaration-version"
/>), timestamps
+ (<xref linkend="mapping-declaration-timestamp" />), and
simple properties
+ (<xref linkend="mapping-declaration-property" />), can be
marked as
generated.
</para>
<para>
@@ -3533,18 +3521,18 @@
<para>
<literal>insert</literal>: the given property value is generated on
insert, but is not regenerated on subsequent updates. Properties like
created-date
- fall into this category. Even though
- <link linkend="mapping-declaration-version">version</link>
and
- <link
linkend="mapping-declaration-timestamp">timestamp</link> properties
can
+ fall into this category. Even though version
+ (<xref linkend="mapping-declaration-version" />) and timestamp
+ (<xref linkend="mapping-declaration-timestamp" />) properties can
be marked as generated, this option is not available.
</para>
<para>
<literal>always</literal>: the property value is generated both
on insert and on update.
</para>
- </sect1>
+ </section>
- <sect1 id="mapping-database-object">
+ <section id="mapping-database-object">
<title>Auxiliary database objects</title>
<para>
Auxiliary database objects allow for the CREATE and DROP of arbitrary
database objects. In conjunction with
@@ -3589,6 +3577,6 @@
<dialect-scope name="org.hibernate.dialect.Oracle10gDialect"/>
</database-object>
</hibernate-mapping>]]></programlisting>
- </sect1>
+ </section>
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/batch.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/batch.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/batch.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="iso-8859-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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -23,8 +27,6 @@
~ Boston, MA 02110-1301 USA
-->
-<!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>
@@ -75,7 +77,7 @@
<literal>CacheMode</literal> to disable interaction with the
second-level cache.
</para>
- <sect1 id="batch-inserts">
+ <section id="batch-inserts">
<title>Batch inserts</title>
<para>
@@ -100,9 +102,9 @@
tx.commit();
session.close();]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="batch-update" >
+ <section id="batch-update" >
<title>Batch updates</title>
<para>
@@ -131,9 +133,9 @@
tx.commit();
session.close();]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="batch-statelesssession">
+ <section id="batch-statelesssession">
<title>The StatelessSession interface</title>
<para>
Alternatively, Hibernate provides a command-oriented API that can be used for
@@ -180,9 +182,9 @@
interface.
</para>
- </sect1>
+ </section>
- <sect1 id="batch-direct" revision="3">
+ <section id="batch-direct" revision="3">
<title>DML-style operations</title>
<para>
@@ -191,7 +193,7 @@
(DML) the statements: <literal>INSERT</literal>,
<literal>UPDATE</literal>, <literal>DELETE</literal>)
will not affect in-memory state. However, Hibernate provides methods
for bulk SQL-style DML statement execution that is performed through the
- Hibernate Query Language (<link
linkend="queryhql">HQL</link>).
+ Hibernate Query Language (<xref linkend="queryhql" />).
</para>
<para>
@@ -219,7 +221,7 @@
</listitem>
<listitem>
<para>
- No <link
linkend="queryhql-joins-forms">joins</link>, either implicit or
explicit,
+ No <xref linkend="queryhql-joins-forms" />, either
implicit or explicit,
can be specified in a bulk HQL query. Sub-queries can be used in the
where-clause, where
the subqueries themselves may contain joins.
</para>
@@ -251,8 +253,8 @@
<para>
In keeping with the EJB3 specification, HQL
<literal>UPDATE</literal> statements, by default, do not effect the
- <link
linkend="mapping-declaration-version">version</link>
- or the <link
linkend="mapping-declaration-timestamp">timestamp</link> property
values
+ version (<xref linkend="mapping-declaration-version" />)
+ or the timestamp (<xref linkend="mapping-declaration-timestamp"
/>) property values
for the affected entities. However,
you can force Hibernate to reset the <literal>version</literal>
or
<literal>timestamp</literal> property values through the use of a
<literal>versioned update</literal>.
@@ -372,6 +374,6 @@
tx.commit();
session.close();]]></programlisting>
- </sect1>
+ </section>
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/best_practices.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/best_practices.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/best_practices.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -22,9 +26,6 @@
~ 51 Franklin Street, Fifth Floor
~ Boston, MA 02110-1301 USA
-->
-
-<!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="3">
<title>Best Practices</title>
Deleted:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/bibliography.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/bibliography.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/bibliography.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,75 +0,0 @@
-<!--
- ~ Hibernate, Relational Persistence for Idiomatic Java
- ~
- ~ Copyright (c) 2009, Red Hat Middleware LLC or third-party contributors as
- ~ indicated by the @author tags or express copyright attribution
- ~ statements applied by the authors. All third-party contributions are
- ~ distributed under license by Red Hat Middleware LLC.
- ~
- ~ 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, as published by the Free Software Foundation.
- ~
- ~ This program is distributed in the hope that it will be useful,
- ~ but WITHOUT ANY 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
- ~ along with this distribution; if not, write to:
- ~ Free Software Foundation, Inc.
- ~ 51 Franklin Street, Fifth Floor
- ~ Boston, MA 02110-1301 USA
- -->
-<!DOCTYPE bibliography PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-
-<bibliography>
- <title>References</title>
-
- <biblioentry id="biblio-PoEAA">
- <abbrev>PoEAA</abbrev>
- <title>Patterns of Enterprise Application Architecture</title>
- <isbn>0-321-12742-0</isbn>
- <authorgroup>
- <author>
- <firstname>Martin</firstname>
- <surname>Fowler</surname>
- </author>
- </authorgroup>
- <copyright>
- <year>2003</year>
- <holder>Pearson Education, Inc.</holder>
- </copyright>
- <publisher>
- <publishername>Addison-Wesley Publishing Company</publishername>
- </publisher>
- </biblioentry>
-
- <biblioentry id="biblio-JPwH">
- <abbrev>JPwH</abbrev>
- <title>Java Persistence with Hibernate</title>
- <subtitle>Second Edition of Hibernate in Action</subtitle>
- <isbn>1-932394-88-5</isbn>
- <bibliomisc>
- <ulink
url="http://www.manning.com/bauer2"/>
- </bibliomisc>
- <authorgroup>
- <author>
- <firstname>Christian</firstname>
- <surname>Bauer</surname>
- </author>
- <author>
- <firstname>Gavin</firstname>
- <surname>King</surname>
- </author>
- </authorgroup>
- <copyright>
- <year>2007</year>
- <holder>Manning Publications Co.</holder>
- </copyright>
- <publisher>
- <publishername>Manning Publications Co.</publishername>
- </publisher>
- </biblioentry>
-
-</bibliography>
\ No newline at end of file
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/collection_mapping.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/collection_mapping.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/collection_mapping.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -23,12 +27,10 @@
~ Boston, MA 02110-1301 USA
-->
-<!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>Collection mapping</title>
- <sect1 id="collections-persistent" revision="3">
+ <section id="collections-persistent" revision="3">
<title>Persistent collections</title>
<para>
@@ -99,18 +101,18 @@
the semantics of bidirectional associations (these are discussed later).
</para>
- </sect1>
+ </section>
- <sect1 id="collections-mapping" revision="4">
+ <section id="collections-mapping" revision="4">
<title>Collection mappings</title>
- <tip>
+ <note>
<para>
There are quite a range of mappings that can be generated for collections
that cover
many common relational models. We suggest you experiment with the schema
generation tool
so that you understand how various mapping declarations translate to
database tables.
</para>
- </tip>
+ </note>
<para>
The Hibernate mapping element used for mapping a collection depends upon
@@ -270,7 +272,7 @@
</calloutlist>
</programlistingco>
- <sect2 id="collections-foreignkeys" >
+ <section id="collections-foreignkeys" >
<title>Collection foreign keys</title>
<para>
@@ -301,9 +303,9 @@
element.
</para>
- </sect2>
+ </section>
- <sect2 id="collections-elements" >
+ <section id="collections-elements" >
<title>Collection elements</title>
<para>
@@ -324,9 +326,9 @@
associations.
</para>
- </sect2>
+ </section>
- <sect2 id="collections-indexed">
+ <section id="collections-indexed">
<title>Indexed collections</title>
<para>
@@ -439,9 +441,9 @@
optionally sorted or ordered.
</para>
- </sect2>
+ </section>
- <sect2 id="collections-ofvalues" revision="2">
+ <section id="collections-ofvalues" revision="2">
<title>Collections of values and many-to-many associations</title>
<para>
@@ -643,9 +645,9 @@
</composite-element>
</list>]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="collections-onetomany">
+ <section id="collections-onetomany">
<title>One-to-many associations</title>
<para>
@@ -740,14 +742,14 @@
<map-key formula="partName"/>
<one-to-many class="Part"/>
</map>]]></programlisting>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="collections-advancedmappings">
+ <section id="collections-advancedmappings">
<title>Advanced collection mappings</title>
- <sect2 id="collections-sorted" revision="2">
+ <section id="collections-sorted" revision="2">
<title>Sorted collections</title>
<para>
@@ -814,9 +816,9 @@
<programlisting><![CDATA[sortedUsers = s.createFilter( group.getUsers(),
"order by this.name" ).list();]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="collections-bidirectional" revision="1">
+ <section id="collections-bidirectional" revision="1">
<title>Bidirectional associations</title>
<para>
@@ -925,9 +927,9 @@
affect the operation of cascades as these are orthogonal concepts.
</para>
- </sect2>
+ </section>
- <sect2 id="collections-indexedbidirectional">
+ <section id="collections-indexedbidirectional">
<title>Bidirectional associations with indexed collections</title>
<para>
A bidirectional association where one end is represented as a
<literal><list></literal>
@@ -993,9 +995,9 @@
updates to the foreign key. <!--TODO: Does this really result in some
unnecessary update statements?-->
</para>
- </sect2>
+ </section>
- <sect2 id="collections-ternary">
+ <section id="collections-ternary">
<title>Ternary associations</title>
<para>
@@ -1024,9 +1026,9 @@
A final alternative is to use composite elements, which will be discussed
later.
</para>
- </sect2>
+ </section>
- <sect2 id="collections-idbag" revision="1">
+ <section id="collections-idbag" revision="1">
<title><literal>Using an
<idbag></literal></title>
<para>
@@ -1070,9 +1072,9 @@
strategy is not supported for
<literal><idbag></literal> collection identifiers.
</para>
- </sect2>
+ </section>
- </sect1>
+ </section>
<!--undocumenting this stuff -->
@@ -1086,9 +1088,9 @@
rarely, if ever.
</para>
- </sect1-->
+ </section-->
- <sect1 id="collections-example" revision="1">
+ <section id="collections-example" revision="1">
<title>Collection examples</title>
<para>
@@ -1264,6 +1266,6 @@
in the next chapter.
</para>
- </sect1>
+ </section>
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/component_mapping.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/component_mapping.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/component_mapping.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -23,8 +27,6 @@
~ Boston, MA 02110-1301 USA
-->
-<!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 Mapping</title>
@@ -33,7 +35,7 @@
throughout Hibernate.
</para>
- <sect1 id="components-dependentobjects" revision="2" >
+ <section id="components-dependentobjects" revision="2" >
<title>Dependent objects</title>
<para>
@@ -157,9 +159,9 @@
</component>
</class>]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="components-incollections" revision="1">
+ <section id="components-incollections" revision="1">
<title>Collections of dependent objects</title>
<para>
@@ -179,12 +181,12 @@
</set>]]></programlisting>
<important>
- <para>
+ <para>
If you define a <literal>Set</literal> of composite elements, it
is
important to implement <literal>equals()</literal> and
- <literal>hashCode()</literal> correctly.
- </para>
- </important>
+ <literal>hashCode()</literal> correctly.</para>
+ </important>
+
<para>
Composite elements can contain components but not collections. If your
@@ -258,9 +260,9 @@
associations to other entities.
</para>
- </sect1>
+ </section>
- <sect1 id="components-asmapindex">
+ <section id="components-asmapindex">
<title>Components as Map indices</title>
<para>
@@ -269,9 +271,9 @@
<literal>hashCode()</literal> and
<literal>equals()</literal> correctly on
the component class.
</para>
- </sect1>
+ </section>
- <sect1 id="components-compositeid" revision="1">
+ <section id="components-compositeid" revision="1">
<title>Components as composite identifiers</title>
<para>
@@ -347,17 +349,15 @@
<column name="customerId"/>
</many-to-one>]]></programlisting>
- <tip>
- <para>
- The <literal>column</literal> element is an alternative to
the
- <literal>column</literal> attribute everywhere. Using the
- <literal>column</literal> element just gives more
declaration
- options, which are mostly useful when utilizing
- <literal>hbm2ddl</literal>
- </para>
- </tip>
-
- <para>
+ <note>
+ <para>
+ The <literal><column></literal> tag is an
alternative to the
+ <literal>column</literal> attribute everywhere. Using the
<literal><column></literal>
+ tag just gives more declaration options, which are mostly useful when
utilizing <literal>hbm2ddl</literal>.
+ </para>
+ </note>
+
+<para>
A <literal>many-to-many</literal> association to
<literal>OrderLine</literal> also
uses the composite foreign key:
</para>
@@ -409,9 +409,9 @@
</set>
</class>]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="components-dynamic" revision="1">
+ <section id="components-dynamic" revision="1">
<title>Dynamic components</title>
<para>
@@ -433,6 +433,6 @@
configuration-time metamodel via the
<literal>Configuration</literal> object.
</para>
- </sect1>
+ </section>
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/configuration.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/configuration.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/configuration.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,9 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
+
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -23,8 +28,6 @@
~ Boston, MA 02110-1301 USA
-->
-<!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>Configuration</title>
@@ -36,7 +39,7 @@
the various options. Simply put the example file in your classpath and customize
it to suit your needs.
</para>
- <sect1 id="configuration-programmatic" revision="1">
+ <section id="configuration-programmatic" revision="1">
<title>Programmatic configuration</title>
<para>
@@ -122,14 +125,14 @@
be discarded once a <literal>SessionFactory</literal> is
created.
</para>
- </sect1>
+ </section>
- <sect1 id="configuration-sessionfactory">
+ <section id="configuration-sessionfactory">
<title>Obtaining a SessionFactory</title>
<para>
When all mappings have been parsed by the
<classname>org.hibernate.cfg.Configuration</classname>,
- the application must obtain a factory for
<interfacename>org.hibernate.Session</interfacename> instances.
+ the application must obtain a factory for
<classname>org.hibernate.Session</classname> instances.
This factory is intended to be shared by all application threads:
</para>
@@ -137,13 +140,13 @@
<para>
Hibernate does allow your application to instantiate more than one
- <interfacename>org.hibernate.SessionFactory</interfacename>. This
is useful if you are using more than
+ <classname>org.hibernate.SessionFactory</classname>. This is
useful if you are using more than
one database.
</para>
- </sect1>
+ </section>
- <sect1 id="configuration-hibernatejdbc" revision="1">
+ <section id="configuration-hibernatejdbc">
<title>JDBC connections</title>
<para>
@@ -177,49 +180,49 @@
<colspec colname="c2" colwidth="1*"/>
<thead>
<row>
- <entry>Property name</entry>
- <entry>Purpose</entry>
+ <entry><para>Property
name</para></entry>
+ <entry><para>Purpose</para></entry>
</row>
</thead>
<tbody>
<row>
<entry>
- <property>hibernate.connection.driver_class</property>
- </entry>
+
<para><property>hibernate.connection.driver_class</property>
+ </para></entry>
<entry>
- <emphasis>JDBC driver class</emphasis>
+ <para><emphasis>JDBC driver
class</emphasis></para>
</entry>
</row>
<row>
<entry>
- <property>hibernate.connection.url</property>
+
<para><property>hibernate.connection.url</property></para>
</entry>
<entry>
- <emphasis>JDBC URL</emphasis>
+ <para><emphasis>JDBC URL</emphasis></para>
</entry>
</row>
<row>
<entry>
- <property>hibernate.connection.username</property>
+
<para><property>hibernate.connection.username</property></para>
</entry>
<entry>
- <emphasis>database user</emphasis>
+ <para><emphasis>database
user</emphasis></para>
</entry>
</row>
<row>
<entry>
- <property>hibernate.connection.password</property>
+
<para><property>hibernate.connection.password</property></para>
</entry>
<entry>
- <emphasis>database user password</emphasis>
+ <para><emphasis>database user
password</emphasis></para>
</entry>
</row>
<row>
<entry>
- <property>hibernate.connection.pool_size</property>
+
<para><property>hibernate.connection.pool_size</property></para>
</entry>
<entry>
- <emphasis>maximum number of pooled
connections</emphasis>
+ <para><emphasis>maximum number of pooled
connections</emphasis></para>
</entry>
</row>
</tbody>
@@ -248,7 +251,8 @@
The following is an example
<filename>hibernate.properties</filename> file for c3p0:
</para>
- <programlisting id="c3p0-configuration"
revision="1"><![CDATA[hibernate.connection.driver_class =
org.postgresql.Driver
+ <!-- <programlisting id="c3p0-configuration"
revision="1"> -->
+ <programlisting><![CDATA[hibernate.connection.driver_class =
org.postgresql.Driver
hibernate.connection.url = jdbc:postgresql://localhost/mydatabase
hibernate.connection.username = myuser
hibernate.connection.password = secret
@@ -271,50 +275,50 @@
<colspec colname="c2" colwidth="1*"/>
<thead>
<row>
- <entry>Property name</entry>
- <entry>Purpose</entry>
+ <entry><para>Property
name</para></entry>
+ <entry><para>Purpose</para></entry>
</row>
</thead>
<tbody>
<row>
<entry>
- <property>hibernate.connection.datasource</property>
+
<para><property>hibernate.connection.datasource</property></para>
</entry>
- <entry>
+ <entry><para>
<emphasis>datasource JNDI name</emphasis>
- </entry>
+ </para></entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.jndi.url</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
<emphasis>URL of the JNDI provider</emphasis> (optional)
- </entry>
+ </para></entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.jndi.class</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
<emphasis>class of the JNDI
<literal>InitialContextFactory</literal></emphasis> (optional)
- </entry>
+ </para></entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.connection.username</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
<emphasis>database user</emphasis> (optional)
- </entry>
+ </para></entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.connection.password</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
<emphasis>database user password</emphasis> (optional)
- </entry>
+ </para></entry>
</row>
</tbody>
</tgroup>
@@ -349,22 +353,22 @@
custom implementation via the
<property>hibernate.connection.provider_class</property> property.
</para>
- </sect1>
+ </section>
- <sect1 id="configuration-optional" revision="1">
+ <section id="configuration-optional" revision="1">
<title>Optional configuration properties</title>
<para>
There are a number of other properties that control the behavior of Hibernate
at runtime. All are optional
and have reasonable default values.
</para>
-
+ <warning>
<para>
- <warning><emphasis>Some of these properties are
"system-level" only.</emphasis> System-level properties can
- be set only via <literal>java -Dproperty=value</literal> or
<filename>hibernate.properties</filename>. They
- <emphasis>cannot</emphasis> be set by the other techniques
described above.</warning>
+ Some of these properties are system-level only. System-level properties can
+ be set only via <code>java -Dproperty=value</code> or
<filename>hibernate.properties</filename>. They
+ <emphasis>cannot</emphasis> be set by the other techniques
described above.
</para>
-
+</warning>
<table frame="topbot"
id="configuration-optional-properties" revision="8">
<title>Hibernate Configuration Properties</title>
<tgroup cols="2">
@@ -372,18 +376,19 @@
<colspec colname="c2" colwidth="1*"/>
<thead>
<row>
- <entry>Property name</entry>
- <entry>Purpose</entry>
+ <entry><para>Property
name</para></entry>
+ <entry><para>Purpose</para></entry>
</row>
</thead>
<tbody>
<row>
- <entry>
+ <entry><para>
<property>hibernate.dialect</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
The classname of a Hibernate
<classname>org.hibernate.dialect.Dialect</classname> which
allows Hibernate to generate SQL optimized for a particular
relational database.
+ </para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>full.classname.of.Dialect</literal>
@@ -396,13 +401,13 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.show_sql</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
Write all SQL statements to console. This is an alternative
to setting the log category
<literal>org.hibernate.SQL</literal>
- to <literal>debug</literal>.
+ to <literal>debug</literal>.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>true</literal> |
<literal>false</literal>
@@ -410,11 +415,11 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.format_sql</property>
- </entry>
- <entry>
- Pretty print the SQL in the log and console.
+ </para></entry>
+ <entry><para>
+ Pretty print the SQL in the log and console.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>true</literal> |
<literal>false</literal>
@@ -422,12 +427,12 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.default_schema</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
Qualify unqualified table names with the given
schema/tablespace
- in generated SQL.
+ in generated SQL.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>SCHEMA_NAME</literal>
@@ -435,12 +440,12 @@
</entry>
</row>
<row>
- <entry>
- <property>hibernate.default_catalog</property>
+ <entry><para>
+
<property>hibernate.default_catalog</property></para>
</entry>
- <entry>
+ <entry><para>
Qualifies unqualified table names with the given catalog
- in generated SQL.
+ in generated SQL.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>CATALOG_NAME</literal>
@@ -448,12 +453,12 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.session_factory_name</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
The
<interfacename>org.hibernate.SessionFactory</interfacename> will be
automatically
- bound to this name in JNDI after it has been created.
+ bound to this name in JNDI after it has been
created.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>jndi/composite/name</literal>
@@ -461,13 +466,13 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.max_fetch_depth</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
Sets a maximum "depth" for the outer join fetch
tree
for single-ended associations (one-to-one, many-to-one).
- A <literal>0</literal> disables default outer
join fetching.
+ A <literal>0</literal> disables default outer
join fetching.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
recommended values between
<literal>0</literal> and
@@ -476,11 +481,11 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.default_batch_fetch_size</property>
- </entry>
- <entry>
- Sets a default size for Hibernate batch fetching of
associations.
+ </para></entry>
+ <entry><para>
+ Sets a default size for Hibernate batch fetching of
associations.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
recommended values <literal>4</literal>,
<literal>8</literal>,
@@ -489,12 +494,12 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.default_entity_mode</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
Sets a default mode for entity representation for all
sessions
- opened from this
<literal>SessionFactory</literal>
+ opened from this
<literal>SessionFactory</literal>.</para>
<para>
<literal>dynamic-map</literal>,
<literal>dom4j</literal>,
<literal>pojo</literal>
@@ -502,13 +507,13 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.order_updates</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
Forces Hibernate to order SQL updates by the primary key
value
of the items being updated. This will result in fewer
transaction
- deadlocks in highly concurrent systems.
+ deadlocks in highly concurrent systems.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>true</literal> |
<literal>false</literal>
@@ -516,12 +521,12 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.generate_statistics</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
If enabled, Hibernate will collect statistics useful for
- performance tuning.
+ performance tuning.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>true</literal> |
<literal>false</literal>
@@ -529,12 +534,12 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.use_identifier_rollback</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
If enabled, generated identifier properties will be
- reset to default values when objects are deleted.
+ reset to default values when objects are
deleted.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>true</literal> |
<literal>false</literal>
@@ -542,12 +547,12 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.use_sql_comments</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
If turned on, Hibernate will generate comments inside the
SQL, for
- easier debugging, defaults to
<literal>false</literal>.
+ easier debugging, defaults to
<literal>false</literal>.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>true</literal> |
<literal>false</literal>
@@ -561,30 +566,32 @@
<table frame="topbot" id="configuration-jdbc-properties"
revision="8">
<title>Hibernate JDBC and Connection Properties</title>
<tgroup cols="2">
+<!--
<colspec colname="c1" colwidth="1*"/>
<colspec colname="c2" colwidth="1*"/>
+-->
<thead>
<row>
- <entry>Property name</entry>
- <entry>Purpose</entry>
+ <entry><para>Property
name</para></entry>
+ <entry><para>Purpose</para></entry>
</row>
</thead>
<tbody>
<row>
- <entry>
+ <entry><para>
<property>hibernate.jdbc.fetch_size</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
A non-zero value determines the JDBC fetch size (calls
<literal>Statement.setFetchSize()</literal>).
- </entry>
+ </para></entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.jdbc.batch_size</property>
- </entry>
- <entry>
- A non-zero value enables use of JDBC2 batch updates by
Hibernate.
+ </para></entry>
+ <entry><para>
+ A non-zero value enables use of JDBC2 batch updates by
Hibernate.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
recommended values between
<literal>5</literal> and <literal>30</literal>
@@ -592,14 +599,14 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.jdbc.batch_versioned_data</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
Set this property to <literal>true</literal> if
your JDBC driver returns
correct row counts from
<literal>executeBatch()</literal>. Iit is usually
safe to turn this option on. Hibernate will then use batched
DML for
- automatically versioned data. Defaults to
<literal>false</literal>.
+ automatically versioned data. Defaults to
<literal>false</literal>.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>true</literal> |
<literal>false</literal>
@@ -607,12 +614,12 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.jdbc.factory_class</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
Select a custom
<interfacename>org.hibernate.jdbc.Batcher</interfacename>. Most applications
- will not need this configuration property.
+ will not need this configuration property.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>classname.of.BatcherFactory</literal>
@@ -620,13 +627,13 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.jdbc.use_scrollable_resultset</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
Enables use of JDBC2 scrollable resultsets by Hibernate.
This property is only necessary when using user-supplied
- JDBC connections. Hibernate uses connection metadata
otherwise.
+ JDBC connections. Hibernate uses connection metadata
otherwise.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>true</literal> |
<literal>false</literal>
@@ -634,12 +641,12 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.jdbc.use_streams_for_binary</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
Use streams when writing/reading
<literal>binary</literal> or <literal>serializable</literal>
- types to/from JDBC. <emphasis>*system-level
property*</emphasis>
+ types to/from JDBC. <emphasis>*system-level
property*</emphasis></para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>true</literal> |
<literal>false</literal>
@@ -647,15 +654,15 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.jdbc.use_get_generated_keys</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
Enables use of JDBC3
<literal>PreparedStatement.getGeneratedKeys()</literal>
to retrieve natively generated keys after insert. Requires
JDBC3+ driver
and JRE1.4+, set to false if your driver has problems with
the Hibernate
identifier generators. By default, it tries to determine the
driver capabilities
- using connection metadata.
+ using connection metadata.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>true|false</literal>
@@ -663,12 +670,12 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.connection.provider_class</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
The classname of a custom
<interfacename>org.hibernate.connection.ConnectionProvider</interfacename>
- which provides JDBC connections to Hibernate.
+ which provides JDBC connections to Hibernate.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>classname.of.ConnectionProvider</literal>
@@ -676,25 +683,25 @@
</entry>
</row>
<row>
- <entry>
-
<property>hibernate.connection.isolation</property>
- </entry>
- <entry>
- Sets the JDBC transaction isolation level. Check
<interfacename>java.sql.Connection</interfacename>
- for meaningful values, but note that most databases do not
support all isolation levels and some
- define additional, non-standard isolations.
- <para>
- <emphasis
role="strong">e.g.</emphasis>
- <literal>1, 2, 4, 8</literal>
- </para>
- </entry>
+ <entry><para>
+ <property>hibernate.connection.isolation</property>
+ </para></entry>
+ <entry><para>
+ Sets the JDBC transaction isolation level. Check
<interfacename>java.sql.Connection</interfacename>
+ for meaningful values, but note that most databases do not
support all isolation levels and some
+ define additional, non-standard isolations.</para>
+ <para>
+ <emphasis role="strong">e.g.</emphasis>
+ <literal>1, 2, 4, 8</literal>
+ </para>
+ </entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.connection.autocommit</property>
- </entry>
- <entry>
- Enables autocommit for JDBC pooled connections (it is not
recommended).
+ </para></entry>
+ <entry><para>
+ Enables autocommit for JDBC pooled connections (it is not
recommended).</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>true</literal> |
<literal>false</literal>
@@ -702,10 +709,10 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.connection.release_mode</property>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
Specifies when Hibernate should release JDBC connections. By
default,
a JDBC connection is held until the session is explicitly
closed or
disconnected. For an application server JTA datasource, use
@@ -715,7 +722,7 @@
<literal>after_transaction</literal>.
<literal>auto</literal> will
choose <literal>after_statement</literal> for the
JTA and CMT transaction
strategies and
<literal>after_transaction</literal> for the JDBC
- transaction strategy.
+ transaction strategy.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>auto</literal> (default) |
<literal>on_close</literal> |
@@ -732,22 +739,22 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.connection.</property><emphasis><propertyName></emphasis>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
Pass the JDBC property
<emphasis><propertyName></emphasis>
to
<literal>DriverManager.getConnection()</literal>.
- </entry>
+ </para></entry>
</row>
<row>
- <entry>
+ <entry><para>
<property>hibernate.jndi.</property><emphasis><propertyName></emphasis>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
Pass the property
<emphasis><propertyName></emphasis> to
the JNDI
<literal>InitialContextFactory</literal>.
- </entry>
+ </para></entry>
</row>
</tbody>
</tgroup>
@@ -760,17 +767,17 @@
<colspec colname="c2" colwidth="1*"/>
<thead>
<row>
- <entry>Property name</entry>
- <entry>Purpose</entry>
+ <entry><para>Property
name</para></entry>
+ <entry><para>Purpose</para></entry>
</row>
</thead>
<tbody>
<row>
- <entry>
+ <entry><para>
<literal>hibernate.cache.provider_class</literal>
- </entry>
- <entry>
- The classname of a custom
<literal>CacheProvider</literal>.
+ </para></entry>
+ <entry><para>
+ The classname of a custom
<literal>CacheProvider</literal>.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>classname.of.CacheProvider</literal>
@@ -778,14 +785,14 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<literal>hibernate.cache.use_minimal_puts</literal>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
Optimizes second-level cache operation to minimize writes, at
the
cost of more frequent reads. This setting is most useful for
clustered caches and, in Hibernate3, is enabled by default
for
- clustered cache implementations.
+ clustered cache implementations.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>true|false</literal>
@@ -793,11 +800,11 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<literal>hibernate.cache.use_query_cache</literal>
- </entry>
- <entry>
- Enables the query cache. Individual queries still have to be
set cachable.
+ </para></entry>
+ <entry><para>
+ Enables the query cache. Individual queries still have to be
set cachable.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>true|false</literal>
@@ -805,13 +812,13 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<literal>hibernate.cache.use_second_level_cache</literal>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
Can be used to completely disable the second level cache,
which is enabled
by default for classes which specify a
<literal><cache></literal>
- mapping.
+ mapping.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>true|false</literal>
@@ -819,12 +826,12 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<literal>hibernate.cache.query_cache_factory</literal>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
The classname of a custom
<literal>QueryCache</literal> interface,
- defaults to the built-in
<literal>StandardQueryCache</literal>.
+ defaults to the built-in
<literal>StandardQueryCache</literal>.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>classname.of.QueryCache</literal>
@@ -832,11 +839,11 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<literal>hibernate.cache.region_prefix</literal>
- </entry>
- <entry>
- A prefix to use for second-level cache region names.
+ </para></entry>
+ <entry><para>
+ A prefix to use for second-level cache region
names.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>prefix</literal>
@@ -844,12 +851,12 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<literal>hibernate.cache.use_structured_entries</literal>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
Forces Hibernate to store data in the second-level cache
- in a more human-friendly format.
+ in a more human-friendly format.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>true|false</literal>
@@ -867,19 +874,19 @@
<colspec colname="c2" colwidth="1*"/>
<thead>
<row>
- <entry>Property name</entry>
- <entry>Purpose</entry>
+ <entry><para>Property
name</para></entry>
+ <entry><para>Purpose</para></entry>
</row>
</thead>
<tbody>
<row>
- <entry>
+ <entry><para>
<literal>hibernate.transaction.factory_class</literal>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
The classname of a
<literal>TransactionFactory</literal>
to use with Hibernate
<literal>Transaction</literal> API
- (defaults to
<literal>JDBCTransactionFactory</literal>).
+ (defaults to
<literal>JDBCTransactionFactory</literal>).</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>classname.of.TransactionFactory</literal>
@@ -887,13 +894,13 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<literal>jta.UserTransaction</literal>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
A JNDI name used by
<literal>JTATransactionFactory</literal> to
obtain the JTA <literal>UserTransaction</literal>
from the
- application server.
+ application server.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>jndi/composite/name</literal>
@@ -901,13 +908,14 @@
</entry>
</row>
<row>
- <entry>
-
<literal>hibernate.transaction.manager_lookup_class</literal>
+ <entry><para>
+ <literal>hibernate.transaction.
+ manager_lookup_class</literal></para>
</entry>
- <entry>
+ <entry><para>
The classname of a
<literal>TransactionManagerLookup</literal>. It is
required when JVM-level caching is enabled or when using hilo
- generator in a JTA environment.
+ generator in a JTA environment.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>classname.of.TransactionManagerLookup</literal>
@@ -915,14 +923,15 @@
</entry>
</row>
<row>
- <entry>
-
<literal>hibernate.transaction.flush_before_completion</literal>
- </entry>
- <entry>
+ <entry><para>
+ <literal>hibernate.transaction.
+ flush_before_completion</literal>
+ </para></entry>
+ <entry><para>
If enabled, the session will be automatically flushed during
the
before completion phase of the transaction. Built-in and
automatic session context management is preferred, see
- <xref
linkend="architecture-current-session"/>.
+ <xref
linkend="architecture-current-session"/>.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>true</literal> |
<literal>false</literal>
@@ -930,14 +939,15 @@
</entry>
</row>
<row>
- <entry>
-
<literal>hibernate.transaction.auto_close_session</literal>
- </entry>
- <entry>
+ <entry><para>
+ <literal>hibernate.transaction.
+ auto_close_session</literal>
+ </para></entry>
+ <entry><para>
If enabled, the session will be automatically closed during
the
after completion phase of the transaction. Built-in and
automatic session context management is preferred, see
- <xref
linkend="architecture-current-session"/>.
+ <xref
linkend="architecture-current-session"/>.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>true</literal> |
<literal>false</literal>
@@ -955,20 +965,21 @@
<colspec colname="c2" colwidth="1*"/>
<thead>
<row>
- <entry>Property name</entry>
- <entry>Purpose</entry>
+ <entry><para>Property
name</para></entry>
+ <entry><para>Purpose</para></entry>
</row>
</thead>
<tbody>
<row>
- <entry>
-
<literal>hibernate.current_session_context_class</literal>
- </entry>
- <entry>
+ <entry><para>
+ <literal>hibernate.
+ current_session_context_class</literal>
+ </para></entry>
+ <entry><para>
Supply a custom strategy for the scoping of the
"current"
<literal>Session</literal>. See
<xref
linkend="architecture-current-session"/> for more
- information about the built-in strategies.
+ information about the built-in strategies.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>jta</literal> |
<literal>thread</literal> |
@@ -977,11 +988,11 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<literal>hibernate.query.factory_class</literal>
- </entry>
- <entry>
- Chooses the HQL parser implementation.
+ </para></entry>
+ <entry><para>
+ Chooses the HQL parser implementation.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>org.hibernate.hql.ast.ASTQueryTranslatorFactory</literal> or
@@ -990,12 +1001,12 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<literal>hibernate.query.substitutions</literal>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
Is used to map from tokens in Hibernate queries to SQL
tokens
- (tokens might be function or literal names, for example).
+ (tokens might be function or literal names, for
example).</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>hqlLiteral=SQL_LITERAL,
hqlFunction=SQLFUNC</literal>
@@ -1003,15 +1014,15 @@
</entry>
</row>
<row>
- <entry>
+ <entry><para>
<literal>hibernate.hbm2ddl.auto</literal>
- </entry>
- <entry>
+ </para></entry>
+ <entry><para>
Automatically validates or exports schema DDL to the database
when the <literal>SessionFactory</literal> is
created. With
<literal>create-drop</literal>, the database
schema will be
dropped when the
<literal>SessionFactory</literal> is closed
- explicitly.
+ explicitly.</para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>validate</literal> |
<literal>update</literal> |
@@ -1020,14 +1031,16 @@
</entry>
</row>
<row>
- <entry>
-
<literal>hibernate.cglib.use_reflection_optimizer</literal>
- </entry>
- <entry>
+ <entry><para>
+ <literal>hibernate.cglib.
+ use_reflection_optimizer</literal>
+ </para></entry>
+ <entry><para>
Enables the use of CGLIB instead of runtime reflection
(System-level
property). Reflection can sometimes be useful when
troubleshooting.
Hibernate always requires CGLIB even if you turn off the
optimizer. You cannot set this property in
<literal>hibernate.cfg.xml</literal>.
+ </para>
<para>
<emphasis
role="strong">e.g.</emphasis>
<literal>true</literal> |
<literal>false</literal>
@@ -1038,7 +1051,7 @@
</tgroup>
</table>
- <sect2 id="configuration-optional-dialects"
revision="1">
+ <section id="configuration-optional-dialects"
revision="1">
<title>SQL Dialects</title>
<para>
@@ -1051,91 +1064,93 @@
<table frame="topbot" id="sql-dialects"
revision="3">
<title>Hibernate SQL Dialects
(<literal>hibernate.dialect</literal>)</title>
<tgroup cols="2">
+<!--
<colspec colwidth="1*"/>
<colspec colwidth="2.5*"/>
+-->
<thead>
<row>
- <entry>RDBMS</entry>
- <entry>Dialect</entry>
+ <entry><para>RDBMS</para></entry>
+ <entry><para>Dialect</para></entry>
</row>
</thead>
<tbody>
<row>
- <entry>DB2</entry>
<entry><literal>org.hibernate.dialect.DB2Dialect</literal></entry>
+ <entry><para>DB2</para></entry>
<entry><para><literal>org.hibernate.dialect.DB2Dialect</literal></para></entry>
</row>
<row>
- <entry>DB2 AS/400</entry>
<entry><literal>org.hibernate.dialect.DB2400Dialect</literal></entry>
+ <entry><para>DB2
AS/400</para></entry>
<entry><para><literal>org.hibernate.dialect.DB2400Dialect</literal></para></entry>
</row>
<row>
- <entry>DB2 OS390</entry>
<entry><literal>org.hibernate.dialect.DB2390Dialect</literal></entry>
+ <entry><para>DB2 OS390</para></entry>
<entry><para><literal>org.hibernate.dialect.DB2390Dialect</literal></para></entry>
</row>
<row>
- <entry>PostgreSQL</entry>
<entry><literal>org.hibernate.dialect.PostgreSQLDialect</literal></entry>
+
<entry><para>PostgreSQL</para></entry>
<entry><para><literal>org.hibernate.dialect.PostgreSQLDialect</literal></para></entry>
</row>
<row>
- <entry>MySQL</entry>
<entry><literal>org.hibernate.dialect.MySQLDialect</literal></entry>
+ <entry><para>MySQL</para></entry>
<entry><para><literal>org.hibernate.dialect.MySQLDialect</literal></para></entry>
</row>
<row>
- <entry>MySQL with InnoDB</entry>
<entry><literal>org.hibernate.dialect.MySQLInnoDBDialect</literal></entry>
+ <entry><para>MySQL with
InnoDB</para></entry>
<entry><para><literal>org.hibernate.dialect.MySQLInnoDBDialect</literal></para></entry>
</row>
<row>
- <entry>MySQL with MyISAM</entry>
<entry><literal>org.hibernate.dialect.MySQLMyISAMDialect</literal></entry>
+ <entry><para>MySQL with
MyISAM</para></entry>
<entry><para><literal>org.hibernate.dialect.MySQLMyISAMDialect</literal></para></entry>
</row>
<row>
- <entry>Oracle (any version)</entry>
<entry><literal>org.hibernate.dialect.OracleDialect</literal></entry>
+ <entry><para>Oracle (any
version)</para></entry>
<entry><para><literal>org.hibernate.dialect.OracleDialect</literal></para></entry>
</row>
<row>
- <entry>Oracle 9i</entry>
<entry><literal>org.hibernate.dialect.Oracle9iDialect</literal></entry>
+ <entry><para>Oracle 9i</para></entry>
<entry><para><literal>org.hibernate.dialect.Oracle9iDialect</literal></para></entry>
</row>
<row>
- <entry>Oracle 10g</entry>
<entry><literal>org.hibernate.dialect.Oracle10gDialect</literal></entry>
+ <entry><para>Oracle
10g</para></entry>
<entry><para><literal>org.hibernate.dialect.Oracle10gDialect</literal></para></entry>
</row>
<row>
- <entry>Sybase</entry>
<entry><literal>org.hibernate.dialect.SybaseDialect</literal></entry>
+ <entry><para>Sybase</para></entry>
<entry><para><literal>org.hibernate.dialect.SybaseDialect</literal></para></entry>
</row>
<row>
- <entry>Sybase Anywhere</entry>
<entry><literal>org.hibernate.dialect.SybaseAnywhereDialect</literal></entry>
+ <entry><para>Sybase
Anywhere</para></entry>
<entry><para><literal>org.hibernate.dialect.SybaseAnywhereDialect</literal></para></entry>
</row>
<row>
- <entry>Microsoft SQL Server</entry>
<entry><literal>org.hibernate.dialect.SQLServerDialect</literal></entry>
+ <entry><para>Microsoft SQL
Server</para></entry>
<entry><para><literal>org.hibernate.dialect.SQLServerDialect</literal></para></entry>
</row>
<row>
- <entry>SAP DB</entry>
<entry><literal>org.hibernate.dialect.SAPDBDialect</literal></entry>
+ <entry><para>SAP DB</para></entry>
<entry><para><literal>org.hibernate.dialect.SAPDBDialect</literal></para></entry>
</row>
<row>
- <entry>Informix</entry>
<entry><literal>org.hibernate.dialect.InformixDialect</literal></entry>
+ <entry><para>Informix</para></entry>
<entry><para><literal>org.hibernate.dialect.InformixDialect</literal></para></entry>
</row>
<row>
- <entry>HypersonicSQL</entry>
<entry><literal>org.hibernate.dialect.HSQLDialect</literal></entry>
+
<entry><para>HypersonicSQL</para></entry>
<entry><para><literal>org.hibernate.dialect.HSQLDialect</literal></para></entry>
</row>
<row>
- <entry>Ingres</entry>
<entry><literal>org.hibernate.dialect.IngresDialect</literal></entry>
+ <entry><para>Ingres</para></entry>
<entry><para><literal>org.hibernate.dialect.IngresDialect</literal></para></entry>
</row>
<row>
- <entry>Progress</entry>
<entry><literal>org.hibernate.dialect.ProgressDialect</literal></entry>
+ <entry><para>Progress</para></entry>
<entry><para><literal>org.hibernate.dialect.ProgressDialect</literal></para></entry>
</row>
<row>
- <entry>Mckoi SQL</entry>
<entry><literal>org.hibernate.dialect.MckoiDialect</literal></entry>
+ <entry><para>Mckoi SQL</para></entry>
<entry><para><literal>org.hibernate.dialect.MckoiDialect</literal></para></entry>
</row>
<row>
- <entry>Interbase</entry>
<entry><literal>org.hibernate.dialect.InterbaseDialect</literal></entry>
+ <entry><para>Interbase</para></entry>
<entry><para><literal>org.hibernate.dialect.InterbaseDialect</literal></para></entry>
</row>
<row>
- <entry>Pointbase</entry>
<entry><literal>org.hibernate.dialect.PointbaseDialect</literal></entry>
+ <entry><para>Pointbase</para></entry>
<entry><para><literal>org.hibernate.dialect.PointbaseDialect</literal></para></entry>
</row>
<row>
- <entry>FrontBase</entry>
<entry><literal>org.hibernate.dialect.FrontbaseDialect</literal></entry>
+ <entry><para>FrontBase</para></entry>
<entry><para><literal>org.hibernate.dialect.FrontbaseDialect</literal></para></entry>
</row>
<row>
- <entry>Firebird</entry>
<entry><literal>org.hibernate.dialect.FirebirdDialect</literal></entry>
+ <entry><para>Firebird</para></entry>
<entry><para><literal>org.hibernate.dialect.FirebirdDialect</literal></para></entry>
</row>
</tbody>
</tgroup>
</table>
- </sect2>
+ </section>
- <sect2 id="configuration-optional-outerjoin"
revision="4">
+ <section id="configuration-optional-outerjoin"
revision="4">
<title>Outer Join Fetching</title>
<para>
@@ -1159,9 +1174,9 @@
See <xref linkend="performance-fetching"/> for more
information.
</para>
- </sect2>
+ </section>
- <sect2 id="configuration-optional-binarystreams"
revision="1">
+ <section id="configuration-optional-binarystreams"
revision="1">
<title>Binary Streams</title>
<para>
@@ -1172,9 +1187,9 @@
<emphasis>This is a system-level setting only.</emphasis>
</para>
- </sect2>
+ </section>
- <sect2 id="configuration-optional-cacheprovider"
revision="2">
+ <section id="configuration-optional-cacheprovider"
revision="2">
<title>Second-level and query cache</title>
<para>
@@ -1184,9 +1199,9 @@
more information.
</para>
- </sect2>
+ </section>
- <sect2 id="configuration-optional-querysubstitution">
+ <section id="configuration-optional-querysubstitution">
<title>Query Language Substitution</title>
<para>
@@ -1207,9 +1222,9 @@
This would allow you to rename the SQL
<literal>LOWER</literal> function.
</para>
- </sect2>
+ </section>
- <sect2 id="configuration-optional-statistics"
revision="2">
+ <section id="configuration-optional-statistics"
revision="2">
<title>Hibernate statistics</title>
<para>
@@ -1220,10 +1235,10 @@
<literal>org.hibernate.stats</literal> for more information.
</para>
- </sect2>
- </sect1>
+ </section>
+ </section>
- <sect1 id="configuration-logging">
+ <section id="configuration-logging">
<title>Logging</title>
<para>
@@ -1252,58 +1267,61 @@
<colspec colwidth="2.5*"/>
<thead>
<row>
- <entry>Category</entry>
- <entry>Function</entry>
+ <entry><para>Category</para></entry>
+ <entry><para>Function</para></entry>
</row>
</thead>
<tbody>
<row>
-
<entry><literal>org.hibernate.SQL</literal></entry>
- <entry>Log all SQL DML statements as they are
executed</entry>
+
<entry><para><literal>org.hibernate.SQL</literal></para></entry>
+ <entry><para>Log all SQL DML statements as they
are executed</para></entry>
</row>
<row>
-
<entry><literal>org.hibernate.type</literal></entry>
- <entry>Log all JDBC parameters</entry>
+
<entry><para><literal>org.hibernate.type</literal></para></entry>
+ <entry><para>Log all JDBC
parameters</para></entry>
</row>
<row>
-
<entry><literal>org.hibernate.tool.hbm2ddl</literal></entry>
- <entry>Log all SQL DDL statements as they are
executed</entry>
+ <entry><para><literal>org.hibernate.tool.
+ hbm2ddl</literal></para></entry>
+ <entry><para>Log all SQL DDL statements as they
are executed</para></entry>
</row>
<row>
-
<entry><literal>org.hibernate.pretty</literal></entry>
- <entry>
+
<entry><para><literal>org.hibernate.pretty</literal></para></entry>
+ <entry><para>
Log the state of all entities (max 20 entities)
associated
with the session at flush time
- </entry>
+ </para></entry>
</row>
<row>
-
<entry><literal>org.hibernate.cache</literal></entry>
- <entry>Log all second-level cache
activity</entry>
+
<entry><para><literal>org.hibernate.cache</literal></para></entry>
+ <entry><para>Log all second-level cache
activity</para></entry>
</row>
<row>
-
<entry><literal>org.hibernate.transaction</literal></entry>
- <entry>Log transaction related activity</entry>
+ <entry><para><literal>org.hibernate.
+ transaction</literal></para></entry>
+ <entry><para>Log transaction related
activity</para></entry>
</row>
<row>
-
<entry><literal>org.hibernate.jdbc</literal></entry>
- <entry>Log all JDBC resource acquisition</entry>
+
<entry><para><literal>org.hibernate.jdbc</literal></para></entry>
+ <entry><para>Log all JDBC resource
acquisition</para></entry>
</row>
<row>
-
<entry><literal>org.hibernate.hql.ast.AST</literal></entry>
- <entry>
+ <entry><para><literal>org.hibernate.hql.
+ ast.AST</literal></para></entry>
+ <entry><para>
Log HQL and SQL ASTs during query parsing
- </entry>
+ </para></entry>
</row>
<row>
-
<entry><literal>org.hibernate.secure</literal></entry>
- <entry>Log all JAAS authorization
requests</entry>
+
<entry><para><literal>org.hibernate.secure</literal></para></entry>
+ <entry><para>Log all JAAS authorization
requests</para></entry>
</row>
<row>
-
<entry><literal>org.hibernate</literal></entry>
- <entry>
+
<entry><para><literal>org.hibernate</literal></para></entry>
+ <entry><para>
Log everything. This is a lot of information but it is
useful for
troubleshooting
- </entry>
+ </para></entry>
</row>
</tbody>
</tgroup>
@@ -1316,9 +1334,9 @@
</para>
- </sect1>
+ </section>
- <sect1 id="configuration-namingstrategy">
+ <section id="configuration-namingstrategy">
<title>Implementing a
<literal>NamingStrategy</literal></title>
<para>
@@ -1351,9 +1369,9 @@
strategy that might be a useful starting point for some applications.
</para>
- </sect1>
+ </section>
- <sect1 id="configuration-xmlconfig" revision="2">
+ <section id="configuration-xmlconfig" revision="2">
<title>XML configuration file</title>
<para>
@@ -1424,9 +1442,9 @@
.configure("catdb.cfg.xml")
.buildSessionFactory();]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="configuration-j2ee" revision="1">
+ <section id="configuration-j2ee" revision="1">
<title>J2EE Application Server integration</title>
<para>
@@ -1489,7 +1507,7 @@
application server shows "connection containment" exceptions.
</para>
- <sect2 id="configuration-optional-transactionstrategy"
revision="3">
+ <section id="configuration-optional-transactionstrategy"
revision="3">
<title>Transaction strategy configuration</title>
<para>
@@ -1555,58 +1573,68 @@
<colspec colwidth="1*"/>
<thead>
<row>
- <entry>Transaction Factory</entry>
- <entry align="center">Application
Server</entry>
+ <entry><para>Transaction
Factory</para></entry>
+ <entry align="center"><para>Application
Server</para></entry>
</row>
</thead>
<tbody>
<row>
-
<entry><literal>org.hibernate.transaction.JBossTransactionManagerLookup</literal></entry>
- <entry align="center">JBoss</entry>
+
<entry><para><literal>org.hibernate.transaction.
+
JBossTransactionManagerLookup</literal></para></entry>
+ <entry
align="center"><para>JBoss</para></entry>
</row>
<row>
-
<entry><literal>org.hibernate.transaction.WeblogicTransactionManagerLookup</literal></entry>
- <entry align="center">Weblogic</entry>
+
<entry><para><literal>org.hibernate.transaction.
+
WeblogicTransactionManagerLookup</literal></para></entry>
+ <entry
align="center"><para>Weblogic</para></entry>
</row>
<row>
-
<entry><literal>org.hibernate.transaction.WebSphereTransactionManagerLookup</literal></entry>
- <entry
align="center">WebSphere</entry>
+
<entry><para><literal>org.hibernate.transaction.
+
WebSphereTransactionManagerLookup</literal></para></entry>
+ <entry
align="center"><para>WebSphere</para></entry>
</row>
<row>
-
<entry><literal>org.hibernate.transaction.WebSphereExtendedJTATransactionLookup</literal></entry>
- <entry align="center">WebSphere
6</entry>
+
<entry><para><literal>org.hibernate.transaction.
+
WebSphereExtendedJTATransactionLookup</literal></para></entry>
+ <entry align="center"><para>WebSphere
6</para></entry>
</row>
<row>
-
<entry><literal>org.hibernate.transaction.OrionTransactionManagerLookup</literal></entry>
- <entry align="center">Orion</entry>
+
<entry><para><literal>org.hibernate.transaction.
+
OrionTransactionManagerLookup</literal></para></entry>
+ <entry
align="center"><para>Orion</para></entry>
</row>
<row>
-
<entry><literal>org.hibernate.transaction.ResinTransactionManagerLookup</literal></entry>
- <entry align="center">Resin</entry>
+
<entry><para><literal>org.hibernate.transaction.
+
ResinTransactionManagerLookup</literal></para></entry>
+ <entry
align="center"><para>Resin</para></entry>
</row>
<row>
-
<entry><literal>org.hibernate.transaction.JOTMTransactionManagerLookup</literal></entry>
- <entry align="center">JOTM</entry>
+
<entry><para><literal>org.hibernate.transaction.
+
JOTMTransactionManagerLookup</literal></para></entry>
+ <entry
align="center"><para>JOTM</para></entry>
</row>
<row>
-
<entry><literal>org.hibernate.transaction.JOnASTransactionManagerLookup</literal></entry>
- <entry align="center">JOnAS</entry>
+
<entry><para><literal>org.hibernate.transaction.
+
JOnASTransactionManagerLookup</literal></para></entry>
+ <entry
align="center"><para>JOnAS</para></entry>
</row>
<row>
-
<entry><literal>org.hibernate.transaction.JRun4TransactionManagerLookup</literal></entry>
- <entry align="center">JRun4</entry>
+
<entry><para><literal>org.hibernate.transaction.
+
JRun4TransactionManagerLookup</literal></para></entry>
+ <entry
align="center"><para>JRun4</para></entry>
</row>
<row>
-
<entry><literal>org.hibernate.transaction.BESTransactionManagerLookup</literal></entry>
- <entry align="center">Borland
ES</entry>
+
<entry><para><literal>org.hibernate.transaction.
+
BESTransactionManagerLookup</literal></para></entry>
+ <entry align="center"><para>Borland
ES</para></entry>
</row>
</tbody>
</tgroup>
</table>
- </sect2>
+ </section>
- <sect2 id="configuration-optional-jndi" revision="3">
+ <section id="configuration-optional-jndi"
revision="3">
<title>JNDI-bound
<literal>SessionFactory</literal></title>
<para>
@@ -1652,15 +1680,15 @@
class is also a convenient way to startup Hibernate—see chapter
1.
</para>
- </sect2>
+ </section>
- <sect2 id="configuration-j2ee-currentsession"
revision="4">
+ <section id="configuration-j2ee-currentsession"
revision="4">
<title>Current Session context management with JTA</title>
<para>
The easiest way to handle <literal>Sessions</literal> and
transactions is
Hibernate's automatic "current"
<literal>Session</literal> management.
- For a discussion of contextual sessions see <xref
linkend="architecture-current-session"/>.
+ For a discussion of contextual sessions see <xref
linkend="architecture-current-session" />.
Using the <literal>"jta"</literal> session context,
if there is no Hibernate
<literal>Session</literal> associated with the current JTA
transaction, one will
be started and associated with that JTA transaction the first time you call
@@ -1677,9 +1705,9 @@
demarcation with CMT is preferred.
</para>
- </sect2>
+ </section>
- <sect2 id="configuration-j2ee-jmx" revision="1">
+ <section id="configuration-j2ee-jmx" revision="1">
<title>JMX deployment</title>
<para>
@@ -1750,9 +1778,9 @@
documentation for more information about JMX service and EJB deployment.
</para>
- </sect2>
+ </section>
- </sect1>
+ </section>
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/events.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/events.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/events.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -23,8 +27,6 @@
~ Boston, MA 02110-1301 USA
-->
-<!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>
@@ -34,7 +36,7 @@
functionality and the extension of Hibernate functionality.
</para>
- <sect1 id="objectstate-interceptors" revision="3">
+ <section id="objectstate-interceptors" revision="3">
<title>Interceptors</title>
<para>
@@ -160,9 +162,9 @@
<programlisting><![CDATA[new Configuration().setInterceptor( new
AuditInterceptor() );]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="objectstate-events" revision="4">
+ <section id="objectstate-events" revision="4">
<title>Event system</title>
<para>
@@ -249,9 +251,9 @@
or off during configuration.
</para>
- </sect1>
+ </section>
- <sect1 id="objectstate-decl-security" revision="2">
+ <section id="objectstate-decl-security" revision="2">
<title>Hibernate declarative security</title>
<para>
Usually, declarative security in Hibernate applications is managed in a
session facade
@@ -286,7 +288,7 @@
The role names are the roles understood by your JACC provider.
</para>
- </sect1>
+ </section>
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/example_mappings.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/example_mappings.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/example_mappings.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -23,8 +27,6 @@
~ Boston, MA 02110-1301 USA
-->
-<!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>Example: Various Mappings</title>
@@ -33,7 +35,7 @@
This chapters explores some more complex association mappings.
</para>
- <sect1 id="example-mappings-emp">
+ <section id="example-mappings-emp">
<title>Employer/Employee</title>
<para>
@@ -46,10 +48,10 @@
<mediaobject>
<imageobject role="html">
- <imagedata fileref="../images/EmployerEmployee.png"
format="PNG" align="center" />
+ <imagedata fileref="images/EmployerEmployee.png"
format="PNG" align="center" />
</imageobject>
<imageobject role="fo">
- <imagedata fileref="../images/EmployerEmployee.png"
format="PNG" align="center" width="17cm" />
+ <imagedata fileref="images/EmployerEmployee.png"
format="PNG" align="center" width="17cm" />
</imageobject>
</mediaobject>
@@ -144,9 +146,9 @@
create sequence employment_id_seq
create sequence employer_id_seq]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="example-mappings-authorwork">
+ <section id="example-mappings-authorwork">
<title>Author/Work</title>
<para>
@@ -160,10 +162,10 @@
<mediaobject>
<imageobject role="html">
- <imagedata fileref="../images/AuthorWork.png"
format="PNG" align="center" />
+ <imagedata fileref="images/AuthorWork.png"
format="PNG" align="center" />
</imageobject>
<imageobject role="fo">
- <imagedata fileref="../images/AuthorWork.png"
format="PNG" align="center" width="17cm" />
+ <imagedata fileref="images/AuthorWork.png"
format="PNG" align="center" width="17cm" />
</imageobject>
</mediaobject>
@@ -266,9 +268,9 @@
alter table author_work
add constraint author_workFK1 foreign key (work_id) references
works]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="example-mappings-customerorderproduct">
+ <section id="example-mappings-customerorderproduct">
<title>Customer/Order/Product</title>
<para>
@@ -284,10 +286,10 @@
<mediaobject>
<imageobject role="html">
- <imagedata fileref="../images/CustomerOrderProduct.png"
format="PNG" align="center" />
+ <imagedata fileref="images/CustomerOrderProduct.png"
format="PNG" align="center" />
</imageobject>
<imageobject role="fo">
- <imagedata fileref="../images/CustomerOrderProduct.png"
format="PNG" align="center" width="17cm" />
+ <imagedata fileref="images/CustomerOrderProduct.png"
format="PNG" align="center" width="17cm" />
</imageobject>
</mediaobject>
@@ -374,9 +376,9 @@
alter table line_items
add constraint line_itemsFK1 foreign key (order_id) references
orders]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="misc">
+ <section id="misc">
<title>Miscellaneous example mappings</title>
<para>
@@ -387,7 +389,7 @@
<!-- <<para>TODO: put words around this stuff</para>-->
- <sect2 id="example-mappings-typed-onetone">
+ <section id="example-mappings-typed-onetone">
<title>"Typed" one-to-one association</title>
<programlisting><![CDATA[<class name="Person">
<id name="name"/>
@@ -415,9 +417,9 @@
<property name="state"/>
<property name="zip"/>
</class>]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="example-mappings-composite-key">
+ <section id="example-mappings-composite-key">
<title>Composite key example</title>
<programlisting><![CDATA[<class name="Customer">
@@ -532,9 +534,9 @@
</property>
</class>]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="example-mappings-composite-key-manytomany">
+ <section id="example-mappings-composite-key-manytomany">
<title>Many-to-many with shared composite key attribute</title>
<programlisting><![CDATA[<class name="User"
table="`User`">
<composite-id>
@@ -571,9 +573,9 @@
</set>
</class>
]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="example-mappings-content-discrimination">
+ <section id="example-mappings-content-discrimination">
<title>Content based discrimination</title>
<programlisting><![CDATA[<class name="Person"
discriminator-value="P">
@@ -625,9 +627,9 @@
</subclass>
</class>]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="example-mappings-association-alternatekeys"
revision="2">
+ <section id="example-mappings-association-alternatekeys"
revision="2">
<title>Associations on alternate keys</title>
<programlisting><![CDATA[<class name="Person">
@@ -678,9 +680,9 @@
<property name="type" not-null="true"/>
</class>]]></programlisting>
- </sect2>
+ </section>
- </sect1>
+ </section>
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/example_parentchild.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/example_parentchild.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/example_parentchild.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -22,9 +26,6 @@
~ 51 Franklin Street, Fifth Floor
~ Boston, MA 02110-1301 USA
-->
-
-<!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>Example: Parent/Child</title>
@@ -41,7 +42,7 @@
</para>
- <sect1 id="example-parentchild-collections">
+ <section id="example-parentchild-collections">
<title>A note about collections</title>
<para>
@@ -82,9 +83,9 @@
child is bound to the life cycle of the parent.
</para>
- </sect1>
+ </section>
- <sect1 id="example-parentchild-bidir">
+ <section id="example-parentchild-bidir">
<title>Bidirectional one-to-many</title>
<para>
@@ -195,9 +196,9 @@
session.save(c);
session.flush();]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="example-parentchild-cascades">
+ <section id="example-parentchild-cascades">
<title>Cascading life cycle</title>
<para>
@@ -268,9 +269,9 @@
<literal>setParent()</literal>.
</para>
- </sect1>
+ </section>
- <sect1 id="example-parentchild-update">
+ <section id="example-parentchild-update">
<title>Cascades and
<literal>unsaved-value</literal></title>
<para>
@@ -366,9 +367,9 @@
Do not worry; in Hibernate3 you do not need to write any of this kind of code if you
do not want to.
</para>
-->
- </sect1>
+ </section>
- <sect1 id="example-parentchild-conclusion">
+ <section id="example-parentchild-conclusion">
<title>Conclusion</title>
<para>
@@ -383,6 +384,6 @@
cannot own collections and they should not be the child of any entity other
than the unique parent.
</para>
- </sect1>
+ </section>
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/example_weblog.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/example_weblog.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/example_weblog.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -23,12 +27,10 @@
~ Boston, MA 02110-1301 USA
-->
-<!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>Example: Weblog Application</title>
- <sect1 id="example-weblog-classes">
+ <section id="example-weblog-classes">
<title>Persistent Classes</title>
<para>
@@ -110,9 +112,9 @@
}
}]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="example-weblog-mappings">
+ <section id="example-weblog-mappings">
<title>Hibernate Mappings</title>
<para>
@@ -203,9 +205,9 @@
</hibernate-mapping>]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="example-weblog-code">
+ <section id="example-weblog-code">
<title>Hibernate Code</title>
<para>
@@ -451,7 +453,7 @@
}
}]]></programlisting>
- </sect1>
+ </section>
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/filters.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/filters.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/filters.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -23,8 +27,6 @@
~ Boston, MA 02110-1301 USA
-->
-<!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>Filtering data</title>
@@ -34,7 +36,7 @@
enabled or disabled for a particular Hibernate session.
</para>
- <sect1 id="objectstate-filters" revision="1">
+ <section id="objectstate-filters" revision="1">
<title>Hibernate filters</title>
<para>
@@ -167,7 +169,7 @@
particular case.
</para>
- </sect1>
+ </section>
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/inheritance_mapping.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/inheritance_mapping.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/inheritance_mapping.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -23,12 +27,10 @@
~ Boston, MA 02110-1301 USA
-->
-<!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 mapping</title>
- <sect1 id="inheritance-strategies" revision="3">
+ <section id="inheritance-strategies" revision="3">
<title>The three strategies</title>
<para>
@@ -99,7 +101,7 @@
</hibernate-mapping>]]></programlisting>
- <sect2 id="inheritance-tableperclass" >
+ <section id="inheritance-tableperclass" >
<title>Table per class hierarchy</title>
<para>
@@ -134,9 +136,9 @@
cannot have <literal>NOT NULL</literal> constraints.
</para>
- </sect2>
+ </section>
- <sect2 id="inheritance-tablepersubclass">
+ <section id="inheritance-tablepersubclass">
<title>Table per subclass</title>
<para>
@@ -170,9 +172,9 @@
is actually a one-to-one association.
</para>
- </sect2>
+ </section>
- <sect2 id="inheritance-tablepersubclass-discriminator"
revision="2">
+ <section id="inheritance-tablepersubclass-discriminator"
revision="2">
<title>Table per subclass: using a discriminator</title>
<para>
@@ -221,9 +223,9 @@
outer join when querying the superclass.
</para>
- </sect2>
+ </section>
- <sect2 id="inheritance-mixing-tableperclass-tablepersubclass">
+ <section id="inheritance-mixing-tableperclass-tablepersubclass">
<title>Mixing table per class hierarchy with table per
subclass</title>
<para>
@@ -260,9 +262,9 @@
<programlisting><![CDATA[<many-to-one name="payment"
column="PAYMENT_ID" class="Payment"/>]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="inheritance-tableperconcrete" revision="2">
+ <section id="inheritance-tableperconcrete"
revision="2">
<title>Table per concrete class</title>
<para>
@@ -309,9 +311,9 @@
of the superclass.
</para>
- </sect2>
+ </section>
- <sect2 id="inheritance-tableperconcreate-polymorphism">
+ <section id="inheritance-tableperconcreate-polymorphism">
<title>Table per concrete class using implicit polymorphism</title>
<para>
@@ -346,10 +348,10 @@
Notice that the <literal>Payment</literal> interface
is not mentioned explicitly. Also notice that properties of
<literal>Payment</literal> are
mapped in each of the subclasses. If you want to avoid duplication, consider
- using XML entities
- (for example, <literal>[ <!ENTITY allproperties SYSTEM
"allproperties.xml"> ]</literal>
+ using XML entities (for example,
+ <literal>[ <!ENTITY allproperties SYSTEM
"allproperties.xml"> ]</literal>
in the <literal>DOCTYPE</literal> declaration and
- <literal>&allproperties;</literal> in the mapping).
+ <literal>&allproperties;</literal> in the
mapping).
</para>
<para>
@@ -370,9 +372,9 @@
<column name="PAYMENT_ID"/>
</any>]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="inheritance-mixingpolymorphism">
+ <section id="inheritance-mixingpolymorphism">
<title>Mixing implicit polymorphism with other inheritance
mappings</title>
<para>
@@ -421,11 +423,11 @@
not instances of <literal>NonelectronicTransaction</literal>.
</para>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="inheritance-limitations">
+ <section id="inheritance-limitations">
<title>Limitations</title>
<para>
@@ -436,13 +438,65 @@
</para>
<para>
- The following table shows the limitations of table per concrete-class
+ The following list shows the limitations of table per concrete-class
mappings, and of implicit polymorphism, in Hibernate.
</para>
+
+ <variablelist>
+ <varlistentry>
+ <term>table per class-heirarchy</term>
+ <term>table per subclass</term>
+ <listitem>
+ <itemizedlist>
+ <listitem><para>Polymorphic many-to-one:
<code><many-to-one></code></para></listitem>
+ <listitem><para>Polymorphic one-to-one:
<code><one-to-one></code></para></listitem>
+ <listitem><para>Polymorphic one-to-many:
<code><one-to-many></code></para></listitem>
+ <listitem><para>Polymorphic many-to-many:
<code><many-to-many></code></para></listitem>
+ <listitem><para>Polymorphic
<literal>load()</literal> or <literal>get()</literal>:
<code>s.get(Payment.class, id)</code></para></listitem>
+ <listitem><para>Polymorphic queries: <code>from Payment
p</code></para></listitem>
+ <listitem><para>Polymorphic joins: <code>from Order o
join o.payment p</code></para></listitem>
+ </itemizedlist>
+ <para>
+ Outer join fetching is supported.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>table per concrete-class (union-subclass)</term>
+ <listitem>
+ <itemizedlist>
+ <listitem><para>Polymorphic many-to-one:
<code><many-to-one></code></para></listitem>
+ <listitem><para>Polymorphic one-to-one:
<code><one-to-one></code></para></listitem>
+ <listitem><para>Polymorphic one-to-many:
<code><one-to-many></code> (for
<code>inverse="true"</code>
only)</para></listitem>
+ <listitem><para>Polymorphic many-to-many:
<code><many-to-many></code></para></listitem>
+ <listitem><para>Polymorphic
<literal>load()</literal> or <literal>get()</literal>:
<code>s.get(Payment.class, id)</code></para></listitem>
+ <listitem><para>Polymorphic queries: <code>from Payment
p</code></para></listitem>
+ <listitem><para>Polymorphic joins: <code>from Order o
join o.payment p</code></para></listitem>
+ </itemizedlist>
+ <para>
+ Outer join fetching is supported.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>table per concrete class (implicit polymorphism</term>
+ <listitem>
+ <itemizedlist>
+ <listitem><para>Polymorphic many-to-one:
<code><any></code></para></listitem>
+ <listitem><para>Polymorphic many-to-many:
<code><many-to-many></code></para></listitem>
+ <listitem><para>Polymorphic
<literal>load()</literal> or <literal>get()</literal>:
<code>s.createCriteria(Payment.class).add( Restrictions.idEq(id)
).uniqueResult()</code></para></listitem>
+ <listitem><para>Polymorphic queries: <code>from Payment
p</code></para></listitem>
+ </itemizedlist>
+ <para>
+ Polymorphic one-to-one, polymorphic one-to-many, polymorphic joins, and
outer join fetching are not supported.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
- <table frame="topbot">
+ <!--<table frame="topbot">
<title>Features of inheritance mappings</title>
- <tgroup cols='9' align='left' colsep='1'
rowsep='1'>
+ <tgroup cols='9' align='left' colsep='1'
rowsep='1'>
<colspec colname='c1' colwidth="1*"/>
<colspec colname='c2' colwidth="1*"/>
<colspec colname='c3' colwidth="1*"/>
@@ -451,7 +505,7 @@
<colspec colname='c6' colwidth="1*"/>
<colspec colname='c7' colwidth="1*"/>
<colspec colname='c8' colwidth="1*"/>
- <colspec colname='c9' colwidth="1*"/>
+ <colspec colname='c9' colwidth="1*"/>
<thead>
<row>
<entry>Inheritance strategy</entry>
@@ -511,9 +565,9 @@
<entry><emphasis>not
supported</emphasis></entry>
</row>
</tbody>
- </tgroup>
- </table>
+ </tgroup>
+ </table>-->
- </sect1>
+ </section>
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/performance.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/performance.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/performance.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -23,12 +27,10 @@
~ Boston, MA 02110-1301 USA
-->
-<!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>Improving performance</title>
- <sect1 id="performance-fetching" revision="2">
+ <section id="performance-fetching" revision="2">
<title>Fetching strategies</title>
<para>
@@ -139,7 +141,7 @@
in any detached instance of a particular class.
</para>
- <sect2 id="performance-fetching-lazy">
+ <section id="performance-fetching-lazy">
<title>Working with lazy associations</title>
<para>
@@ -198,9 +200,9 @@
collections.
</para>
- </sect2>
+ </section>
- <sect2 id="performance-fetching-custom" revision="4">
+ <section id="performance-fetching-custom"
revision="4">
<title>Tuning fetch strategies</title>
<para>
@@ -278,9 +280,9 @@
second-level cache.
</para>
- </sect2>
+ </section>
- <sect2 id="performance-fetching-proxies" revision="2">
+ <section id="performance-fetching-proxies"
revision="2">
<title>Single-ended association proxies</title>
<para>
@@ -427,9 +429,9 @@
will result in immediate proxy initialization.
</para>
- </sect2>
+ </section>
- <sect2 id="performance-fetching-initialization"
revision="1">
+ <section id="performance-fetching-initialization"
revision="1">
<title>Initializing collections and proxies</title>
<para>
@@ -521,9 +523,9 @@
<programlisting><![CDATA[s.createFilter( lazyCollection,
"").setFirstResult(0).setMaxResults(10).list();]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="performance-fetching-batch">
+ <section id="performance-fetching-batch">
<title>Using batch fetching</title>
<para>
@@ -575,9 +577,9 @@
<emphasis>materialized path</emphasis> might be a better
option for read-mostly trees.
</para>
- </sect2>
+ </section>
- <sect2 id="performance-fetching-subselect">
+ <section id="performance-fetching-subselect">
<title>Using subselect fetching</title>
<para>
@@ -588,9 +590,9 @@
<!-- TODO: Write more about this -->
- </sect2>
+ </section>
- <sect2 id="performance-fetching-lazyproperties">
+ <section id="performance-fetching-lazyproperties">
<title>Using lazy property fetching</title>
<para>
@@ -652,11 +654,11 @@
properties</literal> in HQL.
</para>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="performance-cache" revision="1">
+ <section id="performance-cache" revision="1">
<title>The Second Level Cache</title>
<para>
@@ -699,21 +701,21 @@
<entry>Hashtable (not intended for production use)</entry>
<entry><literal>org.hibernate.cache.HashtableCacheProvider</literal></entry>
<entry>memory</entry>
- <entry> </entry>
+ <entry></entry>
<entry>yes</entry>
</row>
<row>
<entry>EHCache</entry>
<entry><literal>org.hibernate.cache.EhCacheProvider</literal></entry>
<entry>memory, disk</entry>
- <entry> </entry>
+ <entry></entry>
<entry>yes</entry>
</row>
<row>
<entry>OSCache</entry>
<entry><literal>org.hibernate.cache.OSCacheProvider</literal></entry>
<entry>memory, disk</entry>
- <entry> </entry>
+ <entry></entry>
<entry>yes</entry>
</row>
<row>
@@ -721,7 +723,7 @@
<entry><literal>org.hibernate.cache.SwarmCacheProvider</literal></entry>
<entry>clustered (ip multicast)</entry>
<entry>yes (clustered invalidation)</entry>
- <entry> </entry>
+ <entry></entry>
</row>
<row>
<entry>JBoss Cache 1.x</entry>
@@ -741,7 +743,7 @@
</tgroup>
</table>
- <sect2 id="performance-cache-mapping" revision="2">
+ <section id="performance-cache-mapping" revision="2">
<title>Cache mappings</title>
<para>
@@ -797,9 +799,9 @@
The <literal>usage</literal> attribute specifies a
<emphasis>cache concurrency strategy</emphasis>.
</para>
- </sect2>
+ </section>
- <sect2 id="performance-cache-readonly">
+ <section id="performance-cache-readonly">
<title>Strategy: read only</title>
<para>
@@ -813,10 +815,10 @@
....
</class>]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="performance-cache-readwrite">
+ <section id="performance-cache-readwrite">
<title>Strategy: read/write</title>
<para>
@@ -839,9 +841,9 @@
</set>
</class>]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="performance-cache-nonstrict">
+ <section id="performance-cache-nonstrict">
<title>Strategy: nonstrict read/write</title>
<para>
@@ -853,9 +855,9 @@
<literal>Session.close()</literal> or
<literal>Session.disconnect()</literal> is called.
</para>
- </sect2>
+ </section>
- <sect2 id="performance-cache-transactional">
+ <section id="performance-cache-transactional">
<title>Strategy: transactional</title>
<para>
@@ -864,9 +866,9 @@
specify
<literal>hibernate.transaction.manager_lookup_class</literal>.
</para>
- </sect2>
+ </section>
- <sect2 id="performance-cache-compat-matrix">
+ <section id="performance-cache-compat-matrix">
<title>Cache-provider/concurrency-strategy compatibility</title>
<important>
@@ -902,52 +904,52 @@
<entry>yes</entry>
<entry>yes</entry>
<entry>yes</entry>
- <entry> </entry>
+ <entry></entry>
</row>
<row>
<entry>EHCache</entry>
<entry>yes</entry>
<entry>yes</entry>
<entry>yes</entry>
- <entry> </entry>
+ <entry></entry>
</row>
<row>
<entry>OSCache</entry>
<entry>yes</entry>
<entry>yes</entry>
<entry>yes</entry>
- <entry> </entry>
+ <entry></entry>
</row>
<row>
<entry>SwarmCache</entry>
<entry>yes</entry>
<entry>yes</entry>
- <entry> </entry>
- <entry> </entry>
+ <entry></entry>
+ <entry></entry>
</row>
<row>
<entry>JBoss Cache 1.x</entry>
<entry>yes</entry>
- <entry> </entry>
- <entry> </entry>
+ <entry></entry>
+ <entry></entry>
<entry>yes</entry>
</row>
<row>
<entry>JBoss Cache 2</entry>
<entry>yes</entry>
- <entry> </entry>
- <entry> </entry>
+ <entry></entry>
+ <entry></entry>
<entry>yes</entry>
</row>
</tbody>
</tgroup>
</table>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="performance-sessioncache" revision="2">
+ <section id="performance-sessioncache" revision="2">
<title>Managing the caches</title>
<para>
@@ -1041,102 +1043,60 @@
<programlisting><![CDATA[hibernate.generate_statistics true
hibernate.cache.use_structured_entries true]]></programlisting>
- </sect1>
-
- <sect1 id="performance-querycache" revision="1">
+ </section>
+
+ <section id="performance-querycache" revision="1">
<title>The Query Cache</title>
<para>
Query result sets can also be cached. This is only useful for queries that
are run
- frequently with the same parameters.
+ frequently with the same parameters. You will first need to enable the query
cache:
</para>
- <sect2 id="performance-querycache-enable">
- <title>Enabling query caching</title>
- <para>
- Caching of query results introduces some overhead in terms of your
applications normal
- transactional processing. For example, if you cache results of a query
against Person
- Hibernate will need to keep track of when those results should be
invalidated because
- changes have been committed against Person. That, coupled with the fact
that most
- applications simply gain no benefit from caching query results, leads
Hibernate to
- disable caching of query results by default. To use query caching, you
will first
- need to enable the query cache:
- </para>
- <programlisting><![CDATA[hibernate.cache.use_query_cache
true]]></programlisting>
- <para>
- This setting creates two new cache regions:
- <itemizedlist>
- <listitem>
- <para>
-
<classname>org.hibernate.cache.StandardQueryCache</classname>, holding
- the cached query results
- </para>
- </listitem>
- <listitem>
- <para>
-
<classname>org.hibernate.cache.UpdateTimestampsCache</classname>, holding
- timestamps of the most recent updates to queryable tables.
These are used
- to validate the results as they are served from the query
cache.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <important>
- <para>
- If you configure your underlying cache implementation to use expiry
or
- timeouts is is very important that the cache timeout of the
underlying
- cache region for the UpdateTimestampsCache be set to a higher value
than
- the timeouts of any of the query caches. In fact, we recommend that
the
- the UpdateTimestampsCache region not be configured for expiry at all.
Note,
- in particular, that an LRU cache expiry policy is never appropriate.
- </para>
- </important>
- <para>
- As mentioned above, most queries do not benefit from caching or their
results. So by
- default, individual queries are not cached even after enabling query
caching. To enable
- results caching for a particular query, call
- <literal>org.hibernate.Query.setCacheable(true)</literal>.
This call allows the query
- to look for existing cache results or add its results to the cache when
it is executed.
- </para>
- <note>
- <para>
- The query cache does not cache the state of the actual entities in
the cache; it
- caches only identifier values and results of value type. For this
reaso, the query
- cache should always be used in conjunction with the second-level
cache for those
- entities expected to be cached as part of a query result cache (just
as with
- collection caching).
- </para>
- </note>
- </sect2>
+ <programlisting><![CDATA[hibernate.cache.use_query_cache
true]]></programlisting>
+
+ <para>
+ This setting creates two new cache regions: one holding cached query
+ result sets
(<literal>org.hibernate.cache.StandardQueryCache</literal>), the other
+ holding timestamps of the most recent updates to queryable tables
+ (<literal>org.hibernate.cache.UpdateTimestampsCache</literal>).
Note that the query
+ cache does not cache the state of the actual entities in the result set; it
caches
+ only identifier values and results of value type. The query cache should
always be
+ used in conjunction with the second-level cache.
+ </para>
+
+ <para>
+ Most queries do not benefit from caching, so by default, queries are not
cached. To
+ enable caching, call <literal>Query.setCacheable(true)</literal>.
This call allows
+ the query to look for existing cache results or add its results to the cache
when
+ it is executed.
+ </para>
+
+ <para>
+ If you require fine-grained control over query cache expiration policies, you
can
+ specify a named cache region for a particular query by calling
+ <literal>Query.setCacheRegion()</literal>.
+ </para>
+
+ <programlisting><![CDATA[List blogs = sess.createQuery("from Blog
blog where blog.blogger = :blogger")
+ .setEntity("blogger", blogger)
+ .setMaxResults(15)
+ .setCacheable(true)
+ .setCacheRegion("frontpages")
+ .list();]]></programlisting>
- <sect2 id="performance-querycache-regions">
- <title>Query cache regions</title>
- <para>
- If you require fine-grained control over query cache expiration policies,
you can
- specify a named cache region for a particular query by calling
- <literal>Query.setCacheRegion()</literal>.
- </para>
- <programlisting role="JAVA"><![CDATA[List blogs =
sess.createQuery("from Blog blog where blog.blogger = :blogger")
- .setEntity("blogger", blogger)
- .setMaxResults(15)
- .setCacheable(true)
- .setCacheRegion("frontpages")
- .list();]]></programlisting>
+ <para>
+ If the query should force a refresh of its query cache region, you should
call
+ <literal>Query.setCacheMode(CacheMode.REFRESH)</literal>. This is
particularly useful
+ in cases where underlying data may have been updated via a separate process
(i.e.,
+ not modified through Hibernate) and allows the application to selectively
refresh
+ particular query result sets. This is a more efficient alternative to
eviction of
+ a query cache region via
<literal>SessionFactory.evictQueries()</literal>.
+ </para>
- <para>
- If you want to force the query cache to refresh one of its regions
(disregard any
- cached results it finds there) you can use
-
<literal>org.hibernate.Query.setCacheMode(CacheMode.REFRESH)</literal>. In
conjunction
- with the region you have defined for the given query, Hibernate will
selectively force
- the results cached in that particular region to be refreshed. This is
particularly useful
- in cases where underlying data may have been updated via a separate
process and is a far more
- efficient alternative to bulk eviction of the region via
-
<literal>org.hibernate.SessionFactory.evictQueries()</literal>.
- </para>
- </sect2>
- </sect1>
+ </section>
- <sect1 id="performance-collections">
+ <section id="performance-collections">
<title>Understanding Collection performance</title>
<para>
@@ -1145,7 +1105,7 @@
collections at runtime.
</para>
- <sect2 id="performance-collections-taxonomy">
+ <section id="performance-collections-taxonomy">
<title>Taxonomy</title>
<para>Hibernate defines three basic kinds of collections:</para>
@@ -1222,9 +1182,9 @@
collection.
</para>
- </sect2>
+ </section>
- <sect2 id="performance-collections-mostefficientupdate">
+ <section id="performance-collections-mostefficientupdate">
<title>Lists, maps, idbags and sets are the most efficient collections
to update</title>
<para>
@@ -1257,9 +1217,9 @@
considerations of collection update performance simply do not apply.
</para>
- </sect2>
+ </section>
- <sect2 id="performance-collections-mostefficentinverse">
+ <section id="performance-collections-mostefficentinverse">
<title>Bags and lists are the most efficient inverse
collections</title>
<para>
@@ -1278,9 +1238,9 @@
p.getChildren().add(c); //no need to fetch the collection!
sess.flush();]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="performance-collections-oneshotdelete">
+ <section id="performance-collections-oneshotdelete">
<title>One shot delete</title>
<para>
@@ -1327,11 +1287,11 @@
One-shot-delete does not apply to collections mapped
<literal>inverse="true"</literal>.
</para>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="performance-monitoring" revision="1">
+ <section id="performance-monitoring" revision="1">
<title>Monitoring performance</title>
<para>
@@ -1340,7 +1300,7 @@
Statistics in Hibernate are available per
<literal>SessionFactory</literal>.
</para>
- <sect2 id="performance-monitoring-sf" revision="2">
+ <section id="performance-monitoring-sf" revision="2">
<title>Monitoring a SessionFactory</title>
<para>
@@ -1406,9 +1366,9 @@
method.
</para>
- </sect2>
+ </section>
- <sect2 id="performance-monitoring-metrics"
revision="1">
+ <section id="performance-monitoring-metrics"
revision="1">
<title>Metrics</title>
<para>
@@ -1479,8 +1439,8 @@
<literal>getSecondLevelCacheRegionNames()</literal>.
</para>
- </sect2>
+ </section>
- </sect1>
+ </section>
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/persistent_classes.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/persistent_classes.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/persistent_classes.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -23,8 +27,6 @@
~ Boston, MA 02110-1301 USA
-->
-<!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>
@@ -43,7 +45,7 @@
ways (using trees of <literal>Map</literal> instances, for example).
</para>
- <sect1 id="persistent-classes-pojo">
+ <section id="persistent-classes-pojo">
<title>A simple POJO example</title>
<para>
@@ -134,7 +136,7 @@
</para>
- <sect2 id="persistent-classes-pojo-constructor"
revision="1">
+ <section id="persistent-classes-pojo-constructor"
revision="1">
<title>Implement a no-argument constructor</title>
<para>
@@ -144,9 +146,9 @@
default constructor with at least
<emphasis>package</emphasis> visibility for runtime proxy
generation in Hibernate.
</para>
- </sect2>
+ </section>
- <sect2 id="persistent-classes-pojo-identifier"
revision="2">
+ <section id="persistent-classes-pojo-identifier"
revision="2">
<title>Provide an identifier property (optional)</title>
<para>
@@ -191,9 +193,9 @@
We recommend that you declare consistently-named identifier properties on
persistent
classes and that you use a nullable (i.e., non-primitive) type.
</para>
- </sect2>
+ </section>
- <sect2 id="persistent-classes-pojo-final">
+ <section id="persistent-classes-pojo-final">
<title>Prefer non-final classes (optional)</title>
<para>
A central feature of Hibernate, <emphasis>proxies</emphasis>,
depends upon the
@@ -210,9 +212,9 @@
non-final classes. If you want to use a class with a
<literal>public final</literal>
method, you must explicitly disable proxying by setting
<literal>lazy="false"</literal>.
</para>
- </sect2>
+ </section>
- <sect2 id="persistent-classes-pojo-accessors"
revision="2">
+ <section id="persistent-classes-pojo-accessors"
revision="2">
<title>Declare accessors and mutators for persistent fields
(optional)</title>
<para>
@@ -231,11 +233,11 @@
<literal>private</literal> get / set pair.
</para>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="persistent-classes-inheritance">
+ <section id="persistent-classes-inheritance">
<title>Implementing inheritance</title>
<para>
@@ -255,9 +257,9 @@
this.name=name;
}
}]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="persistent-classes-equalshashcode"
revision="1">
+ <section id="persistent-classes-equalshashcode"
revision="1">
<title>Implementing <literal>equals()</literal> and
<literal>hashCode()</literal></title>
<para>
@@ -340,9 +342,9 @@
candidates for a business key.
</para>
- </sect1>
+ </section>
- <sect1 id="persistent-classes-dynamicmodels">
+ <section id="persistent-classes-dynamicmodels">
<title>Dynamic models</title>
@@ -485,9 +487,9 @@
in <xref linkend="xml"/>.
</para>
- </sect1>
+ </section>
- <sect1 id="persistent-classes-tuplizers" revision="1">
+ <section id="persistent-classes-tuplizers" revision="1">
<title>Tuplizers</title>
<para>
@@ -554,9 +556,10 @@
}]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="persistent-classes-entity-name-resolver"
revision="0">
+
+ <section id="persistent-classes-entity-name-resolver"
revision="0">
<title>EntityNameResolvers</title>
<para>
@@ -687,8 +690,8 @@
<orderedlist>
<listitem>
<para>
- Implement a custom <link
linkend="persistent-classes-tuplizers">Tuplizer</link>, implementing
- the <methodname>getEntityNameResolvers</methodname>
method.
+ Implement a custom Tupelizer implementing the
<methodname>getEntityNameResolvers</methodname>
+ method (see <xref
linkend="persistent-classes-tuplizers" />).
</para>
</listitem>
<listitem>
@@ -700,14 +703,14 @@
</listitem>
</orderedlist>
</para>
- </sect1>
+ </section>
- <!--<sect1 id="persistent-classes-extensions">
+ <!--<section id="persistent-classes-extensions">
<title>Extensions</title>
<para>
TODO: Document user-extension framework in the property and proxy packages
</para>
- </sect1>-->
+ </section>-->
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/portability.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/portability.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/portability.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Copyright (c) 2009, Red Hat Middleware LLC or third-party contributors as
~ indicated by the @author tags or express copyright attribution
@@ -20,12 +24,11 @@
~ 51 Franklin Street, Fifth Floor
~ Boston, MA 02110-1301 USA
-->
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="portability">
<title>Database Portability Considerations</title>
- <sect1 id="portability-basics">
+ <section id="portability-basics">
<title>Portability Basics</title>
<para>
@@ -36,9 +39,9 @@
the exact scenario, the basic idea is that you want Hibernate to help you run
against any number
of databases without changes to your code, and ideally without any changes to
the mapping metadata.
</para>
- </sect1>
+ </section>
- <sect1 id="portability-dialect">
+ <section id="portability-dialect">
<title>Dialect</title>
<para>
@@ -49,9 +52,9 @@
of dialects for many of the most popular databases. If you find that your
particular database is
not among them, it is not terribly difficult to write your own.
</para>
- </sect1>
+ </section>
- <sect1 id="portability-dialectresolver">
+ <section id="portability-dialectresolver">
<title>Dialect resolution</title>
<para>
@@ -92,9 +95,9 @@
<constant>DIALECT_RESOLVERS</constant> constant on
<classname>org.hibernate.cfg.Environment</classname>).
</para>
- </sect1>
+ </section>
- <sect1 id="portability-idgen">
+ <section id="portability-idgen">
<title>Identifier generation</title>
<para>
@@ -110,22 +113,19 @@
know the identifier value. Because Hibernate relies on this identifier value
to uniquely reference
entities within a persistence context it must then issue the insert
immediately when the users requests the entitiy be associated with the
session (like via
- save() e.g.) regardless of current transactional semantics.
-
- <note>
- <para>
- Hibernate was changed slightly once the implication of this was
better understood so that
- the insert is delayed in cases where that is feasible.
- </para>
- </note>
-
- The underlying issue is that the actual semanctics of the application itself
changes in these cases.
+ save() e.g.) regardless of current transactional semantics. The underlying
issue is that the semantics of the application itself changes in these cases.
</para>
+ <note>
+ <para>
+ Hibernate has been improved so that
+ the insert is delayed in cases where that is feasible.
+ </para>
+ </note>
<para>
Starting with version 3.2.3, Hibernate comes with a set of
<ulink
url="http://in.relation.to/2082.lace">enhanced</ulink> identifier
generators targetting
- portability in a much different way.
+ portability in a much different way.</para>
<note>
<para>
There are specifically 2 bundled
<emphasis>enhanced</emphasis>generators:
@@ -143,21 +143,20 @@
</itemizedlist>
</para>
</note>
+ <para>
The idea behind these generators is to port the actual semantics of the
identifer value
generation to the different databases. For example, the
<classname>org.hibernate.id.enhanced.SequenceStyleGenerator</classname> mimics
the behavior of
a sequence on databases which do not support sequences by using a table.
</para>
- </sect1>
+ </section>
- <sect1 id="portability-functions">
+ <section id="portability-functions">
<title>Database functions</title>
<warning>
<para>
- This is an area in Hibernate in need of improvement. In terms of
portability concerns,
- this function handling currently works pretty well from HQL; however, it
is quite lacking
- in all other aspects.
+ This is a new area in Hibernate and as such it is not as mature as the
overall Hibernate experience.
</para>
</warning>
@@ -181,24 +180,24 @@
</para>
</important>
</para>
- </sect1>
+ </section>
- <sect1 id="portability-types">
+ <section id="portability-types">
<title>Type mappings</title>
<para>
This section scheduled for completion at a later date...
</para>
- <!--
- todo :
- <sect2 id="portability-types-lobs">
+
+ <!-- todo :
+ <section id="portability-types-lobs">
<title>BLOB/CLOB mappings</title>
- </sect2>
+ </section>
- <sect2 id="portability-types-bool">
+ <section id="portability-types-bool">
<title>Boolean mappings</title>
- </sect2>
- -->
- </sect1>
-</chapter>
\ No newline at end of file
+ </section> -->
+
+ </section>
+</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/query_criteria.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/query_criteria.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/query_criteria.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,7 @@
-<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -23,8 +26,6 @@
~ Boston, MA 02110-1301 USA
-->
-<!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>
@@ -32,7 +33,7 @@
Hibernate features an intuitive, extensible criteria query API.
</para>
- <sect1 id="querycriteria-creating">
+ <section id="querycriteria-creating">
<title>Creating a <literal>Criteria</literal>
instance</title>
<para>
@@ -45,9 +46,9 @@
crit.setMaxResults(50);
List cats = crit.list();]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="querycriteria-narrowing">
+ <section id="querycriteria-narrowing">
<title>Narrowing the result set</title>
<para>
@@ -117,9 +118,9 @@
.add( Property.forName("name").in( new String[] { "Fritz",
"Izi", "Pk" } ) )
.list();]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="querycriteria-ordering">
+ <section id="querycriteria-ordering">
<title>Ordering the results</title>
<para>
@@ -140,9 +141,9 @@
.setMaxResults(50)
.list();]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="querycriteria-associations" revision="2">
+ <section id="querycriteria-associations" revision="2">
<title>Associations</title>
<para>
@@ -196,9 +197,9 @@
Cat kitten = (Cat) map.get("kt");
}]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="querycriteria-dynamicfetching" revision="1">
+ <section id="querycriteria-dynamicfetching" revision="1">
<title>Dynamic association fetching</title>
<para>
@@ -217,9 +218,9 @@
by outer join. See <xref linkend="performance-fetching"/> for
more information.
</para>
- </sect1>
+ </section>
- <sect1 id="querycriteria-examples">
+ <section id="querycriteria-examples">
<title>Example queries</title>
<para>
@@ -262,9 +263,9 @@
.add( Example.create( cat.getMate() ) )
.list();]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="querycriteria-projection">
+ <section id="querycriteria-projection">
<title>Projections, aggregation and grouping</title>
<para>
The class <literal>org.hibernate.criterion.Projections</literal>
is a
@@ -356,9 +357,9 @@
.addOrder( Order.desc("avgWeight") )
.list();]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="querycriteria-detachedqueries">
+ <section id="querycriteria-detachedqueries">
<title>Detached queries and subqueries</title>
<para>
The <literal>DetachedCriteria</literal> class allows you to
create a query outside the scope
@@ -403,13 +404,13 @@
.add( Property.forName("weight").gt(avgWeightForSex) )
.list();]]></programlisting>
- </sect1>
+ </section>
<!--TODO: ResultSetTransformer + aliasing. AliasToBeanTransformer allow
returning arbitrary
user objects - similar to setResultClass in JDO2. General use of
ResultTransformer
could also be explained. -->
- <sect1 id="query-criteria-naturalid">
+ <section id="query-criteria-naturalid">
<title>Queries by natural identifier</title>
<para>
@@ -455,6 +456,6 @@
).setCacheable(true)
.uniqueResult();]]></programlisting>
- </sect1>
+ </section>
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/query_hql.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/query_hql.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/query_hql.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -23,8 +27,6 @@
~ Boston, MA 02110-1301 USA
-->
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-
<chapter id="queryhql" revision="1">
<title>HQL: The Hibernate Query Language</title>
@@ -34,7 +36,7 @@
and understands notions like inheritance, polymorphism and association.
</para>
- <sect1 id="queryhql-casesensitivity">
+ <section id="queryhql-casesensitivity">
<title>Case Sensitivity</title>
<para>
@@ -53,9 +55,9 @@
more readable, but this convention is unsuitable for queries embedded in Java
code.
</para>
- </sect1>
+ </section>
- <sect1 id="queryhql-from">
+ <section id="queryhql-from">
<title>The from clause</title>
<para>
@@ -101,9 +103,9 @@
(e.g. <literal>domesticCat</literal>).
</para>
- </sect1>
+ </section>
- <sect1 id="queryhql-joins" revision="2">
+ <section id="queryhql-joins" revision="2">
<title>Associations and joins</title>
<para>
@@ -213,9 +215,9 @@
<programlisting><![CDATA[from Document fetch all properties order by
name]]></programlisting>
<programlisting><![CDATA[from Document doc fetch all properties where
lower(doc.name) like '%cats%']]></programlisting>
- </sect1>
+ </section>
- <sect1 id="queryhql-joins-forms">
+ <section id="queryhql-joins-forms">
<title>Forms of join syntax</title>
<para>
@@ -235,9 +237,9 @@
</para>
<programlisting><![CDATA[from Cat as cat where cat.mate.name like
'%s%']]></programlisting>
- </sect1>
+ </section>
- <sect1 id="queryhql-identifier-property">
+ <section id="queryhql-identifier-property">
<title>Referring to identifier property</title>
<para>
@@ -274,9 +276,9 @@
</para>
</important>
- </sect1>
+ </section>
- <sect1 id="queryhql-select">
+ <section id="queryhql-select">
<title>The select clause</title>
<para>
@@ -351,9 +353,9 @@
This query returns a <literal>Map</literal> from aliases to
selected values.
</para>
- </sect1>
+ </section>
- <sect1 id="queryhql-aggregation">
+ <section id="queryhql-aggregation">
<title>Aggregate functions</title>
<para>
@@ -416,9 +418,9 @@
select count(distinct cat.name), count(cat) from Cat cat]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="queryhql-polymorphism">
+ <section id="queryhql-polymorphism">
<title>Polymorphic queries</title>
<para>
@@ -450,9 +452,9 @@
It also means you cannot call these queries using
<literal>Query.scroll()</literal>.
</para>
- </sect1>
+ </section>
- <sect1 id="queryhql-where" revision="1">
+ <section id="queryhql-where" revision="1">
<title>The where clause</title>
<para>
@@ -472,11 +474,13 @@
This returns instances of <literal>Cat</literal> named
'Fritz'.
</para>
- <para>
- The following query:
+ <para>
+ The following query: </para>
<programlisting><![CDATA[select foo
from Foo foo, Bar bar
where foo.startDate = bar.date]]></programlisting>
+
+ <para>
returns all instances of <literal>Foo</literal> with an
instance of <literal>bar</literal> with a
<literal>date</literal> property equal to the
@@ -570,18 +574,16 @@
where log.item.class = 'Payment' and log.item.id =
payment.id]]></programlisting>
<para>
- The <literal>log.item.class</literal> and
<literal>payment.class</literal>
- would refer to the values of completely different database columns in the
above query.
+ The <literal>log.item.class</literal> and
<literal>payment.class</literal> would refer to the values of completely
different database columns in the above query.
</para>
- </sect1>
+ </section>
- <sect1 id="queryhql-expressions">
+ <section id="queryhql-expressions">
<title>Expressions</title>
<para>
Expressions used in the <literal>where</literal> clause include
the following:
-
</para>
<itemizedlist spacing="compact">
@@ -867,9 +869,9 @@
AND cust.current_order = o.id
)]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="queryhql-ordering">
+ <section id="queryhql-ordering">
<title>The order by clause</title>
<para>
@@ -883,9 +885,9 @@
The optional <literal>asc</literal> or
<literal>desc</literal> indicate ascending or descending order
respectively.
</para>
- </sect1>
+ </section>
- <sect1 id="queryhql-grouping" revision="1">
+ <section id="queryhql-grouping" revision="1">
<title>The group by clause</title>
<para>
@@ -931,9 +933,9 @@
non-aggregated properties explicitly.
</para>
- </sect1>
+ </section>
- <sect1 id="queryhql-subqueries" revision="3">
+ <section id="queryhql-subqueries" revision="3">
<title>Subqueries</title>
<para>
@@ -974,9 +976,9 @@
<xref linkend="queryhql-tuple"/> for more information.
</para>
- </sect1>
+ </section>
- <sect1 id="queryhql-examples">
+ <section id="queryhql-examples">
<title>HQL examples</title>
<para>
@@ -1097,9 +1099,9 @@
and PaymentStatus.UNPAID = isNull(payment.currentStatus.name, PaymentStatus.UNPAID)
order by account.type.sortOrder, account.accountNumber,
payment.dueDate]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="queryhql-bulk" revision="2">
+ <section id="queryhql-bulk" revision="2">
<title>Bulk update and delete</title>
<para>
@@ -1107,9 +1109,9 @@
<literal>insert ... select ...</literal> statements.
See <xref linkend="batch-direct"/> for more information.
</para>
- </sect1>
+ </section>
- <sect1 id="queryhql-tipstricks">
+ <section id="queryhql-tipstricks">
<title>Tips & Tricks</title>
<para>
@@ -1187,9 +1189,9 @@
<programlisting><![CDATA[( (Integer) session.createQuery("select
count(*) from ....").iterate().next() ).intValue();]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="queryhql-components">
+ <section id="queryhql-components">
<title>Components</title>
<para>
@@ -1216,11 +1218,11 @@
<programlisting><![CDATA[from Person p order by
p.name.first]]></programlisting>
<para>
- Another common use of components is in <link
linkend="queryhql-tuple">row value constructors</link>.
+ Another common use of components is in row value constructors (<xref
linkend="queryhql-tuple" />).
</para>
- </sect1>
+ </section>
- <sect1 id="queryhql-tuple">
+ <section id="queryhql-tuple">
<title>Row value constructor syntax</title>
<para>
@@ -1260,7 +1262,7 @@
be dependent upon the ordering of the component sub-properties in the
metadata.
</para>
- </sect1>
+ </section>
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/query_sql.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/query_sql.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/query_sql.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -23,8 +27,6 @@
~ Boston, MA 02110-1301 USA
-->
-<!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>
@@ -37,7 +39,7 @@
<para>Hibernate3 allows you to specify handwritten SQL, including stored
procedures, for all create, update, delete, and load operations.</para>
- <sect1 id="querysql-creating" revision="4">
+ <section id="querysql-creating" revision="4">
<title>Using a <literal>SQLQuery</literal></title>
<para>Execution of native SQL queries is controlled via the
@@ -45,7 +47,7 @@
<literal>Session.createSQLQuery()</literal>. The following sections
describe how
to use this API for querying.</para>
- <sect2>
+ <section>
<title>Scalar queries</title>
<para>The most basic SQL query is to get a list of scalars
@@ -108,9 +110,9 @@
not mapped, or does not result in the expected type, it is possible to
customize it via calls to <literal>registerHibernateType</literal> in
the Dialect.</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Entity queries</title>
<para>The above queries were all about returning scalar values,
@@ -150,9 +152,9 @@
]]></programlisting>
<para>This will allow cat.getDog() to function properly.</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Handling associations and collections</title>
<para>It is possible to eagerly join in the
<literal>Dog</literal> to
@@ -183,9 +185,9 @@
enhance the sql queries to make them usable in Hibernate. Problems can arise
when returning
multiple entities of the same type or when the default alias/column names are
not enough.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Returning multiple entities</title>
<para>Until now, the result set column names are assumed to be the same
@@ -251,7 +253,7 @@
.addEntity("mother", Cat.class).list()
]]></programlisting>
- <sect3 id="querysql-aliasreferences" revision="2">
+ <section id="querysql-aliasreferences" revision="2">
<title>Alias and property references</title>
<para>In most cases the above alias injection is needed. For
@@ -368,10 +370,10 @@
</tbody>
</tgroup>
</table>
- </sect3>
- </sect2>
+ </section>
+ </section>
- <sect2>
+ <section>
<title>Returning non-managed entities</title>
<para>It is possible to apply a ResultTransformer to native SQL queries,
allowing it to return non-managed entities.</para>
@@ -395,17 +397,17 @@
The above query will return a list of <literal>CatDTO</literal> which
has been instantiated and injected the values of NAME and BIRTHNAME into its
corresponding
properties or fields.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Handling inheritance</title>
<para>Native SQL queries which query for entities that are mapped as part
of an inheritance must include all properties for the baseclass and all
its subclasses.</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Parameters</title>
<para>Native SQL queries support positional as well as named
@@ -416,13 +418,13 @@
query = sess.createSQLQuery("SELECT * FROM CATS WHERE NAME like
:name").addEntity(Cat.class);
List pusList = query.setString("name", "Pus%").list();
]]></programlisting>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="querysql-namedqueries" revision="3">
+ <section id="querysql-namedqueries" revision="3">
<title>Named SQL queries</title>
<para>Named SQL queries can be defined in the mapping document and called
@@ -509,7 +511,7 @@
.setResultSetMapping("catAndKitten")
.list();]]></programlisting>
- <sect2 id="propertyresults">
+ <section id="propertyresults">
<title>Using return-property to explicitly specify column/alias
names</title>
@@ -560,9 +562,9 @@
<para>If your mapping has a discriminator you must use
<literal><return-discriminator></literal> to specify the
discriminator column.</para>
- </sect2>
+ </section>
- <sect2 id="sp_query" revision="1">
+ <section id="sp_query" revision="1">
<title>Using stored procedures for querying</title>
<para>Hibernate3 provides support for queries via stored procedures
@@ -607,7 +609,7 @@
entities. <literal><return-join></literal> and
<literal><load-collection></literal> are not
supported.</para>
- <sect3 id="querysql-limits-storedprocedures"
revision="1">
+ <section id="querysql-limits-storedprocedures"
revision="1">
<title>Rules/limitations for using stored procedures</title>
<para>You cannot use stored procedures with Hibernate unless you follow
some procedure/function
@@ -655,11 +657,11 @@
requirement.</para>
</listitem>
</itemizedlist>
- </sect3>
- </sect2>
- </sect1>
+ </section>
+ </section>
+ </section>
- <sect1 id="querysql-cud">
+ <section id="querysql-cud">
<title>Custom SQL for create, update and delete</title>
<para>Hibernate3 can use custom SQL statements for create, update, and
@@ -726,9 +728,9 @@
return SQL%ROWCOUNT;
END updatePerson;]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="querysql-load">
+ <section id="querysql-load">
<title>Custom SQL for loading</title>
<para>You can also declare your own SQL (or HQL) queries for entity
@@ -783,5 +785,5 @@
ON pers.ID = emp.PERSON_ID
WHERE ID=?
</sql-query>]]></programlisting>
- </sect1>
+ </section>
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/session_api.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/session_api.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/session_api.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -23,8 +27,6 @@
~ Boston, MA 02110-1301 USA
-->
-<!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>Working with objects</title>
@@ -44,7 +46,7 @@
relevant for the application developer when tuning the performance of the
system.
</para>
- <sect1 id="objectstate-overview">
+ <section id="objectstate-overview">
<title>Hibernate object states</title>
<para>
@@ -95,9 +97,9 @@
trigger a transition) in more detail.
</para>
- </sect1>
+ </section>
- <sect1 id="objectstate-makingpersistent" revision="1">
+ <section id="objectstate-makingpersistent" revision="1">
<title>Making objects persistent</title>
<para>
@@ -177,9 +179,9 @@
Transitive persistence is discussed later in this chapter.
</para>
- </sect1>
+ </section>
- <sect1 id="objectstate-loading">
+ <section id="objectstate-loading">
<title>Loading an object</title>
<para>
@@ -259,9 +261,9 @@
<xref linkend="performance-fetching"/>.
</para>
- </sect1>
+ </section>
- <sect1 id="objectstate-querying" revision="1">
+ <section id="objectstate-querying" revision="1">
<title>Querying</title>
<para>
@@ -273,7 +275,7 @@
optional support from Hibernate for result set conversion into objects.
</para>
- <sect2 id="objectstate-querying-executing"
revision="1">
+ <section id="objectstate-querying-executing"
revision="1">
<title>Executing queries</title>
<para>
@@ -318,7 +320,7 @@
these duplicates through a <literal>Set</literal>.
</para>
- <sect3 id="objectstate-querying-executing-iterate">
+ <section id="objectstate-querying-executing-iterate">
<title>Iterating results</title>
<para>
@@ -345,9 +347,9 @@
break;
}
}]]></programlisting>
- </sect3>
+ </section>
- <sect3 id="objectstate-querying-executing-tuples">
+ <section id="objectstate-querying-executing-tuples">
<title>Queries that return tuples</title>
<para>
@@ -367,9 +369,9 @@
....
}]]></programlisting>
- </sect3>
+ </section>
- <sect3 id="objectstate-querying-executing-scalar"
revision="1">
+ <section id="objectstate-querying-executing-scalar"
revision="1">
<title>Scalar results</title>
<para>
@@ -392,9 +394,9 @@
.....
}]]></programlisting>
- </sect3>
+ </section>
- <sect3 id="objectstate-querying-executing-parameters">
+ <section id="objectstate-querying-executing-parameters">
<title>Bind parameters</title>
<para>
@@ -442,9 +444,9 @@
q.setParameterList("namesList", names);
List cats = q.list();]]></programlisting>
- </sect3>
+ </section>
- <sect3 id="objectstate-querying-executing-pagination">
+ <section id="objectstate-querying-executing-pagination">
<title>Pagination</title>
<para>
@@ -463,9 +465,9 @@
SQL of your DBMS.
</para>
- </sect3>
+ </section>
- <sect3 id="objectstate-querying-executing-scrolling">
+ <section id="objectstate-querying-executing-scrolling">
<title>Scrollable iteration</title>
<para>
@@ -503,9 +505,9 @@
if you need offline pagination functionality.
</para>
- </sect3>
+ </section>
- <sect3 id="objectstate-querying-executing-named"
revision="1">
+ <section id="objectstate-querying-executing-named"
revision="1">
<title>Externalizing named queries</title>
<para>
@@ -543,11 +545,11 @@
<literal>eg.Cat.ByNameAndMaximumWeight</literal>.
</para>
- </sect3>
+ </section>
- </sect2>
+ </section>
- <sect2 id="objectstate-filtering" revision="1">
+ <section id="objectstate-filtering" revision="1">
<title>Filtering collections</title>
<para>
A collection <emphasis>filter</emphasis> is a special type of
query that can be applied to
@@ -588,9 +590,9 @@
.setFirstResult(0).setMaxResults(10)
.list();]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="objecstate-querying-criteria" revision="1">
+ <section id="objecstate-querying-criteria"
revision="1">
<title>Criteria queries</title>
<para>
@@ -609,9 +611,9 @@
API are discussed in more detail in <xref
linkend="querycriteria"/>.
</para>
- </sect2>
+ </section>
- <sect2 id="objectstate-querying-nativesql"
revision="2">
+ <section id="objectstate-querying-nativesql"
revision="2">
<title>Queries in native SQL</title>
<para>
@@ -639,11 +641,11 @@
<xref linkend="querysql"/>.
</para>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="objectstate-modifying" revision="1">
+ <section id="objectstate-modifying" revision="1">
<title>Modifying persistent objects</title>
<para>
@@ -682,9 +684,9 @@
</para>
</important>
- </sect1>
+ </section>
- <sect1 id="objectstate-detached" revision="2">
+ <section id="objectstate-detached" revision="2">
<title>Modifying detached objects</title>
<para>
@@ -757,9 +759,9 @@
Other models for long units of work are discussed in <xref
linkend="transactions-optimistic"/>.
</para>
- </sect1>
+ </section>
- <sect1 id="objectstate-saveorupdate">
+ <section id="objectstate-saveorupdate">
<title>Automatic state detection</title>
<para>
@@ -895,9 +897,9 @@
</listitem>
</itemizedlist>
- </sect1>
+ </section>
- <sect1 id="objectstate-deleting" revision="1">
+ <section id="objectstate-deleting" revision="1">
<title>Deleting persistent objects</title>
<para>
@@ -917,9 +919,9 @@
children.
</para>
- </sect1>
+ </section>
- <sect1 id="objectstate-replicating" revision="1">
+ <section id="objectstate-replicating" revision="1">
<title>Replicating object between two different datastores</title>
<para>
@@ -981,9 +983,9 @@
rolling back changes made during non-ACID transactions and more.
</para>
- </sect1>
+ </section>
- <sect1 id="objectstate-flushing">
+ <section id="objectstate-flushing">
<title>Flushing the Session</title>
<para>
@@ -1094,9 +1096,9 @@
behavior, we discuss it in <xref linkend="transactions"/>.
</para>
- </sect1>
+ </section>
- <sect1 id="objectstate-transitive" revision="1">
+ <section id="objectstate-transitive" revision="1">
<title>Transitive persistence</title>
<para>
@@ -1248,9 +1250,9 @@
<literal>Session</literal>.
</para>
- </sect1>
+ </section>
- <sect1 id="objectstate-metadata">
+ <section id="objectstate-metadata">
<title>Using metadata</title>
<para>
@@ -1282,7 +1284,7 @@
}
}]]></programlisting>
- </sect1>
+ </section>
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/toolset_guide.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/toolset_guide.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/toolset_guide.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -23,8 +27,6 @@
~ Boston, MA 02110-1301 USA
-->
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-
<chapter id="toolsetguide" revision="2">
<title>Toolset Guide</title>
@@ -75,7 +77,7 @@
be used from "inside" Hibernate.
</para>
- <sect1 id="toolsetguide-s1" revision="2">
+ <section id="toolsetguide-s1" revision="2">
<title>Automatic schema generation</title>
<para>
@@ -95,7 +97,7 @@
First, you must customize your mapping files to improve the generated schema.
The next section covers schema customization.
</para>
- <sect2 id="toolsetguide-s1-2" revision="3">
+ <section id="toolsetguide-s1-2" revision="3">
<title>Customizing the schema</title>
<para>
@@ -203,80 +205,80 @@
<colspec colwidth="2.5*"/>
<thead>
<row>
- <entry>Attribute</entry>
- <entry>Values</entry>
- <entry>Interpretation</entry>
+
<entry><para>Attribute</para></entry>
+ <entry><para>Values</para></entry>
+
<entry><para>Interpretation</para></entry>
</row>
</thead>
<tbody>
<row>
-
<entry><literal>length</literal></entry>
- <entry>number</entry>
- <entry>column length</entry>
+
<entry><para><literal>length</literal></para></entry>
+ <entry><para>number</para></entry>
+ <entry><para>column
length</para></entry>
</row>
<row>
-
<entry><literal>precision</literal></entry>
- <entry>number</entry>
- <entry>column decimal precision</entry>
+
<entry><para><literal>precision</literal></para></entry>
+ <entry><para>number</para></entry>
+ <entry><para>column decimal
precision</para></entry>
</row>
<row>
-
<entry><literal>scale</literal></entry>
- <entry>number</entry>
- <entry>column decimal scale</entry>
+
<entry><para><literal>scale</literal></para></entry>
+ <entry><para>number</para></entry>
+ <entry><para>column decimal
scale</para></entry>
</row>
<row>
-
<entry><literal>not-null</literal></entry>
-
<entry><literal>true|false</literal></entry>
- <entry>specifies that the column should be
non-nullable</entry>
+
<entry><para><literal>not-null</literal></para></entry>
+
<entry><para><literal>true|false</literal></para></entry>
+ <entry><para>specifies that the column should be
non-nullable</para></entry>
</row>
<row>
-
<entry><literal>unique</literal></entry>
-
<entry><literal>true|false</literal></entry>
- <entry>specifies that the column should have a unique
constraint</entry>
+
<entry><para><literal>unique</literal></para></entry>
+
<entry><para><literal>true|false</literal></para></entry>
+ <entry><para>specifies that the column should
have a unique constraint</para></entry>
</row>
<row>
-
<entry><literal>index</literal></entry>
-
<entry><literal>index_name</literal></entry>
- <entry>specifies the name of a (multi-column)
index</entry>
+
<entry><para><literal>index</literal></para></entry>
+
<entry><para><literal>index_name</literal></para></entry>
+ <entry><para>specifies the name of a
(multi-column) index</para></entry>
</row>
<row>
-
<entry><literal>unique-key</literal></entry>
-
<entry><literal>unique_key_name</literal></entry>
- <entry>specifies the name of a multi-column unique
constraint</entry>
+
<entry><para><literal>unique-key</literal></para></entry>
+
<entry><para><literal>unique_key_name</literal></para></entry>
+ <entry><para>specifies the name of a multi-column
unique constraint</para></entry>
</row>
<row>
-
<entry><literal>foreign-key</literal></entry>
-
<entry><literal>foreign_key_name</literal></entry>
- <entry>
+
<entry><para><literal>foreign-key</literal></para></entry>
+
<entry><para><literal>foreign_key_name</literal></para></entry>
+ <entry><para>
specifies the name of the foreign key constraint
generated
for an association, for a
<literal><one-to-one></literal>,
<literal><many-to-one></literal>,
<literal><key></literal>,
or
<literal><many-to-many></literal> mapping element. Note that
<literal>inverse="true"</literal>
sides will not be considered
by <literal>SchemaExport</literal>.
- </entry>
+ </para></entry>
</row>
<row>
-
<entry><literal>sql-type</literal></entry>
- <entry><literal>SQL column
type</literal></entry>
- <entry>
+
<entry><para><literal>sql-type</literal></para></entry>
+ <entry><para><literal>SQL column
type</literal></para></entry>
+ <entry><para>
overrides the default column type (attribute of
<literal><column></literal>
element only)
- </entry>
+ </para></entry>
</row>
<row>
-
<entry><literal>default</literal></entry>
- <entry>SQL expression</entry>
- <entry>
+
<entry><para><literal>default</literal></para></entry>
+ <entry><para>SQL
expression</para></entry>
+ <entry><para>
specify a default value for the column
- </entry>
+ </para></entry>
</row>
<row>
-
<entry><literal>check</literal></entry>
- <entry>SQL expression</entry>
- <entry>
+
<entry><para><literal>check</literal></para></entry>
+ <entry><para>SQL
expression</para></entry>
+ <entry><para>
create an SQL check constraint on either column or table
- </entry>
+ </para></entry>
</row>
</tbody>
</tgroup>
@@ -304,9 +306,9 @@
DDL where supported.
</para>
- </sect2>
+ </section>
- <sect2 id="toolsetguide-s1-3" revision="2">
+ <section id="toolsetguide-s1-3" revision="2">
<title>Running the tool</title>
<para>
@@ -328,50 +330,50 @@
<colspec colwidth="2*"/>
<thead>
<row>
- <entry>Option</entry>
- <entry>Description</entry>
+ <entry><para>Option</para></entry>
+
<entry><para>Description</para></entry>
</row>
</thead>
<tbody>
<row>
-
<entry><literal>--quiet</literal></entry>
- <entry>do not output the script to
stdout</entry>
+
<entry><para><literal>--quiet</literal></para></entry>
+ <entry><para>do not output the script to
stdout</para></entry>
</row>
<row>
-
<entry><literal>--drop</literal></entry>
- <entry>only drop the tables</entry>
+
<entry><para><literal>--drop</literal></para></entry>
+ <entry><para>only drop the
tables</para></entry>
</row>
<row>
-
<entry><literal>--create</literal></entry>
- <entry>only create the tables</entry>
+
<entry><para><literal>--create</literal></para></entry>
+ <entry><para>only create the
tables</para></entry>
</row>
<row>
-
<entry><literal>--text</literal></entry>
- <entry>do not export to the database</entry>
+
<entry><para><literal>--text</literal></para></entry>
+ <entry><para>do not export to the
database</para></entry>
</row>
<row>
-
<entry><literal>--output=my_schema.ddl</literal></entry>
- <entry>output the ddl script to a file</entry>
+
<entry><para><literal>--output=my_schema.ddl</literal></para></entry>
+ <entry><para>output the ddl script to a
file</para></entry>
</row>
<row>
-
<entry><literal>--naming=eg.MyNamingStrategy</literal></entry>
- <entry>select a
<literal>NamingStrategy</literal></entry>
+
<entry><para><literal>--naming=eg.MyNamingStrategy</literal></para></entry>
+ <entry><para>select a
<literal>NamingStrategy</literal></para></entry>
</row>
<row>
-
<entry><literal>--config=hibernate.cfg.xml</literal></entry>
- <entry>read Hibernate configuration from an XML
file</entry>
+
<entry><para><literal>--config=hibernate.cfg.xml</literal></para></entry>
+ <entry><para>read Hibernate configuration from an
XML file</para></entry>
</row>
<row>
-
<entry><literal>--properties=hibernate.properties</literal></entry>
- <entry>read database properties from a
file</entry>
+
<entry><para><literal>--properties=hibernate.properties</literal></para></entry>
+ <entry><para>read database properties from a
file</para></entry>
</row>
<row>
-
<entry><literal>--format</literal></entry>
- <entry>format the generated SQL nicely in the
script</entry>
+
<entry><para><literal>--format</literal></para></entry>
+ <entry><para>format the generated SQL nicely in
the script</para></entry>
</row>
<row>
-
<entry><literal>--delimiter=;</literal></entry>
- <entry>set an end of line delimiter for the
script</entry>
+
<entry><para><literal>--delimiter=;</literal></para></entry>
+ <entry><para>set an end of line delimiter for the
script</para></entry>
</row>
</tbody>
</tgroup>
@@ -384,9 +386,9 @@
<programlisting><![CDATA[Configuration cfg = ....;
new SchemaExport(cfg).create(false, true);]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="toolsetguide-s1-4">
+ <section id="toolsetguide-s1-4">
<title>Properties</title>
<para>
@@ -416,38 +418,38 @@
<colspec colwidth="2*"/>
<thead>
<row>
- <entry>Property Name</entry>
- <entry>Description</entry>
+ <entry><para>Property
Name</para></entry>
+
<entry><para>Description</para></entry>
</row>
</thead>
<tbody>
<row>
-
<entry><literal>hibernate.connection.driver_class</literal></entry>
- <entry>jdbc driver class</entry>
+
<entry><para><literal>hibernate.connection.driver_class</literal></para></entry>
+ <entry><para>jdbc driver
class</para></entry>
</row>
<row>
-
<entry><literal>hibernate.connection.url</literal></entry>
- <entry>jdbc url</entry>
+
<entry><para><literal>hibernate.connection.url</literal></para></entry>
+ <entry><para>jdbc url</para></entry>
</row>
<row>
-
<entry><literal>hibernate.connection.username</literal></entry>
- <entry>database user</entry>
+
<entry><para><literal>hibernate.connection.username</literal></para></entry>
+ <entry><para>database
user</para></entry>
</row>
<row>
-
<entry><literal>hibernate.connection.password</literal></entry>
- <entry>user password</entry>
+
<entry><para><literal>hibernate.connection.password</literal></para></entry>
+ <entry><para>user
password</para></entry>
</row>
<row>
-
<entry><literal>hibernate.dialect</literal></entry>
- <entry>dialect</entry>
+
<entry><para><literal>hibernate.dialect</literal></para></entry>
+ <entry><para>dialect</para></entry>
</row>
</tbody>
</tgroup>
</table>
- </sect2>
+ </section>
- <sect2 id="toolsetguide-s1-5">
+ <section id="toolsetguide-s1-5">
<title>Using Ant</title>
<para>
@@ -472,9 +474,9 @@
</schemaexport>
</target>]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="toolsetguide-s1-6" revision="2">
+ <section id="toolsetguide-s1-6" revision="2">
<title>Incremental schema updates</title>
<para>
@@ -495,30 +497,30 @@
<colspec colwidth="2*"/>
<thead>
<row>
- <entry>Option</entry>
- <entry>Description</entry>
+ <entry><para>Option</para></entry>
+
<entry><para>Description</para></entry>
</row>
</thead>
<tbody>
<row>
-
<entry><literal>--quiet</literal></entry>
- <entry>do not output the script to
stdout</entry>
+
<entry><para><literal>--quiet</literal></para></entry>
+ <entry><para>do not output the script to
stdout</para></entry>
</row>
<row>
-
<entry><literal>--text</literal></entry>
- <entry>do not export the script to the
database</entry>
+
<entry><para><literal>--text</literal></para></entry>
+ <entry><para>do not export the script to the
database</para></entry>
</row>
<row>
-
<entry><literal>--naming=eg.MyNamingStrategy</literal></entry>
- <entry>select a
<literal>NamingStrategy</literal></entry>
+
<entry><para><literal>--naming=eg.MyNamingStrategy</literal></para></entry>
+ <entry><para>select a
<literal>NamingStrategy</literal></para></entry>
</row>
<row>
-
<entry><literal>--properties=hibernate.properties</literal></entry>
- <entry>read database properties from a
file</entry>
+
<entry><para><literal>--properties=hibernate.properties</literal></para></entry>
+ <entry><para>read database properties from a
file</para></entry>
</row>
<row>
-
<entry><literal>--config=hibernate.cfg.xml</literal></entry>
- <entry>specify a
<literal>.cfg.xml</literal> file</entry>
+
<entry><para><literal>--config=hibernate.cfg.xml</literal></para></entry>
+ <entry><para>specify a
<literal>.cfg.xml</literal> file</para></entry>
</row>
</tbody>
</tgroup>
@@ -531,9 +533,9 @@
<programlisting><![CDATA[Configuration cfg = ....;
new SchemaUpdate(cfg).execute(false);]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="toolsetguide-s1-7">
+ <section id="toolsetguide-s1-7">
<title>Using Ant for incremental schema updates</title>
<para>
@@ -554,9 +556,9 @@
</schemaupdate>
</target>]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="toolsetguide-s1-8" revision="1">
+ <section id="toolsetguide-s1-8" revision="1">
<title>Schema validation</title>
<para>
@@ -569,7 +571,7 @@
<literal>java -cp
</literal><emphasis>hibernate_classpaths</emphasis>
<literal>org.hibernate.tool.hbm2ddl.SchemaValidator</literal>
<emphasis>options mapping_files</emphasis>
</para>
-
+<para>The following table displays the
<literal>SchemaValidator</literal> command line options: </para>
<table frame="topbot">
<title><literal>SchemaValidator</literal> Command Line
Options</title>
<tgroup cols="2">
@@ -577,22 +579,22 @@
<colspec colwidth="2*"/>
<thead>
<row>
- <entry>Option</entry>
- <entry>Description</entry>
+ <entry><para>Option</para></entry>
+
<entry><para>Description</para></entry>
</row>
</thead>
<tbody>
<row>
-
<entry><literal>--naming=eg.MyNamingStrategy</literal></entry>
- <entry>select a
<literal>NamingStrategy</literal></entry>
+
<entry><para><literal>--naming=eg.MyNamingStrategy</literal></para></entry>
+ <entry><para>select a
<literal>NamingStrategy</literal></para></entry>
</row>
<row>
-
<entry><literal>--properties=hibernate.properties</literal></entry>
- <entry>read database properties from a
file</entry>
+
<entry><para><literal>--properties=hibernate.properties</literal></para></entry>
+ <entry><para>read database properties from a
file</para></entry>
</row>
<row>
-
<entry><literal>--config=hibernate.cfg.xml</literal></entry>
- <entry>specify a
<literal>.cfg.xml</literal> file</entry>
+
<entry><para><literal>--config=hibernate.cfg.xml</literal></para></entry>
+ <entry><para>specify a
<literal>.cfg.xml</literal> file</para></entry>
</row>
</tbody>
</tgroup>
@@ -605,9 +607,9 @@
<programlisting><![CDATA[Configuration cfg = ....;
new SchemaValidator(cfg).validate();]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="toolsetguide-s1-9">
+ <section id="toolsetguide-s1-9">
<title>Using Ant for schema validation</title>
<para>
@@ -627,9 +629,9 @@
</schemavalidator>
</target>]]></programlisting>
- </sect2>
+ </section>
- </sect1>
+ </section>
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/transactions.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/transactions.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/transactions.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -23,8 +27,6 @@
~ Boston, MA 02110-1301 USA
-->
-<!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>Transactions and Concurrency</title>
@@ -56,7 +58,7 @@
<literal>Session</literal>, as well as database transactions and long
conversations.
</para>
- <sect1 id="transactions-basics" revision="1">
+ <section id="transactions-basics" revision="1">
<title>Session and transaction scopes</title>
<para>
@@ -88,7 +90,7 @@
database transaction boundaries? These questions are addressed in the
following sections.
</para>
- <sect2 id="transactions-basics-uow" revision="1">
+ <section id="transactions-basics-uow" revision="1">
<title>Unit of work</title>
<para>
@@ -167,9 +169,9 @@
this <emphasis>Open Session in View</emphasis> pattern.
</para>
- </sect2>
+ </section>
- <sect2 id="transactions-basics-apptx" revision="1">
+ <section id="transactions-basics-apptx" revision="1">
<title>Long conversations</title>
<para>
@@ -261,9 +263,9 @@
These disadvantages are discussed later in this chapter in the context of
optimistic concurrency control.
</para>
- </sect2>
+ </section>
- <sect2 id="transactions-basics-identity">
+ <section id="transactions-basics-identity">
<title>Considering object identity</title>
<para>
@@ -328,9 +330,9 @@
a Hibernate issue, but simply how Java object identity and equality has
to be implemented.
</para>
- </sect2>
+ </section>
- <sect2 id="transactions-basics-issues">
+ <section id="transactions-basics-issues">
<title>Common issues</title>
<para>
@@ -378,11 +380,11 @@
</listitem>
</itemizedlist>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="transactions-demarcation">
+ <section id="transactions-demarcation">
<title>Database transaction demarcation</title>
<para>
@@ -447,7 +449,7 @@
</para>
- <sect2 id="transactions-demarcation-nonmanaged"
revision="2">
+ <section id="transactions-demarcation-nonmanaged"
revision="2">
<title>Non-managed environment</title>
<para>
@@ -479,7 +481,7 @@
<para>
You do not have to <literal>flush()</literal> the
<literal>Session</literal> explicitly:
the call to <literal>commit()</literal> automatically
triggers the synchronization depending
- on the <link
linkend="objectstate-flushing">FlushMode</link> for the session.
+ on the FlushMode for the session (see <xref
linkend="objectstate-flushing" />).
A call to <literal>close()</literal> marks the end of a
session. The main implication
of <literal>close()</literal> is that the JDBC connection
will be relinquished by the
session. This Java code is portable and runs in both non-managed and JTA
environments.
@@ -520,9 +522,9 @@
<literal>hibernate.current_session_context_class</literal>.
</para>
- </sect2>
+ </section>
- <sect2 id="transactions-demarcation-jta" revision="3">
+ <section id="transactions-demarcation-jta"
revision="3">
<title>Using JTA</title>
<para>
@@ -623,9 +625,9 @@
<literal>iterate()</literal> from the JTA or CMT code.)
</para>
- </sect2>
+ </section>
- <sect2 id="transactions-demarcation-exceptions">
+ <section id="transactions-demarcation-exceptions">
<title>Exception handling</title>
<para>
@@ -698,9 +700,9 @@
</listitem>
</itemizedlist>
- </sect2>
+ </section>
- <sect2 id="transactions-demarcation-timeout">
+ <section id="transactions-demarcation-timeout">
<title>Transaction timeout</title>
<para>
@@ -741,11 +743,11 @@
where transaction timeouts must be defined declaratively.
</para>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="transactions-optimistic">
+ <section id="transactions-optimistic">
<title>Optimistic concurrency control</title>
<para>
@@ -758,7 +760,7 @@
also has the benefit of preventing lost updates in single database
transactions.
</para>
- <sect2 id="transactions-optimistic-manual">
+ <section id="transactions-optimistic-manual">
<title>Application version checking</title>
<para>
@@ -805,9 +807,9 @@
as the design paradigm.
</para>
- </sect2>
+ </section>
- <sect2 id="transactions-optimistic-longsession">
+ <section id="transactions-optimistic-longsession">
<title>Extended session and automatic versioning</title>
<para>
@@ -883,9 +885,9 @@
for this. See the Hibernate Wiki for examples.
</para>
- </sect2>
+ </section>
- <sect2 id="transactions-optimistic-detached">
+ <section id="transactions-optimistic-detached">
<title>Detached objects and automatic versioning</title>
<para>
@@ -915,9 +917,9 @@
caches) if you are sure that the object has not been modified.
</para>
- </sect2>
+ </section>
- <sect2 id="transactions-optimistic-customizing">
+ <section id="transactions-optimistic-customizing">
<title>Customizing automatic versioning</title>
<para>
@@ -958,11 +960,11 @@
the instance to ensure that changes did occur before updating the row.
</para>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="transactions-locking">
+ <section id="transactions-locking">
<title>Pessimistic locking</title>
<para>
@@ -1062,9 +1064,9 @@
portable.
</para>
- </sect1>
+ </section>
- <sect1 id="transactions-connection-release">
+ <section id="transactions-connection-release">
<title>Connection release modes</title>
<para>
@@ -1147,7 +1149,7 @@
</listitem>
</itemizedlist>
- </sect1>
+ </section>
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/tutorial.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/tutorial.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/tutorial.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -23,9 +27,14 @@
~ Boston, MA 02110-1301 USA
-->
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!-- <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]
+<!ENTITY % BOOK_ENTITIES SYSTEM "Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
<!ENTITY mdash "-">
-]>
+]>-->
<chapter id="tutorial">
<title>Tutorial</title>
@@ -55,7 +64,7 @@
</para>
</note>
- <sect1 id="tutorial-firstapp">
+ <section id="tutorial-firstapp">
<title>Part 1 - The first Hibernate Application</title>
<para>
@@ -72,7 +81,7 @@
</para>
</note>
- <sect2 id="tutorial-firstapp-setup">
+ <section id="tutorial-firstapp-setup">
<title>Setup</title>
<para>
@@ -134,15 +143,15 @@
</project>]]></programlisting>
- <tip>
+ <note>
<para>
- It is not a requirement to use Maven. If you wish to use something
else to
- build this tutoial (such as Ant), the layout will remain the same.
The only
+ It is not a requirement to use Maven. If you wish to use another
technology to
+ build this tutorial (such as Ant), the layout will remain the same.
The only
change is that you will need to manually account for all the needed
- dependencies. If you use something like <ulink
url="http://ant.apache.org/ivy/">Ivy</ulink>
- providing transitive dependency management you would still use the
dependencies
- mentioned below. Otherwise, you'd need to grab
<emphasis>all</emphasis>
- dependencies, both explicit and transitive, and add them to the
project's
+ dependencies. If you use <ulink
url="http://ant.apache.org/ivy/">Ivy</ulink>
+ to provide transitive dependency management you would still use the
dependencies
+ mentioned below. Otherwise, you will need to find all the
+ dependencies, both explicit and transitive, and add them to the
projects
classpath. If working from the Hibernate distribution bundle, this
would mean
<filename>hibernate3.jar</filename>, all artifacts in
the
<filename>lib/required</filename> directory and all files
from either the
@@ -150,15 +159,15 @@
directory; additionally you will need both the servlet-api jar and
one of the slf4j
logging backends.
</para>
- </tip>
+ </note>
<para>
Save this file as <filename>pom.xml</filename> in the project
root directory.
</para>
- </sect2>
+ </section>
- <sect2 id="tutorial-firstapp-firstclass">
+ <section id="tutorial-firstapp-firstclass">
<title>The first class</title>
<para>
@@ -238,9 +247,9 @@
Save this file to the
<filename>src/main/java/org/hibernate/tutorial/domain</filename>
directory.
</para>
- </sect2>
+ </section>
- <sect2 id="tutorial-firstapp-mapping">
+ <section id="tutorial-firstapp-mapping">
<title>The mapping file</title>
<para>
@@ -339,12 +348,12 @@
and you can plugin in your own strategy.
</para>
- <tip>
+ <note>
<para>
- <literal>native</literal> is no longer consider the best
strategy in terms of portability. for further
+ <literal>native</literal> is no longer considered the
best strategy in terms of portability. for further
discussion, see <xref linkend="portability-idgen"/>
</para>
- </tip>
+ </note>
<para>
Lastly, we need to tell Hibernate about the remaining entity class
@@ -401,22 +410,22 @@
<literal>timestamp</literal> converter.
</para>
- <tip>
+ <note>
<para>
Hibernate makes this mapping type determination using reflection when
the mapping files
are processed. This can take time and resources, so if startup
performance is important
you should consider explicitly defining the type to use.
</para>
- </tip>
+ </note>
<para>
Save this mapping file as
<filename>src/main/resources/org/hibernate/tutorial/domain/Event.hbm.xml</filename>.
</para>
- </sect2>
+ </section>
- <sect2 id="tutorial-firstapp-configuration"
revision="2">
+ <section id="tutorial-firstapp-configuration"
revision="2">
<title>Hibernate configuration</title>
<para>
@@ -427,7 +436,7 @@
<note>
<para>
- We do this do that the data remains between runs.
+ We do this so that the data remains between runs.
</para>
</note>
@@ -452,12 +461,11 @@
Hibernate built-in connection pool for this tutorial.
</para>
- <caution>
+ <warning>
<para>
- The built-in Hibernate connection pool is in no way intended for
production use. It
- lacks several features found on any decent connection pool.
+ The built-in Hibernate connection pool is not intended for production
use.
</para>
- </caution>
+ </warning>
<para>
For Hibernate's configuration, we can use a simple
<literal>hibernate.properties</literal> file, a
@@ -521,12 +529,12 @@
element specifies the particular SQL variant Hibernate generates.
</para>
- <tip>
+ <note>
<para>
- In most cases, Hibernate is able to properly determine which dialect
to use. See
+ Hibernate is able to correctly determine which dialect to use in most
cases. See
<xref linkend="portability-dialectresolver"/> for
more information.
</para>
- </tip>
+ </note>
<para>
Hibernate's automatic session management for persistence contexts is
particularly useful
@@ -542,9 +550,9 @@
<filename>src/main/resources</filename> directory.
</para>
- </sect2>
+ </section>
- <sect2 id="tutorial-firstapp-mvn" revision="1">
+ <section id="tutorial-firstapp-mvn" revision="1">
<title>Building with Maven</title>
<para>
@@ -575,9 +583,9 @@
[INFO] Final Memory: 5M/547M
[INFO]
------------------------------------------------------------------------]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="tutorial-firstapp-helpers" revision="3">
+ <section id="tutorial-firstapp-helpers" revision="3">
<title>Startup and helpers</title>
<para>
@@ -665,9 +673,9 @@
Hibernate.
</para>
- </sect2>
+ </section>
- <sect2 id="tutorial-firstapp-workingpersistence"
revision="5">
+ <section id="tutorial-firstapp-workingpersistence"
revision="5">
<title>Loading and storing objects</title>
<para>
@@ -855,11 +863,11 @@
<command>mvn exec:java
-Dexec.mainClass="org.hibernate.tutorial.EventManager"
-Dexec.args="list"</command>
</para>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="tutorial-associations">
+ <section id="tutorial-associations">
<title>Part 2 - Mapping associations</title>
<para>
@@ -869,7 +877,7 @@
which they participate.
</para>
- <sect2 id="tutorial-associations-mappinguser"
revision="1">
+ <section id="tutorial-associations-mappinguser"
revision="1">
<title>Mapping the Person class</title>
<para>
@@ -928,9 +936,9 @@
behavior.
</para>
- </sect2>
+ </section>
- <sect2 id="tutorial-associations-unidirset"
revision="3">
+ <section id="tutorial-associations-unidirset"
revision="3">
<title>A unidirectional Set-based association</title>
<para>
@@ -1019,9 +1027,9 @@
|_____________|
]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="tutorial-associations-working"
revision="2">
+ <section id="tutorial-associations-working"
revision="2">
<title>Working the association</title>
<para>
@@ -1140,9 +1148,9 @@
entities, but looks almost the same in Java.
</para>
- </sect2>
+ </section>
- <sect2 id="tutorial-associations-valuecollections">
+ <section id="tutorial-associations-valuecollections">
<title>Collection of values</title>
<para>
@@ -1232,9 +1240,9 @@
optimize this with an eager fetch.
</para>
- </sect2>
+ </section>
- <sect2 id="tutorial-associations-bidirectional"
revision="1">
+ <section id="tutorial-associations-bidirectional"
revision="1">
<title>Bi-directional associations</title>
<para>
@@ -1291,9 +1299,9 @@
understand once you see how the bi-directional link between our two
entities is created.
</para>
- </sect2>
+ </section>
- <sect2 id="tutorial-associations-usingbidir">
+ <section id="tutorial-associations-usingbidir">
<title>Working bi-directional links</title>
<para>
@@ -1347,11 +1355,11 @@
and in many-to-many association you can select either side.
</para>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="tutorial-webapp">
+ <section id="tutorial-webapp">
<title>Part 3 - The EventManager web application</title>
<para>
@@ -1361,7 +1369,7 @@
database, and it provides an HTML form to enter new events.
</para>
- <sect2 id="tutorial-webapp-servlet" revision="2">
+ <section id="tutorial-webapp-servlet" revision="2">
<title>Writing the basic servlet</title>
<para>
@@ -1441,9 +1449,9 @@
as you consider rendering your view in JSP, not in a servlet.
</para>
- </sect2>
+ </section>
- <sect2 id="tutorial-webapp-processing" revision="1">
+ <section id="tutorial-webapp-processing" revision="1">
<title>Processing and rendering</title>
<para>
@@ -1551,9 +1559,9 @@
examples.
</para>
- </sect2>
+ </section>
- <sect2 id="tutorial-webapp-deploy">
+ <section id="tutorial-webapp-deploy">
<title>Deploying and testing</title>
<para>
@@ -1602,11 +1610,11 @@
is called) and to get the detailed output if any exceptions occurs.
</para>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="tutorial-summary" revision="1">
+ <section id="tutorial-summary" revision="1">
<title>Summary</title>
<para>
@@ -1615,6 +1623,6 @@
<ulink url="http://hibernate.org">website</ulink>.
</para>
- </sect1>
+ </section>
</chapter>
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/xml.xml
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/xml.xml 2010-02-08
04:15:14 UTC (rev 18714)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/content/xml.xml 2010-02-08
04:24:37 UTC (rev 18715)
@@ -1,4 +1,8 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?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" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Hibernate_Core_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -23,8 +27,6 @@
~ Boston, MA 02110-1301 USA
-->
-<!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 Mapping</title>
@@ -33,7 +35,7 @@
active development.
</emphasis></para>
- <sect1 id="xml-intro" revision="1">
+ <section id="xml-intro" revision="1">
<title>Working with XML data</title>
<para>
@@ -64,7 +66,7 @@
it can be used to map just the XML.
</para>
- <sect2 id="xml-intro-mapping">
+ <section id="xml-intro-mapping">
<title>Specifying XML and class mapping together</title>
<para>
@@ -91,9 +93,9 @@
...
</class>]]></programlisting>
- </sect2>
+ </section>
- <sect2 id="xml-onlyxml">
+ <section id="xml-onlyxml">
<title>Specifying only an XML mapping</title>
<para>
@@ -130,11 +132,11 @@
are purely logical constructs that can be referred to in HQL queries.
</para>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="xml-mapping" revision="1">
+ <section id="xml-mapping" revision="1">
<title>XML mapping metadata</title>
<para>
@@ -256,10 +258,10 @@
...
</customer>]]></programlisting>
- </sect1>
+ </section>
- <sect1 id="xml-manipulation" revision="1">
+ <section id="xml-manipulation" revision="1">
<title>Manipulating XML data</title>
<para>
@@ -307,7 +309,7 @@
operation.
</para>
- </sect1>
+ </section>
</chapter>