Author: mcaspers
Date: 2011-01-20 22:57:48 -0500 (Thu, 20 Jan 2011)
New Revision: 28462
Modified:
trunk/hibernatetools/docs/reference/en-US/ant.xml
Log:
General Updates
Modified: trunk/hibernatetools/docs/reference/en-US/ant.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en-US/ant.xml 2011-01-21 02:59:48 UTC (rev 28461)
+++ trunk/hibernatetools/docs/reference/en-US/ant.xml 2011-01-21 03:57:48 UTC (rev 28462)
@@ -218,34 +218,29 @@
<section>
<title>Hibernate Configurations</title>
- <para><emphasis>Hibernatetool</emphasis> supports four different
Hibernate configurations: A
- standard Hibernate configuration
- (<code><configuration></code>), Annotation based
- configuration (<code><annotationconfiguration></code>),
- JPA persistence based configuration
- (<code><jpaconfiguration></code>) and a JDBC based
- configuration (<code><jdbcconfiguration></code>)
- for use when reverse engineering.</para>
+ <para>
+ <emphasis>Hibernatetool</emphasis> supports four different Hibernate
configurations: A standard Hibernate configuration
(<code><configuration></code>), Annotation based configuration
(<code><annotationconfiguration></code>), JPA persistence based
configuration (<code><jpaconfiguration></code>) and a JDBC
based configuration (<code><jdbcconfiguration></code>) for use
when reverse engineering.
+ </para>
- <para>Each have in common that they are able to build up a Hibernate
Configuration object from
- which a set of exporters can be run to generate various output. </para>
+ <para>
+ Each have in common the fact that they are able to build up a Hibernate
Configuration object, from which a set of exporters can be run in order to generate
various output.
+ </para>
<note>
<title>Note:</title>
- <para>Output can be anything, e.g. specific files, statements execution
against a database,
- error reporting or anything else that can be done in java code.</para>
+ <para>
+ Output can be anything, e.g. specific files, statements execution against a
database, error reporting or anything else that can be done in java code.
+ </para>
</note>
- <para>The following sections describe what the various configurations can do,
plus lists the
- individual settings they have.</para>
+ <para>The following sections describe what the various configurations can do,
plus lists the individual settings they have.</para>
<section>
<title>Standard Hibernate Configuration
(<configuration>)</title>
- <para>A
- <code><configuration></code>
- is used to define a standard Hibernate configuration. A standard Hibernate
- configuration reads the mappings from a <filename>cfg.xml</filename>
and/or a fileset.</para>
+ <para>
+ A <code><configuration></code> is used to define a
standard Hibernate configuration. A standard Hibernate configuration reads the mappings
from a <filename>cfg.xml</filename> and/or a fileset.
+ </para>
<programlisting role="XML"><![CDATA[<configuration
configurationfile="hibernate.cfg.xml"
@@ -286,7 +281,7 @@
</entry>
<entry>
- <para>The name of a Hibernate configuration file, e.g.
"hibernate.cfg.xml"</para>
+ <para>The name of a Hibernate configuration file, e.g.
<filename>hibernate.cfg.xml</filename>.</para>
</entry>
<entry>
@@ -300,7 +295,7 @@
</entry>
<entry>
- <para>The name of a property file, e.g.
"hibernate.properties"</para>
+ <para>The name of a property file, e.g.
<filename>hibernate.properties</filename>.</para>
</entry>
<entry>
@@ -314,8 +309,7 @@
</entry>
<entry>
- <para>Name of a class that implements org.xml.sax.EntityResolver.
Used if the
- mapping files require custom entity resolver</para>
+ <para>Name of a class that implements
<code>org.xml.sax.EntityResolver</code>. Used if the mapping files require
custom entity resolver.</para>
</entry>
<entry>
@@ -330,9 +324,9 @@
</entry>
<entry>
- <para>Name of a class that implements
org.hibernate.cfg.NamingStrategy. Used for
- setting up the naming strategy in Hibernate which controls the
automatic naming of
- tables and columns.In JPA projects naming strategy is supported for
default Name/Columns mapping</para>
+ <para>
+ Name of a class that implements
<code>org.hibernate.cfg.NamingStrategy</code>. Used for setting up the naming
strategy in Hibernate which controls the automatic naming of tables and columns. In JPA
projects naming strategy is supported for default Name/Columns mapping.
+ </para>
</entry>
<entry>
@@ -346,9 +340,9 @@
</entry>
<entry>
- <para>A standard Ant fileset. Used to include hibernate mapping
files. Remember that
- if mappings are already specified in the
<filename>hibernate.cfg.xml</filename> then it should not be
- included via the fileset as it will result in duplicate import
exceptions.</para>
+ <para>
+ A standard Ant fileset. Used to include hibernate mapping files.
Remember that if mappings are already specified in the
<filename>hibernate.cfg.xml</filename> then it should not be included via the
fileset as it will result in duplicate import exceptions.
+ </para>
</entry>
<entry>
@@ -364,14 +358,15 @@
<section>
<title>Example</title>
- <para>This example shows an example where no
<filename>hibernate.cfg.xml</filename> exists, and a <filename>
hibernate.properties </filename> and fileset is used instead. </para>
+ <para>
+ This example shows an example where no
<filename>hibernate.cfg.xml</filename> exists, and a <filename>
hibernate.properties</filename> file and fileset is used instead.
+ </para>
<note>
<title>Note:</title>
- <para> Hibernate will still read any global <emphasis>
- <property>hibernate.properties</property>
- </emphasis> available in the classpath, but the specified properties
file here will
- override those values for any non-global property.</para>
+ <para>
+ Hibernate will still read any global
<filename>hibernate.properties</filename> available in the classpath, but the
specified properties file here will override those values for any non-global property.
+ </para>
</note>
<programlisting role="XML"><![CDATA[<hibernatetool
destdir="${build.dir}/generated">
@@ -392,26 +387,18 @@
<section>
<title>Annotation based Configuration
(<annotationconfiguration>)</title>
- <para>An
- <code><annotationconfiguration></code>
- is used when you want to read the metamodel from EJB3/Hibernate Annotations
- based POJO's.</para>
+ <para>An <code><annotationconfiguration></code> is
used when you want to read the metamodel from EJB3/Hibernate Annotations based
POJO's.</para>
<important>
<title>Important:</title>
- <para>To use it remember to put the jar files needed for using hibernate
annotations in the
- classpath of the
- <code><taskdef></code>, i. e.
- hibernate-annotations.jar and hibernate-commons-annotations.jar.</para>
+ <para>
+ To use it remember to put the jar files needed for using hibernate annotations
in the classpath of the <code><taskdef></code>, i.e.
<filename>hibernate-annotations.jar</filename> and
<filename>hibernate-commons-annotations.jar</filename>.
+ </para>
</important>
- <para>The
- <code><annotationconfiguration></code>
- supports the same attributes as a
- <code><configuration></code>
- except that the configurationfile attribute is now required as that is from
- where an <emphasis>AnnotationConfiguration</emphasis> gets the list
of classes/packages it
- should load.</para>
+ <para>
+ The <code><annotationconfiguration></code> supports the
same attributes as a <code><configuration></code> except that
the configurationfile attribute is now required as that is from where an
<emphasis>AnnotationConfiguration</emphasis> gets the list of classes/packages
it should load.
+ </para>
<para>Thus the minimal usage is:</para>
@@ -429,26 +416,21 @@
<section>
<title>JPA based configuration
(<jpaconfiguration>)</title>
- <para>A <code><jpaconfiguration></code>
- is used when you want to read the metamodel from JPA/Hibernate Annotation where
- you want to use the auto-scan configuration as defined in the JPA spec (part of
EJB3). In
- other words, when you do not have a
<filename>hibernate.cfg.xml</filename>, but instead have a setup where you
use
- a <filename>persistence.xml</filename> packaged in a JPA compliant
manner.</para>
+ <para>
+ A <code><jpaconfiguration></code> is used when you want
to read the metamodel from JPA/Hibernate Annotation where you want to use the auto-scan
configuration as defined in the JPA spec (part of EJB3). In other words, when you do not
have a <filename>hibernate.cfg.xml</filename>, but instead have a setup where
you use a <filename>persistence.xml</filename> file packaged in a JPA
compliant manner.
+ </para>
- <para>The <code><jpaconfiguration></code>
- will simply just try and auto-configure it self based on the available
- classpath, e.g. look for
<filename>META-INF/persistence.xml</filename>.</para>
+ <para>
+ The <code><jpaconfiguration></code> will simply try and
auto-configure it self based on the available classpath, e.g. look for the
<filename>META-INF/persistence.xml</filename> file.
+ </para>
- <para>The <emphasis>
- <property>persistenceunit</property>
- </emphasis> attribute can be used to select a specific persistence unit. If
no <emphasis>
- <property>persistenceunit</property>
- </emphasis> is specified it will automatically search for one and if a
unique one is found,
- use it, but if multiple persistence units are available it will
error.</para>
+ <para>
+ The <code>persistenceunit</code> attribute can be used to select a
specific persistence unit. If no <code>persistenceunit</code> is specified it
will automatically search for one and if a unique one is found, use it, but having
multiple persistence units will result in an error.
+ </para>
- <para>To use a <code><jpaconfiguration></code>
- you will need to specify some additional jars from Hibernate EntityManager in
- the <code><taskdef></code> of the hibernatetool. The
following shows a full setup:</para>
+ <para>
+ To use a <code><jpaconfiguration></code> you will need
to specify some additional jars from Hibernate EntityManager in the
<code><taskdef></code> of the hibernatetool. The following shows
a full setup:
+ </para>
<programlisting role="XML"><![CDATA[<path
id="ejb3toolslib">
<path refid="jpatoolslib"/> <!-- ref to previously defined toolslib
-->
@@ -479,8 +461,9 @@
<note>
<title>Note:</title>
- <para>ejb3configuration was the name used in previous versions. It still
works but will emit
- a warning telling you to use <literal>jpaconfiguration</literal>
instead.</para>
+ <para>
+ ejb3configuration was the name used in previous versions. It still works but
will emit a warning telling you to use <literal>jpaconfiguration</literal>
instead.
+ </para>
</note>
</section>
@@ -490,11 +473,13 @@
<para>A <code><jdbcconfiguration></code> is used to
perform reverse engineering of the database from a JDBC connection.</para>
- <para>This configuration works by reading the connection properties either
from <filename>hibernate.cfg.xml</filename> or
<filename>hibernate.properties</filename> with a fileset.</para>
+ <para>
+ This configuration works by reading the connection properties either from a
<filename>hibernate.cfg.xml</filename> file or a
<filename>hibernate.properties</filename> file with a fileset.
+ </para>
- <para>The <code><jdbcconfiguration></code> has the
same attributes as a
- <code><configuration></code>
- plus the following additional attributes:</para>
+ <para>
+ The <code><jdbcconfiguration></code> has the same
attributes as a <code><configuration></code> plus the following
additional attributes:
+ </para>
<programlisting role="XML"><![CDATA[<jdbcconfiguration
...
@@ -550,7 +535,7 @@
</entry>
<entry>
- <para>The name of a property file, e.g.
"hibernate.properties"</para>
+ <para>The name of a property file, e.g.
<filename>hibernate.properties</filename></para>
</entry>
<entry>
@@ -564,11 +549,9 @@
</entry>
<entry>
- <para>Name of a class that implements
org.hibernate.cfg.reveng.ReverseEngineeringStrategy.
- Used for setting up the strategy the tools will use to control the
reverse engineering, e.g. naming of
- properties, which tables to include/exclude etc. Using a class instead
of (or as
- addition to) a <filename>reveng.xml</filename> file gives
you full programmatic control of the reverse
- engineering.</para>
+ <para>
+ Name of a class that implements
<filename>org.hibernate.cfg.reveng.ReverseEngineeringStrategy</filename>. Used
for setting up the strategy the tools will use to control the reverse engineering, e.g.
naming of properties, which tables to include or exclude etc. Using a class instead of (or
as addition to) a <filename>reveng.xml</filename> file gives you full
programmatic control of the reverse engineering.
+ </para>
</entry>
<entry>
@@ -583,9 +566,9 @@
</entry>
<entry>
- <para>If true, tables which are pure many-to-many link tables will
be mapped as
- such. A pure many-to-many table is one which primary-key contains
exactly two
- foreign-keys pointing to other entity tables and has no other
columns.</para>
+ <para>
+ If true, tables which are pure many-to-many link tables will be mapped
as such. A pure many-to-many table is one which primary-key contains exactly two
foreign-keys pointing to other entity tables and has no other columns.
+ </para>
</entry>
<entry>
@@ -599,9 +582,10 @@
</entry>
<entry>
- <para>If true, columns named VERSION or TIMESTAMP with appropriate
types will be
- mapped with the appropriate optimistic locking corresponding to
- <code><version></code> or
<code><timestamp></code>.</para>
+ <para>
+ If true, columns named VERSION or TIMESTAMP with appropriate types will
be mapped with the appropriate optimistic locking corresponding to
+ <code><version></code> or
<code><timestamp></code>.
+ </para>
</entry>
<entry>
@@ -617,9 +601,9 @@
<section>
<title>Example</title>
- <para>Here is an example of using
<code><jdbcconfiguration></code> to generate Hibernate xml
mappings via
- <code><hbm2hbmxml></code>. The connection settings
here
- is read from a <filename> hibernate.properties </filename> file but
could just as well have been read from a
<filename>hibernate.cfg.xml</filename></para>
+ <para>
+ Here is an example of using
<code><jdbcconfiguration></code> to generate Hibernate xml
mappings via <code><hbm2hbmxml></code>. The connection settings
here is read from a <filename> hibernate.properties </filename> file but could
just as well have been read from a <filename>hibernate.cfg.xml</filename>
file.
+ </para>
<programlisting role="XML"><![CDATA[<hibernatetool>
<jdbcconfiguration propertyfile="etc/hibernate.properties" />
@@ -633,20 +617,16 @@
<section>
<title>Exporters</title>
- <para>Exporters are the parts that do the actual job of converting the
hibernate metamodel into
- various artifacts, mainly code. The following section describes the current
supported set of
- exporters in the <property>Hibernate Tool</property> distribution. It
is also possible for
- userdefined exporters, that is done through the
- <code><hbmtemplate></code>
- exporter.</para>
+ <para>
+ Exporters do the actual job of converting the hibernate metamodel into various
artifacts, mainly code. The following section describes the current supported set of
exporters in the <productname>Hibernate Tool</productname> distribution. It is
also possible to implement user defined exporters, which is done through the
<code><hbmtemplate></code> exporter.
+ </para>
<section>
<title>Database schema exporter (<hbm2ddl>)</title>
- <para><code><hbm2ddl></code> lets you run
schemaexport and schemaupdate which generates the appropriate SQL
- DDL and allow you to store the result in a file or export it directly to the
database.
- Remember that if a custom naming strategy is needed it is placed on the
configuration
- element.</para>
+ <para>
+ <code><hbm2ddl></code> lets you run schemaexport and
schemaupdate which generates the appropriate SQL DDL and allow you to store the result in
a file or export it directly to the database. Remember that if a custom naming strategy is
needed it is defined in the configuration element.
+ </para>
<programlisting role="XML"><![CDATA[<hbm2ddl
export="true|false"
@@ -702,11 +682,9 @@
</entry>
<entry>
- <para>Try and create an update script representing the
"delta"
- between what is in the database and what the mappings specify. Ignores
- create/update attributes. (<emphasis>Do *not* use against
production databases, no
- guarantees at all that the proper delta can be generated nor that the
underlying
- database can actually execute the needed
operations</emphasis>).</para>
+ <para>
+ Try and create an update script representing the
"delta" that is, between what is in the database and what the mappings
specify. Ignores create and update attributes. (<emphasis>Do *not* use against
production databases, as there are no guarantees that the proper delta can be generated
nor that the underlying database can actually execute the required
operations</emphasis>).
+ </para>
</entry>
<entry>
@@ -720,8 +698,7 @@
</entry>
<entry>
- <para>Output will contain drop statements for the tables, indices
and
- constraints</para>
+ <para>Output will contain drop statements for the tables, indices
and constraints</para>
</entry>
<entry>
@@ -736,8 +713,7 @@
</entry>
<entry>
- <para>Output will contain create statements for the tables, indices
and
- constraints</para>
+ <para>Output will contain create statements for the tables, indices
and constraints</para>
</entry>
<entry>
@@ -808,8 +784,9 @@
<section>
<title>Example</title>
- <para>Basic example of using
<code><hbm2ddl></code>, which does not export to the
- database but simply dumps the sql to a file named
<filename>sql.ddl</filename>.</para>
+ <para>
+ Basic example of using <code><hbm2ddl></code>, which
does not export to the database but simply dumps the SQL to a file named
<filename>sql.ddl</filename>.
+ </para>
<programlisting role="XML"><![CDATA[<hibernatetool
destdir="${build.dir}/generated">
<configuration configurationfile="hibernate.cfg.xml"/>
@@ -821,8 +798,9 @@
<section>
<title>POJO java code exporter (<hbm2java>)</title>
- <para><code><hbm2java></code> is a java
codegenerator. Options for controlling whether JDK 5 syntax can be
- used and whether the POJO should be annotated with EJB3/Hibernate
Annotations.</para>
+ <para>
+ <code><hbm2java></code> is a Java code generator.
Options for controlling whether JDK 5 syntax can be used and whether the POJO should be
annotated with EJB3/Hibernate Annotations.
+ </para>
<programlisting role="XML"><![CDATA[<hbm2java
jdk5="true|false"
@@ -872,8 +850,9 @@
</entry>
<entry>
- <para>Code will contain EJB 3 features, e.g. using annotations
from
- javax.persistence and org.hibernate.annotations</para>
+ <para>
+ Code will contain EJB 3 features, e.g. using annotations from
<code>javax.persistence</code> and
<code>org.hibernate.annotations</code>
+ </para>
</entry>
<entry>
@@ -889,7 +868,7 @@
<section>
<title>Example</title>
- <para>Basic example of using
<code><hbm2java></code> to generate POJO's that utilize jdk5
constructs.</para>
+ <para>Basic example of using
<code><hbm2java></code> to generate POJO's that utilize JDK5
constructs.</para>
<programlisting role="XML"><![CDATA[<hibernatetool
destdir="${build.dir}/generated">
<configuration configurationfile="hibernate.cfg.xml"/>
@@ -901,15 +880,15 @@
<section>
<title>Hibernate Mapping files exporter
(<hbm2hbmxml>)</title>
- <para><code><hbm2hbmxml></code> generates a set of
.hbm files. Intended to be used together with a
- <code><jdbcconfiguration></code>
- when performing reverse engineering, but can be used with any kind of
- configuration. e.g. to convert from annotation based pojo's to
<filename>hbm.xml</filename>.</para>
+ <para>
+ <code><hbm2hbmxml></code> generates a set of
<filename>.hbm</filename> files. Intended to be used together with a
<code><jdbcconfiguration></code> when performing reverse
engineering, but can be used with any kind of configuration. e.g. to convert from
annotation based POJO's to a <filename>hbm.xml</filename> file.
+ </para>
<note>
<title>Note:</title>
- <para>Not every possible mapping transformation is possible/implemented
(contributions
- welcome) so some hand editing might be necessary.</para>
+ <para>
+ Not every possible mapping transformation is possible/implemented (contributions
welcome) so some hand editing might be required.
+ </para>
</note>
<programlisting
role="XML"><![CDATA[<hbm2hbmxml/>]]></programlisting>
@@ -924,15 +903,13 @@
<hbm2hbmxml/>
</hibernatetool>]]></programlisting>
- <para><code><hbm2hbmxml></code> is normally used
with a <code><jdbcconfiguration></code> like in the above
example, but any other configuration can also be used to
- convert between the different ways of performing mappings. Here is an example
of that,
- using an <code><annotationconfiguration></code>
- .</para>
+ <para>
+ <code><hbm2hbmxml></code> is normally used with a
<code><jdbcconfiguration></code> like in the above example, but
any other configuration can also be used to convert between the different ways of
performing mappings. Here is an example of that, using an
<code><annotationconfiguration></code>.
+ </para>
<note>
<title>Note:</title>
- <para>Not all conversions are implemented (contributions welcome), so
some hand editing
- might be necessary.</para>
+ <para>Not all conversions are implemented (contributions welcome), so
some hand editing might be necessary.</para>
</note>
<programlisting role="XML"><![CDATA[<hibernatetool
destdir="${build.dir}/generated">
@@ -945,9 +922,9 @@
<section>
<title>Hibernate Configuration file exporter
(<hbm2cfgxml>)</title>
- <para><code><hbm2cfgxml></code> generates a
<filename>hibernate.cfg.xml</filename>. Intended to be used together with a
<code><jdbcconfiguration></code>
- when performing reverse engineering, but it can be used with any kind of
- configuration. The <code><hbm2cfgxml></code> will
contain the properties used and adds mapping entries for each mapped class.</para>
+ <para>
+ <code><hbm2cfgxml></code> generates a
<filename>hibernate.cfg.xml</filename> file. Intended to be used together with
a <code><jdbcconfiguration></code> when performing reverse
engineering, but it can be used with any kind of configuration. The
<code><hbm2cfgxml></code> will contain the properties used and
adds mapping entries for each mapped class.
+ </para>
<programlisting role="XML"><![CDATA[<hbm2cfgxml
ejb3="true|false"
@@ -984,8 +961,9 @@
</entry>
<entry>
- <para>The generated <filename>cfg.xml</filename> will
have <mapping class=".."/>, opposed
- to <mapping resource="..."/> for each
mapping.</para>
+ <para>
+ The generated <filename>cfg.xml</filename> will have
<mapping class=".."/>, opposed to <mapping
resource="..."/> for each mapping.
+ </para>
</entry>
<entry>
@@ -1003,8 +981,7 @@
<section>
<title>Documentation exporter (<hbm2doc>)</title>
- <para><code><hbm2doc></code>
- generates html documentation a'la javadoc for the database schema
et.al.</para>
+ <para><code><hbm2doc></code> generates HTML
documentation similar to Javadoc for the database schema et.al.</para>
<programlisting
role="XML"><![CDATA[<hbm2doc/>]]></programlisting>
</section>
@@ -1012,8 +989,9 @@
<section>
<title>Query exporter (<query>)</title>
- <para><code><query></code> is used to execute a HQL
query statements and optionally sends the output to a
- file. It can be used for verifying the mappings and for basic data
extraction.</para>
+ <para>
+ <code><query></code> is used to execute HQL query
statements and optionally redirects the output to a file. It can be used for verifying the
mappings and for basic data extraction.
+ </para>
<programlisting role="XML"><![CDATA[<query
destfile="filename">
@@ -1021,29 +999,31 @@
</query>
]]></programlisting>
- <para>Currently one session is opened and used for all queries and the query
is executed via
- the list() method. In the future more options might become available, like
performing
- executeUpdate(), use named queries and etc.</para>
+ <para>
+ Currently one session is opened and used for all queries and the query is executed
via the <code>list()</code> method. In the future more options might become
available, like performing <code>executeUpdate()</code>, use named queries and
etc.
+ </para>
<para/>
<section>
<title>Examples</title>
- <para>The simplest usage of <code><query></code>
will just execute the query without dumping to a file. This can be used to
- verify that queries can actually be performed.</para>
+ <para>
+ The simplest usage of <code><query></code> will just
execute the query without dumping to a file. This can be used to verify that queries can
actually be performed.
+ </para>
<programlisting role="XML"><![CDATA[<hibernatetool>
<configuration configurationfile="hibernate.cfg.xml"/>
<query>from java.lang.Object</query>
</hibernatetool>]]></programlisting>
- <para>Multiple queries can be executed by nested
<code><hql></code> elements.
- In this example we also let the output be dumped to
<filename>queryresult.txt</filename>.</para>
+ <para>
+ Multiple queries can be executed by nested
<code><hql></code> elements. In this example we also let the
output be dumped to the <filename>queryresult.txt</filename> file.
+ </para>
<note>
<title>Note:</title>
- <para> Currently the dump is simply a call to toString on each
element.</para>
+ <para> Currently the dump is simply a call to
<code>toString()</code> on each element.</para>
</note>
<programlisting role="XML"><![CDATA[<hibernatetool>
@@ -1069,16 +1049,16 @@
<note>
<title>Note:</title>
- <para>Previous versions of the tools used Velocity. We are now using
Freemarker which
- provides us much better exception and error handling.</para>
+ <para>Previous versions of the tools used
<productname>Velocity</productname>. We are now using
<productname>Freemarker</productname> which provides us much better exception
and error handling.
+ </para>
</note>
<section>
<title>Exporter via <hbmtemplate></title>
- <para>The following is an example of reverse engineering via
- <code><jdbcconfiguration></code> and usage of a
custom Exporter via the
- <code><hbmtemplate></code>.</para>
+ <para>
+ The following is an example of reverse engineering via
<code><jdbcconfiguration></code> and usage of a custom Exporter
via the <code><hbmtemplate></code>.
+ </para>
<programlisting role="XML"><![CDATA[ <hibernatetool
destdir="${destdir}">
<jdbcconfiguration
@@ -1100,11 +1080,9 @@
<section>
<title>Relevant Resources Links</title>
- <para>Read more about <ulink
url="http://velocity.apache.org/">Velocity</ulink> and <ulink
-
url="http://freemarker.org/">Freemarker</ulink> to find
out why using the last is better
- or refer to Max Andersen discussion on the topic in <ulink
-
url="http://in.relation.to/2110.lace;jsessionid=3462F47B17556604C15DF1B96572E940"
- >"A story about FreeMarker and
Velocity"</ulink>.</para>
+ <para>
+ Read more about <ulink
url="http://velocity.apache.org/">Velocity</ulink> and <ulink
url="http://freemarker.org/">Freemarker</ulink> to find out why using
the last is better or refer to Max Andersen discussion on the topic in <ulink
url="http://in.relation.to/2110.lace;jsessionid=3462F47B17556604C15DF1B96572E940">"A
story about FreeMarker and Velocity"</ulink>.
+ </para>
</section>
</section>
</section>
@@ -1114,57 +1092,44 @@
<section>
<title>Using properties to configure Exporters</title>
- <para>Exporters can be controlled by user properties. The user properties are
specified via
- <code><property></code>
- or
- <code><propertyset></code>
- and each exporter will have access to them directly in the templates and via
- <property>Exporter.setProperties()</property>.</para>
+ <para>
+ Exporters can be controlled by user properties. The user properties are specified
via <code><property></code> or
<code><propertyset></code> and each exporter will have access to
them directly in the templates and via <code>Exporter.setProperties()</code>.
+ </para>
<section>
- <title><property> and
- <propertyset></title>
+ <title><property> and
<propertyset></title>
- <para>The <code><property></code>
- allows you bind a string value to a key. The value will be available in the
- templates via <code>$<key></code>.
- The following example will assign the string value
- <code>"true"</code>
- to the variable
- <code>$descriptors</code>
- .</para>
+ <para>
+ The <code><property></code> allows you bind a string
value to a key. The value will be available in the templates via
<code>$<key></code>. The following example will assign the
string value <code>"true"</code> to the variable
<code>$descriptors</code>.
+ </para>
<programlisting role="XML"><![CDATA[<property
key="descriptors" value="true"/>]]></programlisting>
- <para>Most times using <code><property></code> is
enough for specifying the properties needed for the exporters. Still the ant
- tools supports the notion of <code><propertyset></code>
that is used for grouping a set of properties. More about the functionality of
<code><propertyset></code>
- is explained in detail in the <ulink
url="http://ant.apache.org/manual/">Ant
- manual</ulink>.</para>
+ <para>
+ Most times using <code><property></code> is enough for
specifying the properties needed for the exporters. Still the Ant tools supports the
notion of a <code><propertyset></code> which is used for
grouping a set of properties. More about the functionality of
<code><propertyset></code> is explained in detail in the
<ulink
url="http://ant.apache.org/manual/">Ant manual</ulink>.
+ </para>
</section>
<section>
<title>Getting access to user specific classes</title>
- <para>If the templates need to access some user class it becomes possible by
specifying a <code>
- "toolclass"</code> in the properties.</para>
+ <para>It is possible for the templates to access user classes by specifying a
<code>"toolclass"</code> in the properties.</para>
- <programlisting role="XML"><![CDATA[<property
key="hibernatetool.sometool.toolclass"
value="x.y.z.NameOfToolClass"/>
-]]></programlisting>
+ <programlisting role="XML"><![CDATA[<property
key="hibernatetool.sometool.toolclass"
value="x.y.z.NameOfToolClass"/>]]></programlisting>
- <para>Placing the above <code><property></code> tag
in <code><hibernatetool></code>
- or inside any exporter will automatically create an instance of
- <literal>x.y.z.NameOfToolClass</literal> and it will be available
in the templates as
- <literal>$sometool</literal>. This is useful to delegate logic and
code generation to java
- code instead of placing such logic in the templates.</para>
+ <para>
+ Placing the above <code><property></code> tag in
<code><hibernatetool></code> or inside any exporter will
automatically create an instance of <code>x.y.z.NameOfToolClass</code> and it
will be available in the templates as <code>$sometool</code>. This is useful
to delegate logic and code generation to Java code instead of placing such logic in the
templates.
+ </para>
<section>
<title>Example</title>
- <para>Here is an example that uses
<code><hbmtemplate></code>
- together with <code><property></code> which will be
available to the templates/exporter. </para>
+ <para>
+ Here is an example that uses
<code><hbmtemplate></code> together with
<code><property></code>, which will be available to the
templates/exporter.
+ </para>
<note>
<title>Note:</title>
- <para> This example actually simulates what
<code><hbm2java></code> actually does.</para>
+ <para> This example actually simulates what
<code><hbm2java></code> does.</para>
</note>
<programlisting role="XML"><![CDATA[<hibernatetool
destdir="${build.dir}/generated">