Author: mcaspers
Date: 2011-01-20 23:06:45 -0500 (Thu, 20 Jan 2011)
New Revision: 28463
Modified:
trunk/hibernatetools/docs/reference/en-US/codegenarchitecture.xml
Log:
General Updates
Modified: trunk/hibernatetools/docs/reference/en-US/codegenarchitecture.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en-US/codegenarchitecture.xml 2011-01-21 03:57:48
UTC (rev 28462)
+++ trunk/hibernatetools/docs/reference/en-US/codegenarchitecture.xml 2011-01-21 04:06:45
UTC (rev 28463)
@@ -1,112 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="codegenarchitecture">
- <title>Code generation architecture</title>
+ <title>Code generation architecture</title>
- <para>The code generation mechanism in the <property>Hibernate
Tools</property> consists of a few
- core concepts. This section explains their overall structure which are the same for
the Ant and
- Eclipse tools.</para>
+ <para>
+ The code generation mechanism in <productname>Hibernate Tools</productname>
consists of a few core concepts. This section explains their overall structure, which are
the same for the Ant and Eclipse tools.
+ </para>
- <section>
- <title>Hibernate Meta Model</title>
+ <section>
+ <title>Hibernate Meta Model</title>
- <para>The meta model is the model used by Hibernate Core to perform its object
relational
- mapping. The model includes information about tables, columns, classes,
properties,
- components, values, collections etc. The API is in
<literal>org.hibernate.mapping</literal>
- and its main entry point is the <property>Configuration</property>
class, the same class that is
- used to build a session factory.</para>
+ <para>
+ The meta model is the model used by <productname>Hibernate
Core</productname> to perform its object relational mapping. The model includes
information about tables, columns, classes, properties, components, values, collections
etc. The API is in <code>org.hibernate.mapping</code> and its main entry point
is the <code>Configuration</code> class, the same class that is used to build
a session factory.
+ </para>
- <para>The model represented by the
<property>Configuration</property> class can be build in many
- ways. The following list the currently supported ones in <property>Hibernate
Tools</property>. </para>
+ <para>
+ The model represented by the <code>Configuration</code> class can be built
in many ways. The following list the currently supported ones in
<productname>Hibernate Tools</productname>.
+ </para>
- <para>
- <itemizedlist>
- <listitem>
- <para>A Core configuration uses Hibernate Core and supports reading
<emphasis>
- <property>hbm.xml</property>
- </emphasis> files, requires a <emphasis>
- <property>hibernate.cfg.xml</property>
- </emphasis>. Named core in Eclipse and
- <code><configuration></code>
- in ant.</para>
- </listitem>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ A Core configuration uses <productname>Hibernate Core</productname> and
supports reading <filename>hbm.xml</filename> files, requires a
<filename>hibernate.cfg.xml</filename> file. This is referred to as
<productname>core</productname> in Eclipse and
<code><configuration></code> in Ant.
+ </para>
+ </listitem>
- <listitem>
- <para>An Annotation configuration uses Hibernate Annotations and supports
<emphasis>
- <property>hbm.xml</property>
- </emphasis> and annotated classes, requires a <emphasis>
- <property>hibernate.cfg.xml</property>
- </emphasis>. Named annotations in Eclipse and
- <code><annotationconfiguration></code>
- in ant.</para>
- </listitem>
+ <listitem>
+ <para>
+ An Annotation configuration uses <productname>Hibernate
Annotations</productname> and supports <filename>hbm.xml</filename>
files and annotated classes, and requires a
<filename>hibernate.cfg.xml</filename> file. This is referred to as
<productname>annotations</productname> in Eclipse and
<code><annotationconfiguration></code> in Ant.</para>
+ </listitem>
- <listitem>
- <para>A JPA configuration uses a Hibernate EntityManager and supports
<emphasis>
- <property>hbm.xml</property>
- </emphasis> and annotated classes requires that the project has a
<emphasis>
- <property>META-INF/persistence.xml</property>
- </emphasis> in its classpath. Named JPA in Eclipse and
- <code><jpaconfiguration></code>
- in ant.</para>
- </listitem>
+ <listitem>
+ <para>
+ A JPA configuration uses a <productname>Hibernate
EntityManager</productname> and supports <filename>hbm.xml</filename>
files and annotated classes, and requires that the project has a
<filename>META-INF/persistence.xml</filename> file in its classpath. This is
referred to as <productname>JPA</productname> in Eclipse and
<code><jpaconfiguration></code> in Ant.</para>
+ </listitem>
- <listitem>
- <para>A JDBC configuration uses <property>Hibernate
Tools</property> reverse engineering
- and reads its mappings via JDBC metadata + additional reverse engineering
files
- (reveng.xml). Automatically used in Eclipse when doing reverse engineering
from JDBC and
- named
- <code><jdbcconfiguration></code>
- in ant.</para>
- </listitem>
- </itemizedlist>
- </para>
+ <listitem>
+ <para>
+ A JDBC configuration uses <property>Hibernate Tools</property> reverse
engineering and reads its mappings via JDBC metadata + additional reverse engineering
files (<filename>reveng.xml</filename>). Automatically used in Eclipse when
doing reverse engineering from JDBC and referred to as
<code><jdbcconfiguration></code> in Ant.</para>
+ </listitem>
+ </itemizedlist>
+ </para>
- <para>In most projects you will normally use only one of the Core, Annotation
or JPA
- configuration and possibly the JDBC configuration if you are using the reverse
engineering
- facilities of <property>Hibernate Tools</property>. </para>
+ <para>
+ In most projects you will normally use only one of the Core, Annotation or JPA
configuration and possibly the JDBC configuration if you are using the reverse engineering
facilities of <productname>Hibernate Tools</productname>.
+ </para>
- <note>
- <title>Note:</title>
- <para>No matter which Hibernate Configuration type you are using
<property>Hibernate
- Tools</property> supports them.</para>
- </note>
+ <note>
+ <title>Note:</title>
+ <para>No matter which Hibernate Configuration type you are using
<productname>Hibernate Tools</productname> supports them.</para>
+ </note>
- <para>The following drawing illustrates the core concepts:</para>
+ <para>The following drawing illustrates the core concepts:</para>
- <para>
- <figure>
- <title>Hibernate Core Concepts</title>
- <mediaobject>
- <imageobject role="fo">
- <imagedata
fileref="images/code_generation/code_generation_1.png"
format="PNG"/>
- </imageobject>
+ <para>
+ <figure>
+ <title>Hibernate Core Concepts</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/code_generation/code_generation_1.png"
format="PNG"/>
+ </imageobject>
- <imageobject role="html">
+ <imageobject role="html">
- <imagedata align="center"
fileref="images/code_generation/code_generation_1.png"
format="PNG"/>
- </imageobject>
- </mediaobject>
- </figure>
- </para>
+ <imagedata align="center"
fileref="images/code_generation/code_generation_1.png"
format="PNG"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
- <para>The code generation is done based on the Configuration model no matter
which type of
- configuration have been used to create the meta model, and thus the code generation
is
- independent on the source of the meta model and represented via
Exporters.</para>
- </section>
+ <para>
+ The code generation is done based on the Configuration model no matter which type of
configuration have been used to create the meta model, and thus the code generation is
independent on the source of the meta model and represented via Exporters.
+ </para>
+ </section>
- <section>
- <title>Exporters</title>
+ <section>
+ <title>Exporters</title>
- <para>Code generation is done in so called Exporters. An
<code>Exporter</code> is handed a
- Hibernate Meta Model represented as a <code>Configuration</code>
instance and it is then
- the job of the exporter to generate a set of code artifacts.</para>
+ <para>
+ Code generation is done in so called Exporters. An <code>Exporter</code>
is handed a Hibernate Meta Model represented as a <code>Configuration</code>
instance and it is then the job of the exporter to generate a set of code artifacts.
+ </para>
- <para>The tools provides a default set of Exporter's which can be used in
both Ant and the
- Eclipse UI. Documentation for these Exporters is in the <xref
linkend="ant"/>
- and <xref linkend="plugins"/> chapters.</para>
+ <para>
+ The tools provides a default set of Exporter's which can be used in both Ant and
the Eclipse UI. Documentation for these Exporters is in the <xref
linkend="ant"/> and <xref linkend="plugins"/> sections.
+ </para>
- <para>Users can provide their own customer Exporter's, either by custom
classes implementing the
- Exporter interface or simply be providing custom templates. This is documented at
<xref
- linkend="hbmtemplate"/></para>
- </section>
+ <para>
+ Users can provide their own customer Exporter's, either by custom classes
implementing the Exporter interface or simply be providing custom templates. This is
documented at in the <xref linkend="hbmtemplate"/> section.
+ </para>
+ </section>
</chapter>
Show replies by date