JBoss Tools SVN: r5148 - trunk/hibernatetools/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2007-11-29 08:48:54 -0500 (Thu, 29 Nov 2007)
New Revision: 5148
Modified:
trunk/hibernatetools/docs/reference/en/modules/ant.xml
trunk/hibernatetools/docs/reference/en/modules/codegen.xml
trunk/hibernatetools/docs/reference/en/modules/codegenarchitecture.xml
trunk/hibernatetools/docs/reference/en/modules/plugins.xml
trunk/hibernatetools/docs/reference/en/modules/reverseengineering.xml
trunk/hibernatetools/docs/reference/en/modules/setup.xml
Log:
http://jira.jboss.com/jira/browse/RHDS-300 - Highlighting miningful wards and framing the notes
Modified: trunk/hibernatetools/docs/reference/en/modules/ant.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/ant.xml 2007-11-29 12:41:06 UTC (rev 5147)
+++ trunk/hibernatetools/docs/reference/en/modules/ant.xml 2007-11-29 13:48:54 UTC (rev 5148)
@@ -5,30 +5,35 @@
<section>
<title>Introduction</title>
- <para>The hibernate-tools.jar contains the core for the Hibernate Tools.
- It is used as the basis for both the Ant tasks described in this document
- and the eclipse plugins both available from tools.hibernate.org The
- hibernate-tools.jar is located in your eclipse plugins directory at
- <literallayout>/plugins/org.hibernate.eclipse.x.x.x/lib/tools/hibernate-tools.jar</literallayout>.
- This jar is 100% independent from the eclipse platform and can thus be
- used independently of eclipse.</para>
+ <para>The <emphasis>
+ <property>hibernate-tools.jar</property>
+ </emphasis> contains the core for the <property>Hibernate Tools</property>. It is used as the
+ basis for both the Ant tasks described in this document and the eclipse plugins both available
+ from tools.hibernate.org The <emphasis>
+ <property>hibernate-tools.jar</property>
+ </emphasis> is located in your eclipse plugins directory at <emphasis>
+ <property>/plugins/org.hibernate.eclipse.x.x.x/lib/tools/hibernate-tools.jar.
+ </property>
+ </emphasis></para>
+ <para>This jar is 100% independent from the eclipse platform and can thus be used
+ independently of eclipse.</para>
- <para>
- Note: There might be incompabilities with respect to the Hibernate3.jar bundled with the tools and your own jar.
- Thus to avoid any confusion it is recommended to use the
- hibernate3.jar & hibernate-annotations.jar bundled with the
- tools when you want to use the Ant tasks. Do not worry about using
- e.g. Hibernate 3.2 jar's with e.g. an Hibernate 3.1 project since
- the output generated will work with previous Hibernate 3 versions.
- </para>
+ <note>
+ <para>There might be incompabilities with respect to the Hibernate3.jar bundled with the tools
+ and your own jar. Thus to avoid any confusion it is recommended to use the hibernate3.jar
+ & hibernate-annotations.jar bundled with the tools when you want to use the Ant
+ tasks. Do not worry about using e.g. Hibernate 3.2 jar's with e.g. an Hibernate 3.1 project
+ since the output generated will work with previous Hibernate 3 versions. </para>
+ </note>
</section>
-
- <section>
- <title>The <literal><hibernatetool></literal> ant Task</title>
- <para>To use the ant tasks you need to have the hibernatetool task
- defined. That is done in your build.xml by inserting the following xml
- (assuming the jars are in the <literal>lib</literal> directory):
+ <section>
+ <title>The <literal><hibernatetool></literal> ant Task</title>
+
+ <para>To use the ant tasks you need to have the hibernatetool task defined. That is done in your <emphasis>
+ <property>build.xml</property>
+ </emphasis> by inserting the following xml (assuming the jars are in the
+ <literal>lib</literal> directory):
<programlisting><![CDATA[<path id="toolslib">
<path location="lib/hibernate-tools.jar" />
<path location="lib/hibernate3.jar" />
@@ -41,35 +46,47 @@
classpathref="toolslib" />
]]></programlisting></para>
- <para>this <literal><taskdef></literal> defines a Ant task called
- <literal><hibernatetool></literal> which now can be used anywhere
- in your ant build.xml files. It is important to include all the
- hibernate tools dependencies as well as the jdbc driver.</para>
+ <para>this <emphasis>
+ <property>
+ <literal><taskdef></literal>
+ </property>
+ </emphasis> defines a Ant task called <emphasis>
+ <property>
+ <literal><hibernatetool></literal>
+ </property>
+ </emphasis> which now can be used anywhere in your ant <emphasis>
+ <property>build.xml</property>
+ </emphasis> files. It is important to include all the <property>Hibernate Tools</property>
+ dependencies as well as the jdbc driver.</para>
- <para>Notice that to use the annotation based Configuration you must get
- a release from http://annotations.hibernate.org.</para>
+ <para>Notice that to use the annotation based Configuration you must <ulink
+ url="http://annotations.hibernate.org">get a release</ulink>. </para>
- <para></para>
+ <para/>
- <para>When using the <literal><hibernatetool> </literal>task you
- have to specify one or more of the following:</para>
+ <para>When using the <emphasis>
+ <property>
+ <literal><hibernatetool> </literal>
+ </property>
+ </emphasis> task you have to specify one or more of the following:</para>
- <para><programlistingco>
- <areaspec>
- <area coords="2 55" id="ht1" />
+ <para>
+ <programlistingco>
+ <areaspec>
+ <area coords="2 55" id="ht1"/>
- <area coords="3 55" id="ht2" />
+ <area coords="3 55" id="ht2"/>
- <area coords="4 55" id="ht3" />
+ <area coords="4 55" id="ht3"/>
- <area coords="7 55" id="ht4" />
+ <area coords="7 55" id="ht4"/>
- <area coords="8 55" id="ht5" />
+ <area coords="8 55" id="ht5"/>
- <area coords="10 55" id="ht6" />
- </areaspec>
+ <area coords="10 55" id="ht6"/>
+ </areaspec>
- <programlisting><![CDATA[<hibernatetool
+ <programlisting><![CDATA[<hibernatetool
destdir="defaultDestinationDirectory"
templatepath="defaultTemplatePath"
>
@@ -81,65 +98,76 @@
(<hbm2java>,<hbm2cfgxml>,<hbmtemplate>,...*)
</hibernatetool>]]></programlisting>
- <calloutlist>
- <callout arearefs="ht1">
- <para><literal>destdir</literal> (required): destination
- directory for files generated with exporters.</para>
- </callout>
+ <calloutlist>
+ <callout arearefs="ht1">
+ <para><literal>destdir</literal> (required): destination directory for files generated
+ with exporters.</para>
+ </callout>
- <callout arearefs="ht2">
- <para><literal>templatepath</literal> (optional): A path to be
- used to look up user-edited templates.</para>
- </callout>
+ <callout arearefs="ht2">
+ <para><literal>templatepath</literal> (optional): A path to be used to look up
+ user-edited templates.</para>
+ </callout>
- <callout arearefs="ht3">
- <para><literal>classpath</literal> (optional): A classpath to be
- used to resolve resources, such as mappings and usertypes.
- Optional, but very often required.</para>
- </callout>
+ <callout arearefs="ht3">
+ <para><literal>classpath</literal> (optional): A classpath to be used to resolve
+ resources, such as mappings and usertypes. Optional, but very often required.</para>
+ </callout>
- <callout arearefs="ht4">
- <para><literal>property</literal> and
- <property>propertyset</property> (optional): Used to set
- properties to control the exporters. Mostly relevant for
- providing custom properties to user defined templates.</para>
- </callout>
+ <callout arearefs="ht4">
+ <para><literal>property</literal> and propertyset (optional): Used to set properties to
+ control the exporters. Mostly relevant for providing custom properties to user defined
+ templates.</para>
+ </callout>
- <callout arearefs="ht5">
- <para>One of 4 different ways of configuring the Hibernate Meta
- Model must be specified.</para>
- </callout>
+ <callout arearefs="ht5">
+ <para>One of 4 different ways of configuring the Hibernate Meta Model must be
+ specified.</para>
+ </callout>
- <callout arearefs="ht6">
- <para>One or more of the exporters must be specified</para>
- </callout>
- </calloutlist>
- </programlistingco></para>
+ <callout arearefs="ht6">
+ <para>One or more of the exporters must be specified</para>
+ </callout>
+ </calloutlist>
+ </programlistingco>
+ </para>
- <section>
- <title>Basic examples</title>
+ <section>
+ <title>Basic examples</title>
- <para>The following example shows the most basic setup for generating
- pojo's via <literal>hbm2java</literal> from a normal
- <literal>hibernate.cfg.xml.</literal> The output will be put in the
- <literal>${build.dir}/generated</literal> directory.</para>
+ <para>The following example shows the most basic setup for generating pojo's via
+ <literal>hbm2java</literal> from a normal <emphasis>
+ <property>
+ <literal>hibernate.cfg.xml.</literal>
+ </property>
+ </emphasis> The output will be put in the <emphasis>
+ <property>${build.dir}/generated</property></emphasis>
+ directory.</para>
- <para><programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
+ <para>
+ <programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
<configuration configurationfile="hibernate.cfg.xml"/>
<hbm2java/>
-</hibernatetool>]]></programlisting></para>
+</hibernatetool>]]></programlisting>
+ </para>
- <para>The following example is similar, but now we are performing
- multiple exports from the same configuration. We are exporting the
- schema via hbm2dll, generates some DAO code via <hbm2dao> and
- finally runs a custom code generation via <hbmtemplate>. This is
- again from a normal <literal>hibernate.cfg.xml and </literal>the
- output is still put in the <literal>${build.dir}/generated</literal>
- directory. Furthermore the example also shows where a classpath is
- specified when you e.g. have custom usertypes or some mappings that is
- needed to be looked up as a classpath resource.</para>
+ <para>The following example is similar, but now we are performing multiple exports from the
+ same configuration. We are exporting the schema via hbm2dll, generates some DAO code via <emphasis>
+ <property><hbm2dao></property>
+ </emphasis> and finally runs a custom code generation via <emphasis>
+ <property><hbmtemplate></property>
+ </emphasis>. This is again from a normal <emphasis>
+ <property>hibernate.cfg.xml</property></emphasis> and the output
+ is still put in the <emphasis>
+ <property>
+ <literal>${build.dir}/generated</literal>
+ </property>
+ </emphasis> directory. Furthermore the example also shows where a classpath is specified
+ when you e.g. have custom usertypes or some mappings that is needed to be looked up as a
+ classpath resource.</para>
- <para><programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
+ <para>
+ <programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
<classpath>
<path location="${build.dir}/classes"/>
</classpath>
@@ -152,53 +180,58 @@
templatepath="${etc.dir}/customtemplates"
template="myconstants.vm"
/>
-</hibernatetool>]]></programlisting></para>
- </section>
+</hibernatetool>]]></programlisting>
+ </para>
</section>
+ </section>
- <section>
- <title>Hibernate Configurations</title>
+ <section>
+ <title>Hibernate Configurations</title>
- <para><literal>hibernatetool</literal> supports four different Hibernate
- configurations: A standard Hibernate configuration
- (<literal><configuration></literal>), Annotation based
- configuration (<literal><annotationconfiguration></literal>), JPA
- persistence based configuration
- (<literal><jpaconfiguration></literal>) and a JDBC based
- configuration (<literal><jdbcconfiguration></literal>) for use
- when reverse engineering.</para>
+ <para><literal>hibernatetool</literal> supports four different Hibernate configurations: A
+ standard Hibernate configuration (<emphasis>
+ <property><configuration></property>
+ </emphasis>), Annotation based configuration (<emphasis>
+ <property><annotationconfiguration></property>
+ </emphasis>), JPA persistence based configuration (<emphasis>
+ <property><jpaconfiguration></property>
+ </emphasis>) and a JDBC based configuration (<emphasis>
+ <property><jdbcconfiguration></property>
+ </emphasis>) for use when reverse engineering.</para>
- <para>Each have in common that they are able to build up a Hibernate
- <literal>Configuration</literal> object from which a set of exporters
- can be run to generate various output. Note: output can be anything,
- e.g. specific files, statments execution against a database, error
- reporting or anything else that can be done in java code.</para>
+ <para>Each have in common that they are able to build up a Hibernate
+ <literal>Configuration</literal> object from which a set of exporters can be run to generate
+ various output. Note: output can be anything, e.g. specific files, statments execution against
+ a database, error reporting or anything else that can be done in java code.</para>
- <para>The following section decribes what the the various configuration
- can do, plus list the individual settings they have.</para>
+ <para>The following section decribes what the the various configuration can do, plus list the
+ individual settings they have.</para>
- <section>
- <title>Standard Hibernate Configuration
- (<configuration>)</title>
+ <section>
+ <title>Standard Hibernate Configuration (<configuration>)</title>
- <para>A <configuration> is used to define a standard Hibernate
- configuration. A standard Hibernate configuration reads the mappings
- from a cfg.xml and/or a fileset.</para>
+ <para>A <emphasis>
+ <property><configuration></property>
+ </emphasis> is used to define a standard Hibernate configuration. A standard Hibernate
+ configuration reads the mappings from a <emphasis>
+ <property>cfg.xml</property>
+ </emphasis> and/or a fileset.</para>
- <para><programlistingco>
- <areaspec>
- <area coords="2 55" id="cfg1" />
+ <para>
+ <programlistingco>
+ <areaspec>
+ <area coords="2 55" id="cfg1"/>
- <area coords="3 55" id="cfg2" />
+ <area coords="3 55" id="cfg2"/>
- <area coords="4 55" id="cfg3" />
+ <area coords="4 55" id="cfg3"/>
- <area coords="5 55" id="cfg4" />
+ <area coords="5 55" id="cfg4"/>
- <area coords="7 55" id="cfg5" />
- </areaspec>
+ <area coords="7 55" id="cfg5"/>
+ </areaspec>
- <programlisting><![CDATA[<configuration
+ <programlisting><![CDATA[<configuration
configurationfile="hibernate.cfg.xml"
propertyfile="hibernate.properties"
entityresolver="EntityResolver classname"
@@ -208,53 +241,55 @@
</configuration>]]></programlisting>
- <calloutlist>
- <callout arearefs="cfg1">
- <para><literal>configurationfile</literal> (optional): The
- name of a Hibernate configuration file, e.g.
- "hibernate.cfg.xml"</para>
- </callout>
+ <calloutlist>
+ <callout arearefs="cfg1">
+ <para><literal>configurationfile</literal> (optional): The name of a Hibernate
+ configuration file, e.g. "hibernate.cfg.xml"</para>
+ </callout>
- <callout arearefs="cfg2">
- <para><literal>propertyfile</literal> (optional): The name of
- a property file, e.g. "hibernate.properties"</para>
- </callout>
+ <callout arearefs="cfg2">
+ <para><literal>propertyfile</literal> (optional): The name of a property file, e.g.
+ "hibernate.properties"</para>
+ </callout>
- <callout arearefs="cfg3">
- <para><literal>entity-resolver</literal> (optional): name of a
- class that implements org.xml.sax.EntityResolver. Used if the
- mapping files require custom entity resolver.</para>
- </callout>
+ <callout arearefs="cfg3">
+ <para><literal>entity-resolver</literal> (optional): name of a class that implements
+ org.xml.sax.EntityResolver. Used if the mapping files require custom entity
+ resolver.</para>
+ </callout>
- <callout arearefs="cfg4">
- <para><literal>namingstrategy</literal> (optional): 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.</para>
- </callout>
+ <callout arearefs="cfg4">
+ <para><literal>namingstrategy</literal> (optional): 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.</para>
+ </callout>
- <callout arearefs="cfg5">
- <para>A standard Ant fileset. Used to include hibernate
- mapping files.Remember that if mappings are already specified
- in the hibernate.cfg.xml then it should not be included via
- the fileset as it will result in duplicate import
- exceptions.</para>
- </callout>
- </calloutlist>
- </programlistingco></para>
+ <callout arearefs="cfg5">
+ <para>A standard Ant fileset. Used to include hibernate mapping files.Remember that if
+ mappings are already specified in the hibernate.cfg.xml then it should not be
+ included via the fileset as it will result in duplicate import exceptions.</para>
+ </callout>
+ </calloutlist>
+ </programlistingco>
+ </para>
- <section>
- <title>Example</title>
+ <section>
+ <title>Example</title>
- <para>This example shows an example where no
- <literal>hibernate.cfg.xml</literal> exists, and a
- <literal>hibernate.properties</literal> + fileset is used instead.
- Note, that Hibernate will still read any global
- <literal>/hibernate.properties</literal> available in the classpath,
- but the specified properties file here will override those values
- for any non-global property.</para>
+ <para>This example shows an example where no <emphasis>
+ <property><literal>hibernate.cfg.xml</literal></property></emphasis> exists,
+ and a <emphasis>
+ <property><literal>hibernate.properties</literal></property></emphasis> + fileset is used instead.
+ </para>
+ <note>
+ <para>
+ Hibernate will still read any global <literal>/hibernate.properties</literal> available in
+ the classpath, but the specified properties file here will override those values for any
+ non-global property.</para>
+ </note>
- <para><programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
+ <para>
+ <programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
<configuration propertyfile="{etc.dir}/hibernate.properties">
<fileset dir="${src.dir}">
<include name="**/*.hbm.xml"/>
@@ -264,63 +299,71 @@
<!-- list exporters here -->
-</hibernatetool>]]></programlisting></para>
- </section>
+</hibernatetool>]]></programlisting>
+ </para>
</section>
+ </section>
- <section>
- <title>Annotation based Configuration
- (<annotationconfiguration>)</title>
+ <section>
+ <title>Annotation based Configuration (<annotationconfiguration>)</title>
- <para>An <literal><annotationconfiguration></literal> is used
- when you want to read the metamodel from EJB3/Hibernate Annotations
- based POJO's. To use it remember to put the jars file needed for using
- hibernate annotations in the classpath of the
- <literal><taskdef></literal>.</para>
+ <para>An <emphasis>
+ <property><annotationconfiguration></property></emphasis> is used when you want to
+ read the metamodel from EJB3/Hibernate Annotations based POJO's. To use it remember to put
+ the jars file needed for using hibernate annotations in the classpath of the
+ <emphasis>
+ <property><taskdef></property></emphasis>.</para>
- <para>The <annotationconfiguration> supports the same attributes
- as an <configuration> except that the configurationfile
- attribute is now required as that is from where an
- <literal>AnnotationConfiguration</literal> gets the list of
+ <para>The <emphasis>
+ <property><annotationconfiguration></property></emphasis> supports the same attributes as an
+ <emphasis>
+ <property><configuration></property></emphasis> except that the configurationfile attribute is now required as
+ that is from where an <literal>AnnotationConfiguration</literal> gets the list of
classes/packages it should load.</para>
- <para>Thus the minimal usage is:</para>
+ <para>Thus the minimal usage is:</para>
- <para><programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
+ <para>
+ <programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
<annotationconfiguration
configurationfile="hibernate.cfg.xml"/>
<!-- list exporters here -->
</hibernatetool>
-]]></programlisting></para>
- </section>
+]]></programlisting>
+ </para>
+ </section>
- <section>
- <title>JPA based configuration (<jpaconfiguration>)</title>
+ <section>
+ <title>JPA based configuration (<jpaconfiguration>)</title>
- <para>An <jpaconfiguration> 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 <literal>hibernate.cfg.xml</literal>, but
- instead have a setup where you use a
- <literal>persistence.xml</literal> packaged in an JPA compliant
- manner.</para>
+ <para>An <emphasis>
+ <property><jpaconfiguration></property></emphasis> 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
+ <emphasis>
+ <property>hibernate.cfg.xml</property></emphasis>, but instead have a setup where you use a
+ <emphasis>
+ <property>persistence.xml</property></emphasis> packaged in an JPA compliant manner.</para>
- <para><literal><jpaconfiguration></literal> will
- simply just try and auto-configure it self based on the available
- classpath, e.g. look for META-INF/persistence.xml.</para>
-
- <para>The <literal>persistenceunit</literal> attribute can be used to select a specific
- persistence unit. If no persistenceunit 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><literal><jpaconfiguration></literal> will simply just try and
+ auto-configure it self based on the available classpath, e.g. look for
+ <emphasis>
+ <property>META-INF/persistence.xml</property></emphasis>.</para>
- <para>To use an <jpaconfiguration> you will need to specify
- some additional jars from Hibernate EntityManager in the
- <taskdef> of the hibernatetool. The following shows a full
- setup:</para>
+ <para>The <literal>persistenceunit</literal> attribute can be used to select a specific
+ persistence unit. If no persistenceunit 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>
- <programlisting><![CDATA[<path id="ejb3toolslib">
+ <para>To use an <emphasis>
+ <property><jpaconfiguration></property></emphasis> you will need to specify some additional jars
+ from Hibernate EntityManager in the <emphasis>
+ <property><taskdef></property></emphasis> of the hibernatetool. The
+ following shows a full setup:</para>
+
+ <programlisting><![CDATA[<path id="ejb3toolslib">
<path refid="jpatoolslib"/> <!-- ref to previously defined toolslib -->
<path location="lib/hibernate-annotations.jar" />
<path location="lib/ejb3-persistence.jar" />
@@ -346,38 +389,41 @@
</hibernatetool>
]]></programlisting>
-<para>Note: <literal>ejb3configuration</literal> were the name used in previous versions. It still
-works but will emit a warning telling you to use <literal>jpaconfiguration</literal> instead.</para>
+
+ <note><para><literal>ejb3configuration</literal> were 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>
+ </section>
- <section>
- <title>JDBC Configuration for reverse engineering
- (<jdbcconfiguration>)</title>
+ <section>
+ <title>JDBC Configuration for reverse engineering (<jdbcconfiguration>)</title>
- <para>A <literal><jdbcconfiguration></literal> is used to
- perform reverse engineering of the database from a JDBC
- connection.</para>
+ <para>A <emphasis>
+ <property><literal><jdbcconfiguration></literal></property></emphasis> is used to perform reverse
+ engineering of the database from a JDBC connection.</para>
- <para>This configuration works by reading the connection properties
- from</para>
+ <para>This configuration works by reading the connection properties from</para>
- <para>The <literal><jdbcconfiguration></literal> has the same
- attributes as a <literal><configuration></literal> plus the
- following additional attributes:</para>
+ <para>The <emphasis>
+ <property><literal><jdbcconfiguration></literal></property></emphasis> has the same attributes as a
+ <emphasis>
+ <property><literal><configuration></literal></property></emphasis> plus the following additional attributes:</para>
- <para><programlistingco>
- <areaspec>
- <area coords="3 57" id="xcfg1" />
+ <para>
+ <programlistingco>
+ <areaspec>
+ <area coords="3 57" id="xcfg1"/>
- <area coords="4 57" id="xcfg2" />
+ <area coords="4 57" id="xcfg2"/>
- <area coords="5 57" id="xcfg3" />
- <area coords="6 57" id="xcfg4" />
- <area coords="7 57" id="xcfg5" />
- </areaspec>
+ <area coords="5 57" id="xcfg3"/>
+ <area coords="6 57" id="xcfg4"/>
+ <area coords="7 57" id="xcfg5"/>
+ </areaspec>
- <programlisting><![CDATA[<jdbcconfiguration
+ <programlisting><![CDATA[<jdbcconfiguration
...
packagename="package.name"
revengfile="hibernate.reveng.xml"
@@ -388,96 +434,100 @@
...
</jdbcconfiguration>]]></programlisting>
- <calloutlist>
- <callout arearefs="xcfg1">
- <para><literal>packagename</literal> (optional): The default package name to use
- when mappings for classes is created</para>
- </callout>
+ <calloutlist>
+ <callout arearefs="xcfg1">
+ <para><literal>packagename</literal> (optional): The default package name to use when
+ mappings for classes is created</para>
+ </callout>
- <callout arearefs="xcfg2">
- <para><literal>revengfile</literal> (optional): name of
- reveng.xml that allows you to control various aspects of the
+ <callout arearefs="xcfg2">
+ <para><literal>revengfile</literal> (optional): name of reveng.xml that allows you to
+ control various aspects of the reverse engineering.</para>
+ </callout>
+
+ <callout arearefs="xcfg3">
+ <para><literal>reversestrategy</literal> (optional): name of a class that implements
+ <literal>org.hibernate.cfg.reveng.ReverseEngineeringStrategy</literal>. 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 reveng.xml file gives you full programmatic control of the
reverse engineering.</para>
- </callout>
+ </callout>
- <callout arearefs="xcfg3">
- <para><literal>reversestrategy</literal> (optional): name of a
- class that implements
- <literal>org.hibernate.cfg.reveng.ReverseEngineeringStrategy</literal>.
- 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 reveng.xml file gives you full programmatic
- control of the reverse engineering.</para>
- </callout>
+ <callout arearefs="xcfg4">
+ <para>detectManytoMany (default:true): If true (the default) 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 has exactly two foreign-keys pointing to other entity
+ tables and has no other columns.</para>
+ </callout>
+ <callout arearefs="xcfg5">
+ <para>detectOptimisticLock (efault:true): If true columns named VERSION or TIMESTAMP
+ with appropriate types will be mapped with the apropriate optimistic locking
+ corresponding to <literal><version></literal> or
+ <literal><timestamp></literal></para>
+ </callout>
+ </calloutlist>
+ </programlistingco>
+ </para>
- <callout arearefs="xcfg4">
- <para>detectManytoMany (default:true): If true (the default) 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 has exactly two foreign-keys pointing to other entity tables and has no other columns.</para>
- </callout>
- <callout arearefs="xcfg5">
- <para>detectOptimisticLock (efault:true): If true columns named VERSION or TIMESTAMP with appropriate types will be mapped with the apropriate optimistic locking corresponding to <literal><version></literal> or <literal><timestamp></literal></para>
- </callout>
- </calloutlist>
- </programlistingco></para>
+ <section>
+ <title>Example</title>
- <section>
- <title>Example</title>
+ <para>Here is an example of using <emphasis>
+ <property><literal><jdbcconfiguration></literal></property></emphasis> to
+ generate Hibernate xml mappings via <literal><hbm2hbmxml></literal>. The
+ connection settings is here read from a <emphasis>
+ <property><literal>hibernate.properties</literal></property></emphasis> file but
+ could just as well have been read from a <emphasis>
+ <property>hibernate.cfg.xml</property></emphasis>.</para>
- <para>Here is an example of using
- <literal><jdbcconfiguration></literal> to generate Hibernate
- xml mappings via <literal><hbm2hbmxml></literal>. The
- connection settings is here read from a
- <literal>hibernate.properties</literal> file but could just as well
- have been read from a <literal>hibernate.cfg.xml.</literal></para>
-
- <programlisting><![CDATA[<hibernatetool>
+ <programlisting><![CDATA[<hibernatetool>
<jdbcconfiguration propertyfile="etc/hibernate.properties" />
<hbm2hbmxml destdir="${build.dir}/src" />
</hibernatetool>
]]></programlisting>
- </section>
</section>
</section>
+ </section>
- <section>
- <title>Exporters</title>
+ <section>
+ <title>Exporters</title>
- <para>Exporters is the parts that does 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
- Hibernate Tool distribution. It is also possible for userdefined
- exporters, that is done through the
- <literal><hbmtemplate></literal> exporter.</para>
+ <para>Exporters is the parts that does 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 <emphasis>
+ <property><literal><hbmtemplate></literal></property></emphasis> exporter.</para>
- <section>
- <title>Database schema exporter
- (<literal><hbm2ddl></literal>)</title>
+ <section>
+ <title>Database schema exporter (<hbm2ddl>)</title>
- <para><hbm2ddl> 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><emphasis>
+ <property><hbm2ddl></property></emphasis> 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><programlistingco>
- <areaspec>
- <area coords="2 55" id="ycfg1" />
+ <para>
+ <programlistingco>
+ <areaspec>
+ <area coords="2 55" id="ycfg1"/>
- <area coords="3 55" id="ycfg2" />
+ <area coords="3 55" id="ycfg2"/>
- <area coords="4 55" id="ycfg3" />
+ <area coords="4 55" id="ycfg3"/>
- <area coords="5 55" id="ycfg4" />
+ <area coords="5 55" id="ycfg4"/>
- <area coords="6 55" id="ycfg5" />
+ <area coords="6 55" id="ycfg5"/>
- <area coords="7 55" id="ycfg6" />
+ <area coords="7 55" id="ycfg6"/>
- <area coords="8 55" id="ycfg7" />
- <area coords="8 55" id="ycfg8" />
- </areaspec>
+ <area coords="8 55" id="ycfg7"/>
+ <area coords="8 55" id="ycfg8"/>
+ </areaspec>
- <programlisting><![CDATA[<hbm2ddl
+ <programlisting><![CDATA[<hbm2ddl
export="true|false"
update="true|false"
drop="true|false"
@@ -488,264 +538,283 @@
haltonerror="true|false"
>]]></programlisting>
- <calloutlist>
- <callout arearefs="ycfg1">
- <para>export (default: true): Execute the generated statements
- against the database</para>
- </callout>
+ <calloutlist>
+ <callout arearefs="ycfg1">
+ <para>export (default: true): Execute the generated statements against the
+ database</para>
+ </callout>
- <callout arearefs="ycfg2">
- <para>update(default: false): 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>
- </callout>
+ <callout arearefs="ycfg2">
+ <para>update(default: false): 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>
+ </callout>
- <callout arearefs="ycfg3">
- <para>drop (default: false): Output will contain drop
- statements for the tables, indices & constraints</para>
- </callout>
+ <callout arearefs="ycfg3">
+ <para>drop (default: false): Output will contain drop statements for the tables,
+ indices & constraints</para>
+ </callout>
- <callout arearefs="ycfg4">
- <para>create (default: true): Output will contain create
- statements for the tables, indices & constraints</para>
- </callout>
+ <callout arearefs="ycfg4">
+ <para>create (default: true): Output will contain create statements for the tables,
+ indices & constraints</para>
+ </callout>
- <callout arearefs="ycfg5">
- <para>outputfilename (Optional): If specified the statements
- will be dumped to this file.</para>
- </callout>
+ <callout arearefs="ycfg5">
+ <para>outputfilename (Optional): If specified the statements will be dumped to this
+ file.</para>
+ </callout>
- <callout arearefs="ycfg6">
- <para>delimiter (default: ";"): What delimter to use to
- separate statements</para>
- </callout>
+ <callout arearefs="ycfg6">
+ <para>delimiter (default: ";"): What delimter to use to separate statements</para>
+ </callout>
- <callout arearefs="ycfg7">
- <para>format (default: false): Apply basic formatting to the
- statements.</para>
- </callout>
-
- <callout arearefs="ycfg8">
- <para>haltonerror (default: false): Halt build process if an error occurs.</para>
- </callout>
-
- </calloutlist>
- </programlistingco></para>
+ <callout arearefs="ycfg7">
+ <para>format (default: false): Apply basic formatting to the statements.</para>
+ </callout>
- <section>
- <title>Example</title>
+ <callout arearefs="ycfg8">
+ <para>haltonerror (default: false): Halt build process if an error occurs.</para>
+ </callout>
- <para>Basic example of using <hbm2ddl>, which does not export
- to the database but simply dumps the sql to a file named
- sql.ddl.</para>
+ </calloutlist>
+ </programlistingco>
+ </para>
- <programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
+ <section>
+ <title>Example</title>
+
+ <para>Basic example of using <emphasis>
+ <property><hbm2ddl></property></emphasis>, which does not export to the database
+ but simply dumps the sql to a file named <emphasis>
+ <property>sql.ddl</property></emphasis>.</para>
+
+ <programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
<configuration configurationfile="hibernate.cfg.xml"/>
<hbm2ddl export="false" outputfilename="sql.ddl"/>
</hibernatetool>]]></programlisting>
- </section>
</section>
+ </section>
- <section>
- <title>POJO java code exporter
- (<literal><hbm2java></literal>)</title>
+ <section>
+ <title>POJO java code exporter (<literal><hbm2java></literal>)</title>
- <para><hbm2java> is a java codegenerator. Options for
- controlling wether JDK 5 syntax can be used and wether the POJO should
- be annotated with EJB3/Hibernate Annotations.</para>
+ <para><emphasis>
+ <property><hbm2java></property></emphasis> is a java codegenerator. Options for controlling wether JDK 5
+ syntax can be used and wether the POJO should be annotated with EJB3/Hibernate Annotations.</para>
- <para><programlistingco>
- <areaspec>
- <area coords="2 55" id="zcfg1" />
+ <para>
+ <programlistingco>
+ <areaspec>
+ <area coords="2 55" id="zcfg1"/>
- <area coords="3 55" id="zcfg2" />
- </areaspec>
+ <area coords="3 55" id="zcfg2"/>
+ </areaspec>
- <programlisting><![CDATA[<hbm2java
+ <programlisting><![CDATA[<hbm2java
jdk5="true|false"
ejb3="true|false"
>]]></programlisting>
- <calloutlist>
- <callout arearefs="zcfg1">
- <para>jdk (default: false): Code will contain JDK 5 constructs
- such as generics and static imports</para>
- </callout>
+ <calloutlist>
+ <callout arearefs="zcfg1">
+ <para>jdk (default: false): Code will contain JDK 5 constructs such as generics and
+ static imports</para>
+ </callout>
- <callout arearefs="zcfg2">
- <para>ejb3 (default: false): Code will contain EJB 3 features,
- e.g. using annotations from javax.persistence and
- org.hibernate.annotations</para>
- </callout>
- </calloutlist>
- </programlistingco></para>
+ <callout arearefs="zcfg2">
+ <para>ejb3 (default: false): Code will contain EJB 3 features, e.g. using annotations
+ from javax.persistence and org.hibernate.annotations</para>
+ </callout>
+ </calloutlist>
+ </programlistingco>
+ </para>
- <section>
- <title>Example</title>
+ <section>
+ <title>Example</title>
- <para>Basic example of using <hbm2java> to generate POJO's
- that utilize jdk5 constructs.</para>
+ <para>Basic example of using <emphasis>
+ <property><hbm2java></property></emphasis> to generate POJO's that utilize jdk5
+ constructs.</para>
- <programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
+ <programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
<configuration configurationfile="hibernate.cfg.xml"/>
<hbm2java jdk5="true"/>
</hibernatetool>]]></programlisting>
- </section>
</section>
+ </section>
- <section>
- <title>Hibernate Mapping files exporter
- (<literal><hbm2hbmxml></literal>)</title>
+ <section>
+ <title>Hibernate Mapping files exporter (<literal><hbm2hbmxml></literal>)</title>
- <para><hbm2hbmxml> generates a set of .hbm files. Intended to be
- used together with a <jdbcconfiguration> when performing reverse
- engineering, but can be used with any kind of configuration. e.g. to
- convert from annotation based pojo's to hbm.xml. Note that not every
- possible mapping transformation is possible/implemented (contributions
- welcome) so some hand editing might be necessary.</para>
+ <para><emphasis>
+ <property><hbm2hbmxml></property></emphasis> generates a set of .hbm files. Intended to be used together
+ with a <emphasis>
+ <property><jdbcconfiguration></property></emphasis> when performing reverse engineering, but can be
+ used with any kind of configuration. e.g. to convert from annotation based pojo's to
+ <emphasis>
+ <property>hbm.xml</property></emphasis>. Note that not every possible mapping transformation is possible/implemented
+ (contributions welcome) so some hand editing might be necessary.</para>
- <programlisting><![CDATA[<hbm2hbmxml/>]]></programlisting>
+ <programlisting><![CDATA[<hbm2hbmxml/>]]></programlisting>
- <section>
- <title>Example</title>
+ <section>
+ <title>Example</title>
- <para>Basic usage of <hbm2hbmxml></para>
+ <para>Basic usage of <emphasis>
+ <property><hbm2hbmxml></property></emphasis>.</para>
- <programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
+ <programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
<configuration configurationfile="hibernate.cfg.xml"/>
<hbm2hbmxml/>
</hibernatetool>]]></programlisting>
- <para><hbm2hbmxml> is normally used with a
- <jdbcconfiguration> 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
- <annotationconfiguration>. Note: not all conversions is
- implemented (contributions welcome), so some hand editing might be
- necessary.</para>
+ <para><emphasis>
+ <property><hbm2hbmxml></property>
+ </emphasis> is normally used with a <emphasis>
+ <property><jdbcconfiguration></property>
+ </emphasis>
+ 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
+ <emphasis>
+ <property><annotationconfiguration></property></emphasis>.</para>
+
+ <note><para>Not all conversions is implemented
+ (contributions welcome), so some hand editing might be necessary.</para>
+ </note>
- <para><programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
+ <para>
+ <programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
<annotationconfiguration configurationfile="hibernate.cfg.xml"/>
<hbm2hbmxml/>
-</hibernatetool>]]></programlisting></para>
- </section>
+</hibernatetool>]]></programlisting>
+ </para>
</section>
+ </section>
- <section>
- <title>Hibernate Configuration file exporter
- (<literal><hbm2cfgxml></literal>)</title>
+ <section>
+ <title>Hibernate Configuration file exporter (<literal><hbm2cfgxml></literal>)</title>
- <para><hbm2cfgxml> generates a hibernate.cfg.xml. Intended to be
- used together with a <jdbcconfiguration> when performing reverse
- engineering, but can be used with any kind of configuration. The
- <hbm2cfgxml> will contain the properties used and adds mapping
- entries for each mapped class.</para>
+ <para><emphasis>
+ <property><hbm2cfgxml></property></emphasis> generates a <emphasis>
+ <property>hibernate.cfg.xml</property></emphasis>. Intended to be used together
+ with a <emphasis>
+ <property><jdbcconfiguration></property></emphasis> when performing reverse engineering, but can be
+ used with any kind of configuration. The <emphasis>
+ <property><hbm2cfgxml></property></emphasis> will contain the
+ properties used and adds mapping entries for each mapped class.</para>
- <para><programlistingco>
- <areaspec>
- <area coords="2 55" id="qcfg1" />
- </areaspec>
+ <para>
+ <programlistingco>
+ <areaspec>
+ <area coords="2 55" id="qcfg1"/>
+ </areaspec>
- <programlisting><![CDATA[<hbm2cfgxml
+ <programlisting><![CDATA[<hbm2cfgxml
ejb3="true|false"
/>
]]></programlisting>
- <calloutlist>
- <callout arearefs="qcfg1">
- <para>ejb3 (default: false): the generated cfg.xml will have
- <mapping class=".."/>, opposed to <mapping
- resource="..."/> for each mapping.</para>
- </callout>
- </calloutlist>
- </programlistingco></para>
- </section>
+ <calloutlist>
+ <callout arearefs="qcfg1">
+ <para>ejb3 (default: false): the generated cfg.xml will have <mapping
+ class=".."/>, opposed to <mapping resource="..."/> for each
+ mapping.</para>
+ </callout>
+ </calloutlist>
+ </programlistingco>
+ </para>
+ </section>
- <section>
- <title>Documentation exporter
- (<literal><hbm2doc></literal>)</title>
+ <section>
+ <title>Documentation exporter (<literal><hbm2doc></literal>)</title>
- <para><hbm2doc> generates html documentation a'la javadoc for
- the database schema et.al.</para>
+ <para><emphasis>
+ <property><hbm2doc></property></emphasis> generates html documentation a'la javadoc for the database
+ schema et.al.</para>
- <programlisting><![CDATA[<hbm2doc/>]]></programlisting>
- </section>
+ <programlisting><![CDATA[<hbm2doc/>]]></programlisting>
+ </section>
- <section>
- <title>Query exporter (<query>)</title>
+ <section>
+ <title>Query exporter (<query>)</title>
- <para><query> is used to execute a HQL query statements and
- optionally send the output to a file. Can be used for verifying the
- mappings and for basic data extraction.</para>
+ <para><emphasis>
+ <property><query></property></emphasis> is used to execute a HQL query statements and optionally send the
+ output to a file. Can be used for verifying the mappings and for basic data extraction.</para>
- <programlisting><![CDATA[<query
+ <programlisting><![CDATA[<query
destfile="filename">
<hql>[a HQL query string]</hql>
</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 etc.</para>
+ <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 etc.</para>
- <para></para>
+ <para/>
- <section>
- <title>Examples</title>
+ <section>
+ <title>Examples</title>
- <para>Simplest usage of <query> will just execute the query
- without dumping to a file. This can be used to verify that queries
- can actually be performed.</para>
+ <para>Simplest usage of <emphasis>
+ <property><query></property></emphasis> will just execute the query without dumping to
+ a file. This can be used to verify that queries can actually be performed.</para>
- <programlisting><![CDATA[<hibernatetool>
+ <programlisting><![CDATA[<hibernatetool>
<configuration configurationfile="hibernate.cfg.xml"/>
<query>from java.lang.Object</query>
</hibernatetool>]]></programlisting>
- <para>Multiple queries can be executed by nested <hql>
- elements. In this example we also let the output be dumped to
- <literal>queryresult.txt</literal>. Note that currently the dump is
- simply a call to toString on each element.</para>
+ <para>Multiple queries can be executed by nested <emphasis>
+ <property><hql></property></emphasis> elements. In this
+ example we also let the output be dumped to <emphasis>
+ <property>queryresult.txt</property></emphasis>. </para>
+
+ <note><para>
+ Currently the dump is simply a call to toString on each element.</para>
+ </note>
- <para><programlisting><![CDATA[<hibernatetool>
+ <para>
+ <programlisting><![CDATA[<hibernatetool>
<configuration configurationfile="hibernate.cfg.xml"/>
<query destfile="queryresult.txt">
<hql>select c.name from Customer c where c.age > 42</hql>
<hql>from Cat</hql>
-</hibernatetool>]]></programlisting></para>
- </section>
+</hibernatetool>]]></programlisting>
+ </para>
</section>
+ </section>
- <section id="hbmtemplate">
- <title>Generic Hibernate metamodel exporter (<literal><hbmtemplate></literal>)</title>
+ <section id="hbmtemplate">
+ <title>Generic Hibernate metamodel exporter (<literal><hbmtemplate></literal>)</title>
- <para>Generic exporter that can be controlled by a user provided
- template or class.</para>
+ <para>Generic exporter that can be controlled by a user provided template or class.</para>
- <programlisting><![CDATA[<hbmtemplate
+ <programlisting><![CDATA[<hbmtemplate
filepattern="{package-name}/{class-name}.ftl"
template="somename.ftl"
exporterclass="Exporter classname"
/>]]></programlisting>
- <para>NOTICE: Previous versions of the tools used Velocity. We are now
- using Freemarker which provides us much better exception and error
- handling.</para>
+ <note><para>Previous versions of the tools used Velocity. We are now using Freemarker which
+ provides us much better exception and error handling.</para>
+ </note>
- <section>
- <title>Exporter via
- <literal><hbmtemplate></literal></title>
+ <section>
+ <title>Exporter via <literal><hbmtemplate></literal></title>
- <para>The following is an example of reverse engineering via
- <literal><jdbcconfiguration></literal> and use a custom
- Exporter via the <literal><hbmtemplate></literal>.</para>
+ <para>The following is an example of reverse engineering via
+ <emphasis>
+ <property><jdbcconfiguration></property></emphasis> and use a custom Exporter via the
+ <emphasis>
+ <property><hbmtemplate></property></emphasis>.</para>
- <para><programlisting><![CDATA[ <hibernatetool destdir="${destdir}">
+ <para>
+ <programlisting><![CDATA[ <hibernatetool destdir="${destdir}">
<jdbcconfiguration
configurationfile="hibernate.cfg.xml"
packagename="my.model"/>
@@ -759,64 +828,74 @@
filepattern="."/>
</hibernatetool>
-]]></programlisting></para>
- </section>
+]]></programlisting>
+ </para>
</section>
</section>
+ </section>
- <section>
- <title>Using properties to configure Exporters</title>
+ <section>
+ <title>Using properties to configure Exporters</title>
- <para>Exporters can be controlled by user properties. The user
- properties is specificed via <literal><property></literal> or
- <literal><propertyset></literal> and each exporter will have
- access to them directly in the templates and via
- <literal>Exporter.setProperties()</literal>.</para>
+ <para>Exporters can be controlled by user properties. The user properties is specificed via
+ <emphasis>
+ <property><property></property></emphasis> or
+ <emphasis>
+ <property><literal><propertyset></literal></property></emphasis> and each exporter will have access to them
+ directly in the templates and via <literal>Exporter.setProperties()</literal>.</para>
- <section>
- <title><literal><property></literal> and
+ <section>
+ <title><literal><property></literal> and
<literal><propertyset></literal></title>
- <para>The <property> allows you bind a string value to a key.
- The value will be available in the templates via $<key>. The
- following example will assign the string value "true" to the variable
- <literal>$descriptors</literal></para>
+ <para>The <emphasis>
+ <property><property></property></emphasis> allows you bind a string value to a key. The value will be
+ available in the templates via $<key>. The following example will assign the
+ string value <emphasis>
+ <property>"true"</property></emphasis> to the variable <literal>$descriptors</literal></para>
- <programlisting><![CDATA[<property key="descriptors" value="true"/>]]></programlisting>
+ <programlisting><![CDATA[<property key="descriptors" value="true"/>]]></programlisting>
- <para>Most times using <literal><property></literal> is enough
- for specifying the properties needed for the exporters. Still the ant
- tools supports the notion of <literal><propertyset></literal>.
- The functionallity of <literal><propertyset></literal> is
- explained in detail in the Ant task manual.</para>
- </section>
+ <para>Most times using <emphasis>
+ <property><literal><property></literal></property></emphasis> is enough for specifying
+ the properties needed for the exporters. Still the ant tools supports the notion of
+ <emphasis>
+ <property><literal><propertyset></literal></property></emphasis>. The functionallity of
+ <emphasis>
+ <property><literal><propertyset></literal></property></emphasis> is explained in detail in the Ant task
+ manual.</para>
+ </section>
- <section>
- <title>Getting access to user specific classes</title>
+ <section>
+ <title>Getting access to user specific classes</title>
- <para>If the templates need to access some user class it is possible
- by specifying a "toolclass" in the properties.</para>
+ <para>If the templates need to access some user class it is possible by specifying a
+ <emphasis>
+ <property>"toolclass"</property></emphasis> in the properties.</para>
- <programlisting><![CDATA[<property key="hibernatetool.sometool.toolclass" value="x.y.z.NameOfToolClass"/>
+ <programlisting><![CDATA[<property key="hibernatetool.sometool.toolclass" value="x.y.z.NameOfToolClass"/>
]]></programlisting>
- <para>Placing the above <literal><property></literal> tag in
- <literal><hibernatetool></literal> 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 usefull to
- delegate logic and code generation to java code instead of placing
- such logic in the templates.</para>
+ <para>Placing the above <emphasis>
+ <property><literal><property></literal></property></emphasis> tag in
+ <emphasis>
+ <property><literal><hibernatetool></literal></property></emphasis> 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 usefull to delegate logic and code
+ generation to java code instead of placing such logic in the templates.</para>
- <section>
- <title>Example</title>
+ <section>
+ <title>Example</title>
- <para>Here is an example that uses <hbmtemplate> together with
- <property> which will be available to the templates/exporter.
- Note: This example actually simulates what <hbm2java> actually
- does.</para>
+ <para>Here is an example that uses <emphasis>
+ <property><hbmtemplate></property></emphasis> together with
+ <emphasis>
+ <property><property></property></emphasis> which will be available to the templates/exporter. </para>
+ <note><para> This
+ example actually simulates what <hbm2java> actually does.</para>
+ </note>
- <programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
+ <programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
<configuration
configurationfile="etc/hibernate.cfg.xml"/>
<hbmtemplate
@@ -828,7 +907,7 @@
</hbmtemplate>
</hibernatetool>
]]></programlisting>
- </section>
</section>
</section>
+ </section>
</chapter>
Modified: trunk/hibernatetools/docs/reference/en/modules/codegen.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/codegen.xml 2007-11-29 12:41:06 UTC (rev 5147)
+++ trunk/hibernatetools/docs/reference/en/modules/codegen.xml 2007-11-29 13:48:54 UTC (rev 5148)
@@ -2,7 +2,8 @@
<chapter id="codegen">
<title>Controlling POJO code generation</title>
- <para>When using <hbm2java> or the eclipse plugin to generate POJO
+ <para>When using <emphasis>
+ <property><hbm2java></property></emphasis> or the eclipse plugin to generate POJO
java code you have the possibility to control certain aspects of the code
generation. This is primarily done through the <meta> tag in the
mapping files. The following section describes the possible meta tags and
@@ -11,17 +12,22 @@
<section>
<title>The <literal><meta></literal> attribute</title>
- <para>The <literal><meta></literal> tag is a simple way of
- annotating the <literal>hbm.xml</literal> with information, so tools have
+ <para>The <emphasis>
+ <property><meta></property></emphasis> tag is a simple way of
+ annotating the <emphasis>
+ <property>hbm.xml</property></emphasis> with information, so tools have
a natural place to store/read information that is not directly related to
the Hibernate core.</para>
- <para>You can use the <literal><meta></literal> tag to e.g. tell
- <literal>hbm2java</literal> to only generate "protected" setters, have
+ <para>You can use the <emphasis>
+ <property><meta></property></emphasis> tag to e.g. tell
+ <literal>hbm2java</literal> to only generate <emphasis>
+ <property>"protected"</property></emphasis> setters, have
classes always implement a certain set of interfaces or even have them
extend a certain base class and even more.</para>
- <para>The following example shows how to use various <meta>
+ <para>The following example shows how to use various <emphasis>
+ <property><meta></property></emphasis>
attributes and the resulting java code.</para>
<programlisting><class name="Person">
@@ -39,7 +45,8 @@
</property>
</class></programlisting>
- <para>The above hbm.xml will produce something like the following (code
+ <para>The above <emphasis>
+ <property>hbm.xml</property></emphasis> will produce something like the following (code
shortened for better understanding). Notice the Javadoc comment and the
protected set methods:</para>
@@ -219,37 +226,50 @@
</tgroup>
</table>
- <para>Attributes declared via the <literal><meta></literal> tag are
- per default "inherited" inside an <literal>hbm.xml</literal> file.</para>
+ <para>Attributes declared via the <emphasis>
+ <property><meta></property></emphasis> tag are
+ per default <emphasis>
+ <property>"inherited"</property></emphasis> inside an <emphasis>
+ <property>hbm.xml</property></emphasis> file.</para>
<para>What does that mean? It means that if you e.g want to have all your
classes implement <literal>IAuditable</literal> then you just add an
- <literal><meta
- attribute="implements">IAuditable</meta></literal> in the top of
- the <literal>hbm.xml</literal> file, just after
- <literal><hibernate-mapping></literal>. Now all classes defined in
- that <literal>hbm.xml</literal> file will implement
+ <emphasis>
+ <meta
+ attribute="implements">IAuditable</meta></emphasis> in the top of
+ the <emphasis>
+ <property>hbm.xml</property></emphasis> file, just after
+ <emphasis>
+ <property><hibernate-mapping></property></emphasis>. Now all classes defined in
+ that <emphasis>
+ <property>hbm.xml</property></emphasis> file will implement
<literal>IAuditable</literal>!</para>
- <para>Note: This applies to <emphasis>all</emphasis>
+ <note><para>This applies to <emphasis>all</emphasis>
<literal><meta></literal>-tags. Thus it can also e.g. be used to
specify that all fields should be declare protected, instead of the
default private. This is done by adding <literal><meta
attribute="scope-field">protected</meta></literal> at e.g. just
under the <literal><class></literal> tag and all fields of that
class will be protected.</para>
+ </note>
- <para>To avoid having a <literal><meta></literal>-tag inherited then
- you can simply specify <literal>inherit="false"</literal> for the
- attribute, e.g. <literal><meta attribute="scope-class"
- inherit="false">public abstract</meta></literal> will restrict
- the "class-scope" to the current class, not the subclasses.</para>
+ <para>To avoid having a <emphasis>
+ <property><meta></property></emphasis> tag inherited then
+ you can simply specify <emphasis>
+ inherit = "false"</emphasis> for the
+ attribute, e.g. <emphasis>
+ <meta attribute = "scope-class"
+ inherit = "false">public abstract</meta></emphasis> will restrict
+ the <emphasis>
+ <property>"class-scope"</property></emphasis> to the current class, not the subclasses.</para>
<section>
<title>Recomendations</title>
<para>The following are some good practices when using
- <literal><meta></literal> attributes.</para>
+ <emphasis>
+ <property><meta></property></emphasis> attributes.</para>
<section>
<title>Dangers of a class level <literal>use-in-string and
@@ -268,7 +288,8 @@
</class>
</hibernate-mapping></programlisting>
- <para>and for <literal>Event.hbm</literal> file:</para>
+ <para>and for <emphasis>
+ <property>Event.hbm</property></emphasis> file:</para>
<programlisting><hibernate-mapping>
<class name="events.Event" table="EVENTS">
@@ -286,7 +307,8 @@
</class>
</hibernate-mapping></programlisting>
- <para>Then <literal><hbm2java></literal> will assume you want to
+ <para>Then <emphasis>
+ <property><hbm2java></property></emphasis> will assume you want to
include all properties and collections in the
<literal>toString()/equals()</literal> methods and this can result in
infinite recursive calls.</para>
@@ -358,11 +380,13 @@
<para>Therefore automatically configuration the generation of
<literal>equals()/hashCode()</literal> methods specifying at class
- scope level the <literal><meta></literal> attribute
+ scope level the <emphasis>
+ <property><meta></property></emphasis> attribute
<literal>use-in-equals</literal> could be a dangerous decision that
could produce non expected side-effect.</para>
- <para>See http://www.hibernate.org/109.html for an more in-depth
+ <para><ulink
+ url="http://www.hibernate.org/109.html">Here</ulink> you can get more in-depth
explanation on the subject of equals() and hashcode().</para>
</section>
</section>
@@ -373,7 +397,7 @@
<para>This section shows an example for using meta attributes (including
userspecific attributes) together with the code generation features in
- Hibernate Tools.</para>
+ <property>Hibernate Tools</property>.</para>
<para>The usecase being implemented is to automatically insert some pre-
and post-conditions into the getter and setters of the generated POJO.
@@ -382,24 +406,32 @@
<section>
<title>Generate pre/post-conditions for methods</title>
- <para>With an <literal><meta attribute="class-code"></literal>,
+ <para>With an <emphasis>
+ <meta attribute="class-code"></emphasis>,
you can add addional methods on a given class, nevertheless such
- <literal><meta></literal> attribute can not be used at property
- scope level and Hibernatetools does not provide such
- <literal><meta></literal> attributes.</para>
+ <emphasis>
+ <property><meta></property></emphasis> attribute can not be used at property
+ scope level and <property>Hibernate Tools</property> does not provide such
+ <emphasis>
+ <property><meta></property></emphasis> attributes.</para>
<para>A possibly solution for this is to modify the freemarker
templates responsable for generating the POJO's. If you look inside
- <literal>hibernate-tools.jar</literal>, you can find the template:
- <literal>pojo/PojoPropertyAccessor.ftl</literal></para>
+ <emphasis>
+ <property>hibernate-tools.jar</property></emphasis>, you can find the template:
+ <emphasis>
+ <property>pojo/PojoPropertyAccessor.ftl</property></emphasis></para>
<para>This file is as the named indicates used to generate property
accessors for pojo's.</para>
- <para>Extract the <literal>PojoPropertyAccessor.ftl</literal> into a
- local folder i.e. <literal>${hbm.template.path}</literal>, respecting
+ <para>Extract the <emphasis>
+ <property>PojoPropertyAccessor.ftl</property></emphasis> into a
+ local folder i.e. <emphasis>
+ <property>${hbm.template.path}</property></emphasis>, respecting
the whole path, for example:
- <literal>${hbm.template.path}/pojo/PojoPropertyAccessor.ftl</literal></para>
+ <emphasis>
+ <property>${hbm.template.path}/pojo/PojoPropertyAccessor.ftl</property></emphasis></para>
<para>The contents of the file is something like this:</para>
@@ -434,8 +466,10 @@
</#foreach>
</programlisting>
- <para>Now if in any <literal>*hbm.xml</literal> file we define the
- <literal><meta></literal> attributes:
+ <para>Now if in any <emphasis>
+ <property>*hbm.xml</property></emphasis> file we define the
+ <emphasis>
+ <property><meta></property></emphasis> attributes:
<literal>pre-cond</literal> or <literal>post-cond</literal>, their
contents will be generated into the body of the relevant
<literal>set</literal> method.</para>
@@ -443,7 +477,8 @@
<para>As an examlpe let us add a pre-condition for property
<literal>name</literal> preventing no <literal>Person</literal> can
have an empty name. So we have to modify the
- <literal>Person.hbm.xml</literal> file like this:</para>
+ <emphasis>
+ <property>Person.hbm.xml</property></emphasis> file like this:</para>
<programlisting><hibernate-mapping>
<class name="Person">
@@ -460,16 +495,19 @@
</class>
</hibernate-mapping></programlisting>
- <para>Notes: i) If you don't use <literal><[[CDATA[]]></literal>
- you have to scape the & symbol, i.e.: &amp; ii). Note that we
+ <note> <para>i) If you don'' use <literal><[[CDATA[]]></literal>
+ you have to scape the & symbol, i.e.: &amp; </para>
+ <para>ii). Note that we
are referring to "firstName" directly and this is the parameter name
not the actual field name. If you want to refer the field you have to
use "this.firstName" instead. </para>
+ </note>
- <para>Finally we have to generate the <literal>Person.java</literal>
+ <para>Finally we have to generate the <property>Person.java</property>
class, for this we can use both Eclipse and Ant as long as you
remember to set or fill in the templatepath setting. For Ant we
- configure <literal><hibernatetool></literal> task via
+ configure <emphasis>
+ <property><hibernatetool></property></emphasis> task via
<literal>the templatepath</literal> attribute as in:</para>
<programlisting>
@@ -491,9 +529,11 @@
</hibernatetool>
</target></programlisting>
- <para>Invoking the target <literal><hbm2java></literal> will
- generate on the <literal>${hbm2java.dest.dir}</literal> the file:
- <literal>Person.java</literal>:</para>
+ <para>Invoking the target <emphasis>
+ <property><hbm2java></property></emphasis> will
+ generate on the <emphasis>
+ <property>${hbm2java.dest.dir}</property></emphasis> the file:
+ <property>Person.java</property>:</para>
<programlisting>// default package
import java.io.Serializable;
Modified: trunk/hibernatetools/docs/reference/en/modules/codegenarchitecture.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/codegenarchitecture.xml 2007-11-29 12:41:06 UTC (rev 5147)
+++ trunk/hibernatetools/docs/reference/en/modules/codegenarchitecture.xml 2007-11-29 13:48:54 UTC (rev 5148)
@@ -2,95 +2,112 @@
<chapter id="codegenarchitecture">
<title>Code generation architecture</title>
- <para>The code generation mechanism in the Hibernate Tools 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 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>
<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 <literal>Configuration</literal> class, the same class that is used to
- build a session factory.</para>
+ <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 <literal>Configuration</literal> class, the same class that is
+ used to build a session factory.</para>
- <para>The model represented by the <literal>Configuration</literal> class
- can be build in many ways. The following list the currently supported ones
- in Hibernate Tools. </para>
+ <para>The model represented by the <literal>Configuration</literal> class can be build in many
+ ways. The following list the currently supported ones in <property>Hibernate Tools</property>. </para>
- <para><itemizedlist>
+ <para>
+ <itemizedlist>
<listitem>
- <para>A <emphasis>Core configuration</emphasis> uses Hibernate Core
- and supports reading hbm.xml files, requires a hibernate.cfg.xml.
- Named core in Eclipse and <literal><configuration></literal>
- in ant.</para>
+ <para>A <emphasis>
+ <property>Core configuration</property>
+ </emphasis> 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 <emphasis>
+ <property><literal><configuration></literal></property></emphasis>
+ in ant.</para>
</listitem>
<listitem>
- <para>A <emphasis>Annotation configuration</emphasis> uses Hibernate
- Annotations and supports hbm.xml and annotated classes, requires a
- hibernate.cfg.xml. Named annotations in Eclipse and
- <literal><annotationconfiguration></literal> in ant.</para>
+ <para>A <emphasis>
+ <property>Annotation configuration</property>
+ </emphasis> 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
+ <emphasis>
+ <property><literal><annotationconfiguration></literal></property></emphasis> in ant.</para>
</listitem>
<listitem>
- <para>A <emphasis>JPA configuration</emphasis> uses a Hibernate
- EntityManager and supports hbm.xml and annotated classes requires
- that the project has a META-INF/persistence.xml in its classpath.
- Named JPA in Eclipse and <literal><jpaconfiguration></literal>
- in ant.</para>
+ <para>A <emphasis>
+ <property>JPA configuration</property>
+ </emphasis> 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
+ <emphasis>
+ <property><literal><jpaconfiguration></literal></property></emphasis> in ant.</para>
</listitem>
<listitem>
- <para>A <emphasis>JDBC configuration</emphasis> uses Hibernate Tools
- 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
- <literal><jdbcconfiguration></literal> in ant.</para>
+ <para>A <emphasis>
+ <property>JDBC configuration</property>
+ </emphasis> 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
+ <emphasis>
+ <property><literal><jdbcconfiguration></literal></property></emphasis> in ant.</para>
</listitem>
- </itemizedlist></para>
+ </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 Hibernate Tools. The
- important thing to note is that no matter which Hibnerate Configuration
- type you are using Hibernate Tools supports them.</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>. The important thing to note is that no matter which Hibnerate
+ Configuration type you are using <property>Hibernate Tools</property> supports them.</para>
<para>The following drawing illustrates the core concepts:</para>
- <para><mediaobject>
+ <para>
+ <figure>
+ <title>Hibernate Core Concepts</title>
+ <mediaobject>
<imageobject role="fo">
- <imagedata fileref="images/architecture.png" format="PNG" />
+ <imagedata fileref="images/architecture.png" format="PNG"/>
</imageobject>
<imageobject role="html">
- <imagedata align="center"
- fileref="images/architecture.png" format="PNG" />
+
+ <imagedata align="center" fileref="images/architecture.png" format="PNG"/>
</imageobject>
- </mediaobject></para>
+ </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>
+ <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>
- <para>Code generation is done in so called Exporters. An
- <literal>Exporter</literal> is handed a Hibernate Meta Model represented
- as a <literal>Configuration</literal> 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 <literal>Exporter</literal> is handed a
+ Hibernate Meta Model represented as a <literal>Configuration</literal> 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
- Ant and Eclipse sections.</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 Ant and Eclipse 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>
+ <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>
-</chapter>
\ No newline at end of file
+</chapter>
Modified: trunk/hibernatetools/docs/reference/en/modules/plugins.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/plugins.xml 2007-11-29 12:41:06 UTC (rev 5147)
+++ trunk/hibernatetools/docs/reference/en/modules/plugins.xml 2007-11-29 13:48:54 UTC (rev 5148)
@@ -5,547 +5,690 @@
<section>
<title>Introduction</title>
- <para></para>
+ <para/>
- <para>The following features are available in the Hibernate Tools Eclipse
- plugins:</para>
+ <para>The following features are available in the <property>Hibernate Tools</property> Eclipse
+ plugins:</para>
- <para><emphasis role="bold">Mapping Editor</emphasis>: An editor for
- Hibernate XML mapping files, supporting auto-completion and syntax
- highlighting. It also supports semantic auto-completion for class names
- and property/field names, making it much more versatile than a normal XML
- editor.</para>
+ <para><emphasis role="bold">Mapping Editor</emphasis>: An editor for Hibernate XML mapping
+ files, supporting auto-completion and syntax highlighting. It also supports semantic
+ auto-completion for class names and property/field names, making it much more versatile than a
+ normal XML editor.</para>
- <para><emphasis role="bold">Hibernate Console</emphasis>: The console is a
- new perspective in Eclipse. It provides an overview of your Hibernate
- Console configurations, were you also can get an interactive view of your
- persistent classes and their relationships. The console allows you to
- execute HQL queries against your database and browse the result directly
- in Eclipse.</para>
+ <para><emphasis role="bold">Hibernate Console</emphasis>: The console is a new perspective in
+ Eclipse. It provides an overview of your Hibernate Console configurations, were you also can
+ get an interactive view of your persistent classes and their relationships. The console allows
+ you to execute HQL queries against your database and browse the result directly in Eclipse.</para>
- <para><emphasis role="bold">Configuration Wizards and Code
- generation</emphasis>: A set of wizards are provided with the Hibernate
- Eclipse tools; you can use a wizard to quickly generate common Hibernate
- configuration (cfg.xml) files, and from these you can code generate a
- series of various artifacts, there is even support for completely reverse
- engineer an existing database schema and use the code generation to
- generate POJO source files and Hibernate mapping files.</para>
+ <para><emphasis role="bold">Configuration Wizards and Code generation</emphasis>: A set of
+ wizards are provided with the Hibernate Eclipse tools; you can use a wizard to quickly
+ generate common Hibernate configuration (cfg.xml) files, and from these you can code generate
+ a series of various artifacts, there is even support for completely reverse engineer an
+ existing database schema and use the code generation to generate POJO source files and
+ Hibernate mapping files.</para>
- <para><emphasis role="bold">Eclipse JDT integration</emphasis>: Hibernate
- Tools integrates into the Java code completion and build support of Java
- in Eclipse. This gives you codecompletion of HQL inside Java code plus
- Hibernate Tools will add problem markers if your queries are not valid
- against the console configuration associated with the project.</para>
+ <para><emphasis role="bold">Eclipse JDT integration</emphasis>: Hibernate Tools integrates into
+ the Java code completion and build support of Java in Eclipse. This gives you codecompletion
+ of HQL inside Java code plus <property>Hibernate Tools</property> will add problem markers if
+ your queries are not valid against the console configuration associated with the project.</para>
<para>Please note that these tools do not try to hide any functionality of
- Hibernate. The tools make working with Hibernate easier, but you are still
- encouraged/required to read the documentation for Hibernate to fully
- utilize Hibernate Tools and especially Hibernate it self.</para>
+ <property>Hibernate</property>. The tools make working with <property>Hibernate</property>
+ easier, but you are still encouraged/required to read the documentation for Hibernate to fully
+ utilize <property>Hibernate Tools</property> and especially <property>Hibernate</property> it
+ self.</para>
</section>
<section>
<title>Creating a Hibernate configuration file</title>
- <para>To be able to reverse engineer, prototype queries, and of course to
- simply use Hibernate Core a hibernate.properties or hibernate.cfg.xml file
- is needed. The Hibernate Tools provide a wizard for generating the
- hibernate.cfg.xml file if you do not already have such file.</para>
+ <para>To be able to reverse engineer, prototype queries, and of course to simply use
+ <property>Hibernate Core</property> a <emphasis>
+ <property>hibernate.properties</property>
+ </emphasis> or <emphasis>
+ <property>hibernate.cfg.xml</property>
+ </emphasis> file is needed. The <property>Hibernate Tools</property> provide a wizard for
+ generating the <emphasis>
+ <property>hibernate.cfg.xml</property>
+ </emphasis> file if you do not already have such file.</para>
- <para>Start the wizard by clicking "New Wizard" (Ctrl+N), select the
- Hibernate/Hibernate Configuration file (cfg.xml) wizard and press "Next".
- After selecting the wanted location for the hibernate.cfg.xml file, you
- will see the following page:</para>
+ <para>Start the wizard by clicking <emphasis>
+ <property>New Wizard</property>
+ </emphasis> (Ctrl+N), select the Hibernate/Hibernate Configuration file (cfg.xml) wizard and
+ press <emphasis>
+ <property>Next</property>
+ </emphasis>. After selecting the wanted location for the <emphasis>
+ <property>hibernate.cfg.xml</property>
+ </emphasis> file, you will see the following page:</para>
- <mediaobject>
- <imageobject role="fo">
- <imagedata contentwidth="5cm" fileref="images/hibernatecfgwizard.png"
- format="PNG" />
- </imageobject>
+ <figure>
+ <title>Hibernate Configuration File Wizard</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata contentwidth="5cm" fileref="images/hibernatecfgwizard.png" format="PNG"/>
+ </imageobject>
- <imageobject role="html">
- <imagedata align="center"
- fileref="images/hibernatecfgwizard.png"
- format="PNG" />
- </imageobject>
- </mediaobject>
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/hibernatecfgwizard.png" format="PNG"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
- <para>Tip: The contents in the combo boxes for the JDBC driver class and
- JDBC URL change automatically, depending on the Dialect and actual driver
- you have chosen.</para>
+ <note>
+ <para>The contents in the combo boxes for the JDBC driver class and JDBC URL change
+ automatically, depending on the Dialect and actual driver you have chosen.</para>
+ </note>
- <para>Enter your configuration information in this dialog. Details about
- the configuration options can be found in Hibernate reference
- documentation.</para>
+ <para>Enter your configuration information in this dialog. Details about the configuration
+ options can be found in <property>Hibernate</property> reference documentation.</para>
- <para>Press "Finish" to create the configuration file, after optionally
- creating a Console onfiguration, the hibernate.cfg.xml will be
- automatically opened in an editor. The last option "Create Console
- Configuration" is enabled by default and when enabled i will automatically
- use the hibernate.cfg.xml for the basis of a "Console
- Configuration"</para>
+ <para>Press <emphasis>
+ <property>Finish</property>
+ </emphasis> to create the configuration file, after optionally creating a Console
+ onfiguration, the <emphasis>
+ <property>hibernate.cfg.xml</property>
+ </emphasis> will be automatically opened in an editor. The last option <emphasis>
+ <property>Create Console Configuration</property>
+ </emphasis> is enabled by default and when enabled i will automatically use the <emphasis>
+ <property>hibernate.cfg.xml</property>
+ </emphasis> for the basis of a Console Configuration.</para>
</section>
<section>
<title>Creating a Hibernate Console configuration</title>
- <para>A Console Configuration describes to the Hibernate plugin how it
- should configure Hibernate and what configuration files, including which
- classpath is needed to load the POJO's, JDBC drivers etc. It is required
- to make usage of query prototyping, reverse engineering and code
- generation. You can have multiple named console configurations. Normally
- you would just need one per project, but more is definitly
- possible.</para>
+ <para>A Console Configuration describes to the <property>Hibernate</property> plugin how it
+ should configure <property>Hibernate</property> and what configuration files, including which
+ classpath is needed to load the POJO's, JDBC drivers etc. It is required to make usage of
+ query prototyping, reverse engineering and code generation. You can have multiple named
+ console configurations. Normally you would just need one per project, but more is definitly
+ possible.</para>
- <para>You create a console configuration by running the Console
- Configuration wizard, shown in the following screenshot. The same wizard
- will also be used if you are coming from the hibernate.cfg.xml wizard and
- had enabled "Create Console Configuration".</para>
+ <para>You create a console configuration by running the Console Configuration wizard, shown in
+ the following screenshot. The same wizard will also be used if you are coming from the <emphasis>
+ <property>hibernate.cfg.xml</property>
+ </emphasis> wizard and had enabled <emphasis>
+ <property>Create Console Configuration</property>
+ </emphasis>.</para>
- <para>Tip: the wizard will look at the current selection in the IDE and
- try and auto-detect the settings which you then can just approve or modify
- to suit your needs.</para>
+ <note>
+ <para>The wizard will look at the current selection in the IDE and try and auto-detect the
+ settings which you then can just approve or modify to suit your needs.</para>
+ </note>
+ <para/>
- <para></para>
+ <figure>
+ <title> Creating Hibernate Console Configuration</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/consolecfgwizard.png" format="PNG"/>
+ </imageobject>
- <mediaobject>
- <imageobject role="fo">
- <imagedata fileref="images/consolecfgwizard.png" format="PNG" />
- </imageobject>
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/consolecfgwizard.png" format="PNG"/>
+ </imageobject>
+ </mediaobject>
- <imageobject role="html">
- <imagedata align="center"
- fileref="images/consolecfgwizard.png"
- format="PNG" />
- </imageobject>
+ </figure>
- <caption>Creating a Hibernate Console configuration</caption>
- </mediaobject>
+ <para>The dialog consists of three tabs, <emphasis>
+ <property>General</property>
+ </emphasis> for the basic/required settings, <emphasis>
+ <property>Classpath</property>
+ </emphasis> for classpath and <emphasis>
+ <property>Mappings</property>
+ </emphasis> for additional mappings. The two latter ones is normally not required if you
+ specify a project and it has <emphasis>
+ <property>
+ <literal> /hibernate.cfg.xml </literal>
+ </property>
+ </emphasis> or <emphasis>
+ <property>
+ <literal>/META-INF/persistence.xml</literal>
+ </property>
+ </emphasis> in its project classpath.</para>
- <para>The dialog consists of three tabs, "General" for the basic/required
- settings, "Classpath" for classpath and "Mappings" for additional
- mappings. The two latter ones is normally not required if you specify a
- project and it has <literal> /hibernate.cfg.xml </literal>or
- <literal>/META-INF/persistence.xml</literal> in its project
- classpath.</para>
+ <para>The following table describes the available settings. The wizard can automatically detect
+ default values for most of these if you started the Wizard with the relevant java project or
+ resource selected</para>
- <para>The following table describes the available settings. The wizard can
- automatically detect default values for most of these if you started the
- Wizard with the relevant java project or resource selected</para>
-
<table>
<title>Hibernate Console Configuration Parameters</title>
<tgroup cols="3">
- <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="1" colwidth="1*"/>
- <colspec colnum="2" colwidth="3*" />
+ <colspec colnum="2" colwidth="3*"/>
- <colspec colnum="3" colwidth="1*" />
+ <colspec colnum="3" colwidth="1*"/>
<thead>
<row>
- <entry align="center"><para>Parameter</para></entry>
+ <entry align="center">
+ <para>Parameter</para>
+ </entry>
- <entry align="center"><para>Description</para></entry>
+ <entry align="center">
+ <para>Description</para>
+ </entry>
- <entry align="center"><para>Auto detected value</para></entry>
+ <entry align="center">
+ <para>Auto detected value</para>
+ </entry>
</row>
</thead>
<tbody>
<row>
- <entry><para>Name</para></entry>
+ <entry>
+ <para>Name</para>
+ </entry>
- <entry><para>The unique name of the console
- configuration</para></entry>
+ <entry>
+ <para>The unique name of the console configuration</para>
+ </entry>
- <entry><para>Name of the selected project</para></entry>
+ <entry>
+ <para>Name of the selected project</para>
+ </entry>
</row>
<row>
- <entry>Project</entry>
+ <entry>
+ <para>Project</para>
+ </entry>
- <entry>The name of a java project which classpath should be used
- in the console configuration</entry>
+ <entry>
+ <para>The name of a java project which classpath should be used in the console
+ configuration</para>
+ </entry>
- <entry>Name of the selected project</entry>
+ <entry>
+ <para>Name of the selected project</para>
+ </entry>
</row>
<row>
- <entry>Type</entry>
+ <entry>
+ <para>Type</para>
+ </entry>
- <entry>Choose between "Core", "Annotations" and "JPA". Note that
- the two latter requires running Eclipse IDE with a JDK 5 runtime,
- otherwise you will get classloading and/or version errors.</entry>
+ <entry>
+ <para>Choose between "Core", "Annotations" and
+ "JPA". Note that the two latter requires running Eclipse IDE with
+ a JDK 5 runtime, otherwise you will get classloading and/or version errors.</para>
+ </entry>
- <entry>No default value</entry>
+ <entry>
+ <para>No default value</para>
+ </entry>
</row>
<row>
- <entry><para>Property file</para></entry>
+ <entry>
+ <para>Property file</para>
+ </entry>
- <entry><para>Path to a hibernate.properties file</para></entry>
+ <entry>
+ <para>Path to a hibernate.properties file</para>
+ </entry>
- <entry><para>First hibernate.properties file found in the selected
- project</para></entry>
+ <entry>
+ <para>First hibernate.properties file found in the selected project</para>
+ </entry>
</row>
<row>
- <entry><para>Configuration file</para></entry>
+ <entry>
+ <para>Configuration file</para>
+ </entry>
- <entry><para>Path to a hibernate.cfg.xml file</para></entry>
+ <entry>
+ <para>Path to a hibernate.cfg.xml file</para>
+ </entry>
- <entry><para>First hibernate.cfg.xml file found in the selected
- project</para></entry>
+ <entry>
+ <para>First hibernate.cfg.xml file found in the selected project</para>
+ </entry>
</row>
<row>
- <entry>Persistence unit</entry>
+ <entry>
+ <para>Persistence unit</para>
+ </entry>
- <entry>Name of the persistence unit to use</entry>
+ <entry>
+ <para>Name of the persistence unit to use</para>
+ </entry>
- <entry>No default value (lets Hibernate Entity Manager find the
- persistence unit)</entry>
+ <entry>
+ <para>No default value (lets Hibernate Entity Manager find the persistence
+ unit)</para>
+ </entry>
</row>
<row>
- <entry>Naming strategy</entry>
+ <entry>
+ <para>Naming strategy</para>
+ </entry>
- <entry>Fully qualified classname of a custom NamingStrategy. Only
- required if you use a special naming strategy.</entry>
+ <entry>
+ <para>Fully qualified classname of a custom NamingStrategy. Only required if you use a
+ special naming strategy.</para>
+ </entry>
- <entry>No default value</entry>
+ <entry>
+ <para>No default value</para>
+ </entry>
</row>
<row>
- <entry><para>Entity resolver</para></entry>
+ <entry>
+ <para>Entity resolver</para>
+ </entry>
- <entry><para>Fully qualified classname of a custom EntityResolver.
- Only required if you have special xml entity includes in your
- mapping files.</para></entry>
+ <entry>
+ <para>Fully qualified classname of a custom EntityResolver. Only required if you have
+ special xml entity includes in your mapping files.</para>
+ </entry>
- <entry><para>No default value</para></entry>
+ <entry>
+ <para>No default value</para>
+ </entry>
</row>
</tbody>
</tgroup>
</table>
- <mediaobject>
- <imageobject role="fo">
- <imagedata align="center" fileref="images/consolecfgclasspath.png"
- format="PNG" />
- </imageobject>
+ <figure>
+ <title>Specifying Classpath in Hibernate Console Configuration</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/consolecfgclasspath.png" format="PNG"/>
+ </imageobject>
- <imageobject role="html">
- <imagedata align="center"
- fileref="images/consolecfgclasspath.png"
- format="PNG" />
- </imageobject>
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/consolecfgclasspath.png" format="PNG"/>
+ </imageobject>
- <caption>Specifying classpath in a Hibernate Console
- configuration</caption>
- </mediaobject>
+ </mediaobject>
+ </figure>
- <para><table>
+ <para>
+ <table>
<title>Hibernate Console Configuration Classpath</title>
<tgroup cols="3">
- <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="1" colwidth="1*"/>
- <colspec colnum="2" colwidth="3*" />
+ <colspec colnum="2" colwidth="3*"/>
- <colspec colnum="3" colwidth="1*" />
+ <colspec colnum="3" colwidth="1*"/>
<thead>
<row>
- <entry align="center"><para>Parameter</para></entry>
+ <entry align="center">
+ <para>Parameter</para>
+ </entry>
- <entry align="center"><para>Description</para></entry>
+ <entry align="center">
+ <para>Description</para>
+ </entry>
- <entry align="center"><para>Auto detected value</para></entry>
+ <entry align="center">
+ <para>Auto detected value</para>
+ </entry>
</row>
</thead>
<tbody>
<row>
- <entry><para>Classpath</para></entry>
+ <entry>
+ <para>Classpath</para>
+ </entry>
- <entry><para>The classpath for loading POJO and JDBC drivers;
- only needed if the default classpath of the Project does not
- contain the required classes. Do not add Hibernate core
- libraries or dependencies, they are already included. If you get
- ClassNotFound errors then check this list for possible missing
- or redundant directories/jars.</para></entry>
+ <entry>
+ <para>The classpath for loading POJO and JDBC drivers; only needed if the default
+ classpath of the Project does not contain the required classes. Do not add
+ Hibernate core libraries or dependencies, they are already included. If you get
+ ClassNotFound errors then check this list for possible missing or redundant
+ directories/jars.</para>
+ </entry>
- <entry><para>empty</para></entry>
+ <entry>
+ <para>empty</para>
+ </entry>
</row>
<row>
- <entry><para>Include default classpath from
- project</para></entry>
+ <entry>
+ <para>Include default classpath from project</para>
+ </entry>
- <entry><para>When enabled the project classpath will be appended
- to the classpath specified above.</para></entry>
+ <entry>
+ <para>When enabled the project classpath will be appended to the classpath specified
+ above.</para>
+ </entry>
- <entry><para>Enabled</para></entry>
+ <entry>
+ <para>Enabled</para>
+ </entry>
</row>
</tbody>
</tgroup>
- </table></para>
+ </table>
+ </para>
- <para><mediaobject>
- <imageobject role="fo">
- <imagedata align="center" fileref="images/consolecfgmappings.png"
- format="PNG" />
- </imageobject>
+ <para>
+ <figure>
+ <title>Specifying additional Mappings in Hibernate Console Configuration</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/consolecfgmappings.png" format="PNG"/>
+ </imageobject>
- <imageobject role="html">
- <imagedata align="center"
- fileref="images/consolecfgmappings.png"
- format="PNG" />
- </imageobject>
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/consolecfgmappings.png" format="PNG"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
- <caption>Specifying additional mappings in a Hibernate console
- configuration</caption>
- </mediaobject><table>
+
+ <table>
<title>Hibernate Console Configuration Mappings</title>
<tgroup cols="3">
- <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="1" colwidth="1*"/>
- <colspec colnum="2" colwidth="3*" />
+ <colspec colnum="2" colwidth="3*"/>
- <colspec colnum="3" colwidth="1*" />
+ <colspec colnum="3" colwidth="1*"/>
<thead>
<row>
- <entry align="center"><para>Parameter</para></entry>
+ <entry align="center">
+ <para>Parameter</para>
+ </entry>
- <entry align="center"><para>Description</para></entry>
+ <entry align="center">
+ <para>Description</para>
+ </entry>
- <entry align="center"><para>Auto detected value</para></entry>
+ <entry align="center">
+ <para>Auto detected value</para>
+ </entry>
</row>
</thead>
<tbody>
<row>
- <entry><para>Mapping files </para></entry>
+ <entry>
+ <para>Mapping files </para>
+ </entry>
- <entry><para>List of additional mapping files that should be
- loaded. Note: A hibernate.cfg.xml or persistence.xml can also
- contain mappings. Thus if these are duplicated here, you will
- get "Duplicate mapping" errors when using the console
- configuration.</para></entry>
+ <entry>
+ <para>List of additional mapping files that should be loaded. Note: A
+ hibernate.cfg.xml or persistence.xml can also contain mappings. Thus if these are
+ duplicated here, you will get "Duplicate mapping" errors when using the console
+ configuration.</para>
+ </entry>
- <entry><para>empty</para></entry>
+ <entry>
+ <para>empty</para>
+ </entry>
</row>
</tbody>
</tgroup>
- </table></para>
+ </table>
+ </para>
- <para>Clicking "Finish" creates the configuration and shows it in the
- "Hibernate Configurations" view</para>
+ <para>Clicking <emphasis>
+ <property>Finish</property>
+ </emphasis> creates the configuration and shows it in the <emphasis>
+ <property>Hibernate Configurations</property>
+ </emphasis> view</para>
- <mediaobject>
- <imageobject role="fo">
- <imagedata align="center"
- fileref="images/consoleoutline-before-reveng.png"
- format="PNG" />
- </imageobject>
+ <figure>
+ <title>Console Overview</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/consoleoutline-before-reveng.png" format="PNG"/>
+ </imageobject>
- <imageobject role="html">
- <imagedata align="center"
- fileref="images/consoleoutline-before-reveng.png"
- format="PNG" />
- </imageobject>
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/consoleoutline-before-reveng.png" format="PNG"/>
+ </imageobject>
- <caption>Console overview</caption>
- </mediaobject>
+ </mediaobject>
+ </figure>
+
</section>
<section>
<title>Reverse engineering and code generation</title>
- <para>A "click-and-generate" reverse engineering and code generation
- facility is available. This facility allows you to generate a range of
- artifacts based on database or an already existing Hibernate
- configuration, be that mapping files or annotated classes. Some of these
- are POJO Java source file, Hibernate *.hbm.xml, hibernate.cfg.xml
- generation and schema documentation.</para>
+ <para>A "click-and-generate" reverse engineering and code generation facility is available. This
+ facility allows you to generate a range of artifacts based on database or an already existing
+ Hibernate configuration, be that mapping files or annotated classes. Some of these are POJO
+ Java source file, Hibernate <emphasis>
+ <property>*.hbm.xml</property></emphasis>, <emphasis>
+ <property>hibernate.cfg.xml</property></emphasis> generation and schema documentation.</para>
- <para>To start working with this process, start the "Hibernate Code
- Generation" which is available in the toolbar via the Hibernate icon or
- via the "Run/Hibernate Code Generation" menu item.</para>
+ <para>To start working with this process, start the <property>Hibernate Code
+ Generation</property> which is available in the toolbar via the <property>Hibernate</property>
+ icon or via the <emphasis>
+ <property>Run > Hibernate Code Generation</property>
+ </emphasis> menu item.</para>
<section>
<title>Code Generation Launcher</title>
- <para>When you click on "Hibernate Code Generation" the standard Eclipse
- launcher dialog will appear. In this dialog you can create, edit and
- delete named Hibernate code generation "launchers".</para>
+ <para>When you click on <emphasis>
+ <property>Hibernate Code Generation...</property>
+ </emphasis> the standard Eclipse launcher dialog will appear. In this dialog you can create,
+ edit and delete named Hibernate code generation "launchers".</para>
- <mediaobject>
- <imageobject role="fo">
- <imagedata fileref="images/codegendropdown.gif" format="GIF" />
- </imageobject>
+ <figure>
+ <title>Getting Hibernate Code Generation Wizard</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/codegendropdown.gif" format="GIF"/>
+ </imageobject>
- <imageobject role="html">
- <imagedata align="center"
- fileref="images/codegendropdown.gif"
- format="GIF" />
- </imageobject>
- </mediaobject>
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/codegendropdown.gif" format="GIF"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
- <para></para>
+ <para/>
- <mediaobject>
- <imageobject role="fo">
- <imagedata fileref="images/codegenmaintab.png" format="PNG" />
- </imageobject>
+ <figure>
+ <title>Hibernate Code Generation Wizard</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/codegenmaintab.png" format="PNG"/>
+ </imageobject>
- <imageobject role="html">
- <imagedata align="center"
- fileref="images/codegenmaintab.png"
- format="PNG" />
- </imageobject>
- </mediaobject>
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/codegenmaintab.png" format="PNG"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
- <para>The first time you create a code generation launcher you should
- give it a meaningfull name, otherwise the default prefix
- "New_Generation" will be used.</para>
+ <para>The first time you create a code generation launcher you should give it a meaningfull
+ name, otherwise the default prefix <emphasis>
+ <property>New_Generation</property>
+ </emphasis> will be used.</para>
- <para>Note: The "At least one exporter option must be selected" is just
- a warning stating that for this launch to work you need to select an
- exporter on the Exporter tab. When an exporter has been selected the
- warning will disappear.</para>
+ <note>
+ <para>The "At least one exporter option must be selected" is just a
+ warning stating that for this launch to work you need to select an exporter on the
+ Exporter tab. When an exporter has been selected the warning will disappear.</para>
+ </note>
- <para>The dialog also have the standard tabs "Refresh" and "Common" that
- can be used to configure which directories should be automatically
- refreshed and various general settings launchers, such as saving them in
- a project for sharing the launcher within a team.</para>
+ <para>The dialog also have the standard tabs <emphasis>
+ <property>Refresh</property>
+ </emphasis> and <emphasis>
+ <property>Common</property>
+ </emphasis> that can be used to configure which directories should be automatically
+ refreshed and various general settings launchers, such as saving them in a project for
+ sharing the launcher within a team.</para>
- <para>On the "Main" tab you see the following fields:</para>
+ <para>On the <emphasis>
+ <property>Main</property>
+ </emphasis> tab you see the following fields:</para>
<table>
<title>Code generation "Main" tab fields</title>
<tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="1" colwidth="1*"/>
- <colspec colnum="2" colwidth="3*" />
+ <colspec colnum="2" colwidth="3*"/>
- <colspec colnum="3" colwidth="0.5*" />
+ <colspec colnum="3" colwidth="0.5*"/>
<thead>
<row>
- <entry align="center"><para>Field</para></entry>
+ <entry align="center">
+ <para>Field</para>
+ </entry>
- <entry align="center"><para>Description</para></entry>
+ <entry align="center">
+ <para>Description</para>
+ </entry>
</row>
</thead>
<tbody>
<row>
- <entry><para>Console Configuration</para></entry>
+ <entry>
+ <para>Console Configuration</para>
+ </entry>
- <entry><para>The name of the console configuration which should
- be used when code generating.</para></entry>
+ <entry>
+ <para>The name of the console configuration which should be used when code
+ generating.</para>
+ </entry>
</row>
<row>
- <entry><para>Output directory</para></entry>
+ <entry>
+ <para>Output directory</para>
+ </entry>
- <entry><para>Path to a directory into where all output will be
- written by default. Be aware that existing files will be
- overwritten, so be sure to specify the correct
- directory.</para></entry>
+ <entry>
+ <para>Path to a directory into where all output will be written by default. Be aware
+ that existing files will be overwritten, so be sure to specify the correct
+ directory.</para>
+ </entry>
</row>
<row>
- <entry><para>Reverse engineer from JDBC
- Connection</para></entry>
+ <entry>
+ <para>Reverse engineer from JDBC Connection</para>
+ </entry>
- <entry><para>If enabled the tools will reverse engineer the
- database available via the connection information in the
- selected Hibernate Console Configuration and generate code based
- on the database schema. If not enabled the code generation will
- just be based on the mappings already specified in the Hibernate
- Console configuration.</para></entry>
+ <entry>
+ <para>If enabled the tools will reverse engineer the database available via the
+ connection information in the selected Hibernate Console Configuration and
+ generate code based on the database schema. If not enabled the code generation
+ will just be based on the mappings already specified in the Hibernate Console
+ configuration.</para>
+ </entry>
</row>
<row>
- <entry><para>Package</para></entry>
+ <entry>
+ <para>Package</para>
+ </entry>
- <entry><para>The package name here is used as the default
- package name for any entities found when reverse
- engineering.</para></entry>
+ <entry>
+ <para>The package name here is used as the default package name for any entities
+ found when reverse engineering.</para>
+ </entry>
</row>
<row>
- <entry><para>reveng.xml</para></entry>
+ <entry>
+ <para>reveng.xml</para>
+ </entry>
- <entry><para>Path to a reveng.xml file. A reveng.xml file allows
- you to control certain aspects of the reverse engineering. e.g.
- how jdbc types are mapped to hibernate types and especially
- important which tables are included/excluded from the process.
- Clicking "setup" allows you to select an existing reveng.xml
- file or create a new one. See more details about the reveng.xml
- file in <xref linkend="reverseengineering" />.</para></entry>
+ <entry>
+ <para>Path to a reveng.xml file. A reveng.xml file allows you to control certain
+ aspects of the reverse engineering. e.g. how jdbc types are mapped to hibernate
+ types and especially important which tables are included/excluded from the
+ process. Clicking "setup" allows you to select an existing reveng.xml file or
+ create a new one. See more details about the reveng.xml file in <xref
+ linkend="reverseengineering"/>.</para>
+ </entry>
</row>
<row>
- <entry><para>reveng. strategy</para></entry>
+ <entry>
+ <para>reveng. strategy</para>
+ </entry>
- <entry><para>If reveng.xml does not provide enough customization
- you can provide your own implementation of an
- ReverseEngineeringStrategy. The class need to be in the claspath
- of the Console Configuration, otherwise you will get class not
- found exceptions. See <xref linkend="custom-reveng-strategy" />
- for details and an example of a custom strategy.</para></entry>
+ <entry>
+ <para>If reveng.xml does not provide enough customization you can provide your own
+ implementation of an ReverseEngineeringStrategy. The class need to be in the
+ claspath of the Console Configuration, otherwise you will get class not found
+ exceptions. See <xref linkend="custom-reveng-strategy"/> for details and an
+ example of a custom strategy.</para>
+ </entry>
</row>
<row>
- <entry><para>Generate basic typed composite ids</para></entry>
+ <entry>
+ <para>Generate basic typed composite ids</para>
+ </entry>
- <entry><para>A table that has a multi-colum primary key a
- <composite-id> mapping will always be created. If this
- option is enabled and there are matching foreign-keys each key
- column is still considered a 'basic' scalar (string, long, etc.)
- instead of a reference to an entity. If you disable this option
- a <key-many-to-one> instead. Note: a <many-to-one>
- property is still created, but is simply marked as non-updatable
- and non-insertable.</para></entry>
+ <entry>
+ <para>A table that has a multi-colum primary key a <composite-id>
+ mapping will always be created. If this option is enabled and there are matching
+ foreign-keys each key column is still considered a 'basic' scalar (string, long,
+ etc.) instead of a reference to an entity. If you disable this option a
+ <key-many-to-one> instead. Note: a <many-to-one>
+ property is still created, but is simply marked as non-updatable and
+ non-insertable.</para>
+ </entry>
</row>
<row>
<entry>Detect optimistic lock columns</entry>
- <entry>Automatically detect optimistic lock columns.
- Controllable via reveng. strategy; the current default is to use
- columns named VERSION or TIMESTAMP.</entry>
+ <entry>Automatically detect optimistic lock columns. Controllable via reveng.
+ strategy; the current default is to use columns named VERSION or TIMESTAMP.</entry>
</row>
<row>
<entry>Detect many-to-many tables</entry>
- <entry>Automatically detect many-to-many tables. Controllable
- via reveng. strategy.</entry>
+ <entry>Automatically detect many-to-many tables. Controllable via reveng.
+ strategy.</entry>
</row>
<row>
- <entry><para>Use custom templates</para></entry>
+ <entry>
+ <para>Use custom templates</para>
+ </entry>
- <entry><para>If enabled, the Template directory will be searched
- first when looking up the templates, allowing you to redefine
- how the individual templates process the hibernate mapping
- model.</para></entry>
+ <entry>
+ <para>If enabled, the Template directory will be searched first when looking up the
+ templates, allowing you to redefine how the individual templates process the
+ hibernate mapping model.</para>
+ </entry>
</row>
<row>
- <entry><para>Template directory</para></entry>
+ <entry>
+ <para>Template directory</para>
+ </entry>
- <entry><para>A path to a directory with custom
- templates.</para></entry>
+ <entry>
+ <para>A path to a directory with custom templates.</para>
+ </entry>
</row>
</tbody>
</tgroup>
@@ -555,414 +698,525 @@
<section>
<title>Exporters</title>
- <para>The exporters tab is used to specify which type of code that
- should be generated. Each selection represents an "Exporter" that are
- responsible for generating the code, hence the name.</para>
+ <para>The <emphasis>
+ <property>Exporters</property>
+ </emphasis> tab is used to specify which type of code that should be generated. Each
+ selection represents an Exporter that are responsible for generating the code, hence the
+ name.</para>
- <mediaobject>
- <imageobject role="fo">
- <imagedata fileref="images/codegenexporters.png" format="PNG" />
- </imageobject>
+ <figure>
+ <title>Selecting Exporters</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/codegenexporters.png" format="PNG"/>
+ </imageobject>
- <imageobject role="html">
- <imagedata align="center"
- fileref="images/codegenexporters.png"
- format="PNG" />
- </imageobject>
- </mediaobject>
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/codegenexporters.png" format="PNG"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
- <para>The following table describes in short the various
- exporters. Remember you can Add and Remove any exporters depending on your needs.</para>
+ <para>The following table describes in short the various exporters. Remember you can
+ add/remove any Exporters depending on your needs.</para>
<table>
<title>Code generation "Exporter" tab fields</title>
<tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="1" colwidth="1*"/>
- <colspec colnum="2" colwidth="3*" />
+ <colspec colnum="2" colwidth="3*"/>
<thead>
<row>
- <entry align="center"><para>Field</para></entry>
+ <entry align="center">
+ <para>Field</para>
+ </entry>
- <entry align="center"><para>Description</para></entry>
+ <entry align="center">
+ <para>Description</para>
+ </entry>
</row>
</thead>
<tbody>
<row>
- <entry><para>Domain code</para></entry>
+ <entry>
+ <para>Domain code</para>
+ </entry>
- <entry><para>Generates POJO's for all the persistent classes and
- components found in the given Hibernate
- configuration.</para></entry>
+ <entry>
+ <para>Generates POJO's for all the persistent classes and components found in the
+ given Hibernate configuration.</para>
+ </entry>
</row>
<row>
- <entry><para>DAO code</para></entry>
+ <entry>
+ <para>DAO code</para>
+ </entry>
- <entry><para>Generates a set of DAO's for each entity
- found.</para></entry>
+ <entry>
+ <para>Generates a set of DAO's for each entity found.</para>
+ </entry>
</row>
<row>
- <entry><para>Hibernate XML Mappings</para></entry>
+ <entry>
+ <para>Hibernate XML Mappings</para>
+ </entry>
- <entry><para>Generate mapping (hbm.xml) files for each
- entity</para></entry>
+ <entry>
+ <para>Generate mapping (hbm.xml) files for each entity</para>
+ </entry>
</row>
<row>
- <entry><para>Hibernate XML Configuration</para></entry>
+ <entry>
+ <para>Hibernate XML Configuration</para>
+ </entry>
- <entry><para>Generate a hibernate.cfg.xml file. Used to keep the
- hibernate.cfg.xml uptodate with any new found mapping
- files.</para></entry>
+ <entry>
+ <para>Generate a hibernate.cfg.xml file. Used to keep the hibernate.cfg.xml uptodate
+ with any new found mapping files.</para>
+ </entry>
</row>
<row>
- <entry><para>Schema Documentation (.html)</para></entry>
+ <entry>
+ <para>Schema Documentation (.html)</para>
+ </entry>
- <entry><para>Generates set of html pages that documents the
- database schema and some of the mappings.</para></entry>
+ <entry>
+ <para>Generates set of html pages that documents the database schema and some of the
+ mappings.</para>
+ </entry>
</row>
<row>
- <entry><para>Generic Exporter (hbmtemplate)</para></entry>
+ <entry>
+ <para>Generic Exporter (hbmtemplate)</para>
+ </entry>
- <entry><para>Fully customizable exporter which can be used to perform custom generation.</para></entry>
+ <entry>
+ <para>Fully customizable exporter which can be used to perform custom
+ generation.</para>
+ </entry>
</row>
</tbody>
</tgroup>
</table>
- <para>Each exporter listens to certain properties and these can be setup
- in the "Properties" section where you can add/remove predefined or
- customer properties for each of the exporters. The following table lists
- the time of writing pre-defined properties:</para>
+ <para>Each Exporter listens to certain properties and these can be setup in the <emphasis>
+ <property>Properties</property>
+ </emphasis> section where you can add/remove predefined or customer properties for each of
+ the exporters. The following table lists the time of writing pre-defined properties:</para>
- <para><table>
+ <para>
+ <table>
<title>Exporter Properties</title>
<tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="1" colwidth="1*"/>
- <colspec colnum="2" colwidth="3*" />
+ <colspec colnum="2" colwidth="3*"/>
<thead>
<row>
- <entry align="center"><para>Name</para></entry>
+ <entry align="center">
+ <para>Name</para>
+ </entry>
- <entry align="center"><para>Description</para></entry>
+ <entry align="center">
+ <para>Description</para>
+ </entry>
</row>
</thead>
<tbody>
<row>
- <entry><para>jdk5</para></entry>
+ <entry>
+ <para>jdk5</para>
+ </entry>
- <entry><para>Generate Java 5 syntax</para></entry>
+ <entry>
+ <para>Generate Java 5 syntax</para>
+ </entry>
</row>
<row>
- <entry><para>ejb3</para></entry>
+ <entry>
+ <para>ejb3</para>
+ </entry>
- <entry><para>Generate EJB 3 annotations</para></entry>
+ <entry>
+ <para>Generate EJB 3 annotations</para>
+ </entry>
</row>
- <row>
- <entry><para>for_each</para></entry>
+ <row>
+ <entry>
+ <para>for_each</para>
+ </entry>
- <entry><para>Specifies which type of model elements the exporter should create a file and run through the templates. Possible values are: entity, component, configuration</para></entry>
+ <entry>
+ <para>Specifies which type of model elements the exporter should create a file and
+ run through the templates. Possible values are: entity, component,
+ configuration</para>
+ </entry>
</row>
<row>
- <entry><para>template_path</para></entry>
+ <entry>
+ <para>template_path</para>
+ </entry>
- <entry><para>Custom template directory for this specific exporter. You can use Eclipse variables.</para></entry>
+ <entry>
+ <para>Custom template directory for this specific exporter. You can use Eclipse
+ variables.</para>
+ </entry>
</row>
- <row>
- <entry><para>template_name</para></entry>
+ <row>
+ <entry>
+ <para>template_name</para>
+ </entry>
- <entry><para>Name for template relative to the template path</para></entry>
+ <entry>
+ <para>Name for template relative to the template path</para>
+ </entry>
</row>
<row>
- <entry><para>outputdir</para></entry>
+ <entry>
+ <para>outputdir</para>
+ </entry>
- <entry><para>Custom output directory for this specific exporter. You can use Eclipse variables.</para></entry>
+ <entry>
+ <para>Custom output directory for this specific exporter. You can use Eclipse
+ variables.</para>
+ </entry>
</row>
- <row>
- <entry><para>file_pattern</para></entry>
+ <row>
+ <entry>
+ <para>file_pattern</para>
+ </entry>
- <entry><para>Pattern to use for the generated files, relatively for the output dir. Example: {package-name}/{class-name}.java</para></entry>
+ <entry>
+ <para>Pattern to use for the generated files, relatively for the output dir.
+ Example: {package-name}/{class-name}.java</para>
+ </entry>
</row>
<row>
- <entry><para>dot.executable</para></entry>
+ <entry>
+ <para>dot.executable</para>
+ </entry>
- <entry><para>executable to run GraphViz (only relevant, but
- optional for Schema documentation)</para></entry>
+ <entry>
+ <para>executable to run GraphViz (only relevant, but optional for Schema
+ documentation)</para>
+ </entry>
</row>
</tbody>
</tgroup>
- </table></para>
+ </table>
+ </para>
</section>
</section>
<section>
<title>Hibernate Mapping and Configuration File Editor</title>
- <para>The Hibernate Mapping file editor provides XML editing functionality
- for the hbm.xml and cfg.xml files. The editor is based on the Eclipse WTP
- tools and extend its functionallity to provide hibernate specific code
- completion.</para>
+ <para>The Hibernate Mapping file editor provides XML editing functionality for the <emphasis>
+ <property>hbm.xml </property>
+ </emphasis> and <emphasis>
+ <property>cfg.xml</property>
+ </emphasis> files. The editor is based on the Eclipse WTP tools and extend its functionallity
+ to provide Hibernate specific code completion.</para>
- <mediaobject>
- <imageobject role="fo">
- <imagedata fileref="images/hbmxmlcompletion.gif" format="GIF" />
- </imageobject>
+ <figure>
+ <title>XML Editing Functionality</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/hbmxmlcompletion.gif" format="GIF"/>
+ </imageobject>
- <imageobject role="html">
- <imagedata align="center"
- fileref="images/hbmxmlcompletion.gif"
- format="GIF" />
- </imageobject>
- </mediaobject>
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/hbmxmlcompletion.gif" format="GIF"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
<section>
<title>Java property/class completion</title>
- <para>Package, class, and field completion is enabled for relevant XML
- attributes. The auto-completion detects it's context and limits the
- completion for e.g. <property> and only shows the
- properties/fields available in the enclosing <class>,
- <subclass> etc. It is also possible to navigate from the hbm.xml
- files to the relevant class/field in java code.</para>
+ <para>Package, class, and field completion is enabled for relevant XML attributes. The
+ auto-completion detects its context and limits the completion for e.g. <emphasis>
+ <property><property></property>
+ </emphasis> and only shows the properties/fields available in the enclosing <emphasis>
+ <property><class></property>
+ </emphasis>, <emphasis>
+ <property><subclass></property>
+ </emphasis> etc. It is also possible to navigate from the <emphasis>
+ <property>hbm.xml</property>
+ </emphasis> files to the relevant class/field in java code.</para>
- <para><mediaobject>
- <imageobject role="fo">
- <imagedata fileref="images/hbmxml-typecompletion.png" format="PNG" />
- </imageobject>
+ <figure>
+ <title>Navigation Functionallity</title>
+ <para>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/hbmxml-typecompletion.png" format="PNG"/>
+ </imageobject>
- <imageobject role="html">
- <imagedata align="center"
- fileref="images/hbmxml-typecompletion.png"
- format="PNG" />
- </imageobject>
- </mediaobject><mediaobject>
- <imageobject role="fo">
- <imagedata fileref="images/hbmxml-namecompletion.png" format="PNG" />
- </imageobject>
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/hbmxml-typecompletion.png" format="PNG"/>
+ </imageobject>
+ </mediaobject>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/hbmxml-namecompletion.png" format="PNG"/>
+ </imageobject>
- <imageobject role="html">
- <imagedata align="center"
- fileref="images/hbmxml-namecompletion.PNG"
- format="PNG" />
- </imageobject>
- </mediaobject></para>
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/hbmxml-namecompletion.PNG" format="PNG"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ </figure>
- <para>This is done via the standard hyperlink navigation functionallity
- in Eclipse; per default it is done by pressing F3 while the cursor is on
- a class/field or by pressing Ctrl and the mouse button to perform the
- same navigation.</para>
+ <para>This is done via the standard hyperlink navigation functionallity in Eclipse; per
+ default it is done by pressing F3 while the cursor is on a class/field or by pressing <emphasis>
+ <property>Ctrl</property>
+ </emphasis> and the mouse button to perform the same navigation.</para>
- <para>For java completion and navigation to work the file needs to
- reside inside an Eclipse Java project, otherwise no completion will
- occur. Note: java completion does not require a hibernate console
- configuration to be used.</para>
+ <para>For java completion and navigation to work the file needs to reside inside an Eclipse
+ Java project, otherwise no completion will occur.</para>
+ <note>
+ <para>Java completion does not require a Hibernate console configuration to be used.</para>
+ </note>
</section>
<section>
<title>Table/Column completion</title>
- <para>Table and column completion is also available for all table and
- column attributes. <mediaobject>
+ <para>Table and column completion is also available for all table and column attributes. </para>
+
+ <figure>
+ <title>Table and Column Completion</title>
+ <mediaobject>
<imageobject role="fo">
- <imagedata fileref="images/hbmxml-tablecompletion.png"
- format="PNG" />
+ <imagedata fileref="images/hbmxml-tablecompletion.png" format="PNG"/>
</imageobject>
<imageobject role="html">
- <imagedata align="center"
- fileref="images/hbmxml-tablecompletion.png"
- format="PNG" />
+ <imagedata align="center" fileref="images/hbmxml-tablecompletion.png" format="PNG"/>
</imageobject>
- </mediaobject></para>
+ </mediaobject>
+ </figure>
- <para>Note that it requires a proper configured hibernate console
- configuration and this configuration should be the default for the
- project where the hbm.xml resides.</para>
+ <para>Note that it requires a proper configured hibernate console configuration and this
+ configuration should be the default for the project where the <emphasis>
+ <property>hbm.xml</property>
+ </emphasis> resides.</para>
- <para>You can check which console configuration is selected under the
- Properties of a project and look under the "Hibernate Settings" page.
- When a proper configuration is selected it will be used to fetch the
- table/column names in the background.</para>
+ <para>You can check which console configuration is selected under the Properties of a project
+ and look under the <emphasis>
+ <property>Hibernate Settings</property>
+ </emphasis> page. When a proper configuration is selected it will be used to fetch the
+ table/column names in the background.</para>
- <para>Note: Currently it is not recommended to use this feature on large
- databases since it does not fetch the information iteratively. It will
- be improved in future versions.</para>
+ <note>
+ <para>Currently it is not recommended to use this feature on large databases since it does
+ not fetch the information iteratively. It will be improved in future versions.</para>
+ </note>
</section>
<section>
<title>Configuration property completion</title>
- <para>In cfg.xml code completion for the value of <property> name
- attributes is available.</para>
+ <para>In <emphasis>
+ <property>cfg.xml</property>
+ </emphasis> code completion for the value of <emphasis>
+ <property><property></property>
+ </emphasis> name attributes is available.</para>
- <para><mediaobject>
+
+ <figure>
+ <title>Property Completion</title>
+ <mediaobject>
<imageobject role="fo">
- <imagedata fileref="images/cfgxml-propertycomplete.png"
- format="PNG" />
+ <imagedata fileref="images/cfgxml-propertycomplete.png" format="PNG"/>
</imageobject>
<imageobject role="html">
- <imagedata align="center"
- fileref="images/cfgxml-propertycomplete.png"
- format="PNG" />
+ <imagedata align="center" fileref="images/cfgxml-propertycomplete.png" format="PNG"/>
</imageobject>
- </mediaobject></para>
+ </mediaobject>
+ </figure>
+
</section>
</section>
<section>
<title>Reveng.xml editor</title>
- <para>A reveng.xml file is used to customize and control how reverse
- engineering is performed by the tools. The plugins provide and editor to
- ease the editing of this file and hence used to configure the reverse
- engineering process.</para>
+ <para>A <emphasis>
+ <property>reveng.xml</property></emphasis>
+ file is used to customize and control how reverse engineering is performed by
+ the tools. The plugins provide and editor to ease the editing of this file and hence used to
+ configure the reverse engineering process.</para>
- <para>The editor is intended to allow easy definition of type mappings,
- table include/excludes and specific override settings for columns, e.g.
- define a explicit name for a column when the default naming rules is not
- applicable.</para>
+ <para>The editor is intended to allow easy definition of type mappings, table include/excludes
+ and specific override settings for columns, e.g. define a explicit name for a column when the
+ default naming rules is not applicable.</para>
- <para>Note that not all the features of the .reveng.xml file is exposed or
- fully implemented in the editor, but the main functionallity is there. To
- understand the full flexibility of the reveng.xml, please see <xref
- linkend="hibernaterevengxmlfile" /></para>
+ <para>Note that not all the features of the <emphasis>
+ <property>.reveng.xml</property></emphasis> file is exposed or fully implemented in
+ the editor, but the main functionallity is there. To understand the full flexibility of the
+ <emphasis>
+ <property>reveng.xml</property></emphasis>, please see <xref linkend="hibernaterevengxmlfile"/></para>
- <para>The editor is activated as soon as an .reveng.xml file is opened. To
- get an initial reveng.xml file the reveng.xml wizard can be started via
- Ctrl+N or via the code generation launcher.</para>
+ <para>The editor is activated as soon as an <emphasis>
+ <property>.reveng.xml</property></emphasis> file is opened. To get an initial
+ <emphasis>
+ <property>reveng.xml</property></emphasis> file the reveng.xml wizard can be started via <emphasis>
+ <property>Ctrl+N</property></emphasis> or via the code generation
+ launcher.</para>
- <para>The following screentshot shows the overview page where the wanted
- console configuration is selected (auto-detected if Hibernate 3 support is
- enabled for the project)</para>
+ <para>The following screentshot shows the <emphasis>
+ <property>Overview</property></emphasis> page where the wanted console configuration
+ is selected (auto-detected if Hibernate 3 support is enabled for the project)</para>
- <para><mediaobject>
+ <figure>
+ <title>Overview Page</title>
+ <mediaobject>
<imageobject role="fo">
- <imagedata fileref="images/revengxml_overview.png" format="PNG" />
+ <imagedata fileref="images/revengxml_overview.png" format="PNG"/>
</imageobject>
<imageobject role="html">
- <imagedata align="center"
- fileref="images/revengxml_overview.png"
- format="PNG" />
+ <imagedata align="center" fileref="images/revengxml_overview.png" format="PNG"/>
</imageobject>
- </mediaobject></para>
+ </mediaobject>
+ </figure>
- <para>The table filter page allows you to specify which tables to include
- and exclude. Pressing refresh shows the tables from the database that have
- not yet been excluded.</para>
+ <para>The <emphasis>
+ <property>Table Filter</property></emphasis> page allows you to specify which tables to include and exclude. Pressing
+ refresh shows the tables from the database that have not yet been excluded.</para>
- <para><mediaobject>
+ <figure>
+ <title>Table Filters Page</title>
+ <mediaobject>
<imageobject role="fo">
- <imagedata fileref="images/revengxml_tablefilters.png" format="PNG" />
+ <imagedata fileref="images/revengxml_tablefilters.png" format="PNG"/>
</imageobject>
<imageobject role="html">
- <imagedata align="center"
- fileref="images/revengxml_tablefilters.png"
- format="PNG" />
+ <imagedata align="center" fileref="images/revengxml_tablefilters.png" format="PNG"/>
</imageobject>
- </mediaobject></para>
+ </mediaobject>
+ </figure>
- <para>Type mappings page is used for specifying type mappings from jdbc
- types to any hibernate type (including usertypes) if the default rules are
- not applicable.</para>
+ <para>The <emphasis>
+ <property>Type Mappings</property></emphasis> page is used for specifying type mappings from jdbc types to any Hibernate
+ type (including usertypes) if the default rules are not applicable.</para>
- <para><mediaobject>
+ <figure>
+ <title>Type Mappings Page</title>
+ <mediaobject>
<imageobject role="fo">
- <imagedata fileref="images/revengxml_typemappings.png" format="PNG" />
+ <imagedata fileref="images/revengxml_typemappings.png" format="PNG"/>
</imageobject>
<imageobject role="html">
- <imagedata align="center"
- fileref="images/revengxml_typemappings.png"
- format="PNG" />
+ <imagedata align="center" fileref="images/revengxml_typemappings.png" format="PNG"/>
</imageobject>
- </mediaobject></para>
+ </mediaobject>
+ </figure>
- <para>Table Columns page allow the user to explicit set e.g. which
- hibernatetype and propertyname that should be used in the reverse
- engineered model.</para>
+ <para>The <emphasis>
+ <property>Table and Columns</property></emphasis> page allow the user to explicit set e.g. which hibernatetype and
+ propertyname that should be used in the reverse engineered model.</para>
- <para><mediaobject>
+ <figure>
+ <title>Table and Columns Page</title>
+ <mediaobject>
<imageobject role="fo">
- <imagedata fileref="images/revengxml_tablescolumn.png" format="PNG" />
+ <imagedata fileref="images/revengxml_tablescolumn.png" format="PNG"/>
</imageobject>
<imageobject role="html">
- <imagedata align="center"
- fileref="images/revengxml_tablescolumn.png"
- format="PNG" />
+ <imagedata align="center" fileref="images/revengxml_tablescolumn.png" format="PNG"/>
</imageobject>
- </mediaobject></para>
+ </mediaobject>
+ </figure>
</section>
<section>
<title>Hibernate Console perspective</title>
- <para>The Hibernate Console perspective combines a set of views which
- allow you to see the structure of your mapped entities/classes, edit HQL
- queries, execute the queries, and see the results. To use this perspective
- you need to create a console configuration.</para>
+ <para>The <property>Hibernate Console</property> perspective combines a set of views which allow you to see the
+ structure of your mapped entities/classes, edit HQL queries, execute the queries, and see the
+ results. To use this perspective you need to create a console configuration.</para>
<section>
<title>Viewing the entity structure</title>
- <para>To view your new configuration and entity/class structure, expand
- the Hibernate Console configuration by clicking on the + icon.</para>
+ <para>To view your new configuration and entity/class structure, expand the <property>Hibernate Console</property>
+ configuration by clicking on the + icon.</para>
- <para>Clicking on the small <literal>+</literal> symbol allows you to
- browse the class/entity structure and see the relationships.</para>
+ <para>Clicking on the small <literal>+</literal> symbol allows you to browse the class/entity
+ structure and see the relationships.</para>
- <para><mediaobject>
+ <figure>
+ <title>Hibernate Console Perspective</title>
+ <mediaobject>
<imageobject role="fo">
- <imagedata fileref="images/queryconsole.png" />
+ <imagedata fileref="images/queryconsole.png"/>
</imageobject>
<imageobject role="html">
- <imagedata align="center"
- fileref="images/queryconsole.png" />
+ <imagedata align="center" fileref="images/queryconsole.png"/>
</imageobject>
- </mediaobject> Hibernate Console perspective showing entity structure,
- query editor and result</para>
+ </mediaobject>
+
+ </figure>
+
+ <para><property>Hibernate Console</property> perspective showing entity structure, query editor and
+ result</para>
+
- <para>The console configuration does not dynamically adjust to changes done in mappings and java code; to reload the configuration select the configuration and click the 'Reload' button in the view toolbar or in the context menu.</para>
+ <para>The console configuration does not dynamically adjust to changes done in mappings and
+ java code; to reload the configuration select the configuration and click the <emphasis>
+ <property>Reload</property>
+ </emphasis>
+ button in the view toolbar or in the context menu.</para>
<section>
<title>Mapping Diagram</title>
- <para>A mapping diagram for entities are available by right clicking on the entity you want an mapping diagram for and then choose "Open Mapping Diagram"</para>
+ <para>A mapping diagram for entities are available by right clicking on the entity you want
+ an mapping diagram for and then choose <emphasis>
+ <property>Open Mapping Diagram</property></emphasis></para>
- <mediaobject>
+ <figure>
+ <title>Mapping Diagram</title>
+ <mediaobject>
<imageobject role="fo">
- <imagedata fileref="images/entitymodel.png" />
+ <imagedata fileref="images/entitymodel.png"/>
</imageobject>
<imageobject role="html">
- <imagedata align="center"
- fileref="images/entitymodel.png" />
+ <imagedata align="center" fileref="images/entitymodel.png"/>
</imageobject>
- </mediaobject>
+ </mediaobject>
+ </figure>
</section>
</section>
@@ -970,89 +1224,95 @@
<section>
<title>Prototyping Queries</title>
- <para>Queries can be prototyped by entering them in the HQL or Criteria editor. The
- query editors are opened by right-clicking the Console configuration and
- selecting either "HQL Editor" or "Criteria Editor".</para>
-
- <para>If the menu item is disabled then you need to first create an
- SessionFactory. That is done by simply expanding the Session
- Factory node.</para>
+ <para>Queries can be prototyped by entering them in the HQL or Criteria editor. The query
+ editors are opened by right-clicking the Console configuration and selecting either <emphasis>
+ <property>HQL
+ Editor</property></emphasis> or <emphasis>
+ <property>Criteria Editor</property></emphasis>.</para>
- <para>Executing the query is done by clicking the green run button in
- the toolbar or pressing Ctrl+Enter.</para>
+ <para>If the menu item is disabled then you need to first create an SessionFactory. That is
+ done by simply expanding the Session Factory node.</para>
- <para>Errors during creation of the <literal>SessionFactory</literal> or
- running the queries (e.g. if your configuration or query is incorrect)
- will be shown in a message dialog or inlined in the view that detected
- the error, you may get more information about the error in the Error Log
- view on the right pane.</para>
+ <para>Executing the query is done by clicking the green run button in the toolbar or pressing
+ <emphasis>
+ <property>Ctrl+Enter</property></emphasis>.</para>
- <para>Results of a query will be shown in the Query result view and
- details of possible errors (syntax errors, database errors, etc.) can be
- seen in the Error Log view.</para>
+ <para>Errors during creation of the <literal>SessionFactory</literal> or running the queries
+ (e.g. if your configuration or query is incorrect) will be shown in a message dialog or
+ inlined in the view that detected the error, you may get more information about the error in
+ the Error Log view on the right pane.</para>
- <para>Tip: HQL queries are executed by default using <literal>list()</literal> thus
- without any limit of the size of the output the query could return a large result set.
- You might run out of memory. To avoid this you can put a value in the Max results field to reduce the number of elements returned.</para>
+ <para>Results of a query will be shown in the Query result view and details of possible errors
+ (syntax errors, database errors, etc.) can be seen in the Error Log view.</para>
+ <note>
+ <para>HQL queries are executed by default using <literal>list()</literal> thus without
+ any limit of the size of the output the query could return a large result set. You might run
+ out of memory. To avoid this you can put a value in the Max results field to reduce the
+ number of elements returned.</para>
+ </note>
+
<section>
<title>Dynamic Query Translator</title>
- <para>If the "Hibernate Dynamic Query Translator" view is visible
- while writing in the HQL editor it will show the generated SQL for a
- HQL query.</para>
+ <para>If the <emphasis>
+ <property>Hibernate Dynamic Query Translator</property></emphasis> view is visible while writing in the HQL
+ editor it will show the generated SQL for a HQL query.</para>
+ <figure>
+ <title>Hibernate Dynamic Query Translator View</title>
<mediaobject>
<imageobject role="fo">
- <imagedata fileref="images/dynamicquerytranslation.png"
- format="PNG" />
+ <imagedata fileref="images/dynamicquerytranslation.png" format="PNG"/>
</imageobject>
<imageobject role="html">
- <imagedata align="center"
- fileref="images/dynamicquerytranslation.png"
- format="PNG" />
+ <imagedata align="center" fileref="images/dynamicquerytranslation.png" format="PNG"/>
</imageobject>
</mediaobject>
+ </figure>
- <para>The translation is done each time you stop typing into the
- editor, if there are an error in the HQL the parse exception will be
- shown embedded in the view.</para>
+ <para>The translation is done each time you stop typing into the editor, if there are an
+ error in the HQL the parse exception will be shown embedded in the view.</para>
</section>
</section>
<section>
<title>Properties view</title>
- <para>The properties view shows the structure of any selected persistent
- object in the results view. Editing is not yet supported.</para>
+ <para>The <emphasis>
+ <property>Properties</property></emphasis> view shows the structure of any selected persistent object in the results
+ view. Editing is not yet supported.</para>
- <para><mediaobject>
+ <figure>
+ <title>Properties View</title>
+ <mediaobject>
<imageobject role="fo">
- <imagedata fileref="images/properties.png" format="PNG" />
+ <imagedata fileref="images/properties.png" format="PNG"/>
</imageobject>
<imageobject role="html">
- <imagedata align="center"
- fileref="images/properties.png" format="PNG" />
+ <imagedata align="center" fileref="images/properties.png" format="PNG"/>
</imageobject>
- </mediaobject></para>
+ </mediaobject>
+ </figure>
</section>
</section>
<section>
<title>Enable debug logging in the plugins</title>
- <para>It is possible to configure the eclipse plugin to route all logging
- made by the plugins and hibernate code it self to the "Error log" view in
- Eclipse.</para>
+ <para>It is possible to configure the eclipse plugin to route all logging made by the plugins
+ and hibernate code it self to the <emphasis>
+ <property>Error log</property></emphasis> view in Eclipse.</para>
- <para>This is done by editing the "hibernate-log4j.properties" in
- org.hibernate.eclipse/ directory/jar. This file includes a default
- configuration that only logs WARN and above to a set of custom appenders
- (PluginFileAppender and PluginLogAppender). You can change these settings
- to be as verbose or silent as you please - see hibernate documentation for
- interesting categories and log4j documentation for how to configure
- logging via a log4j property file.</para>
+ <para>This is done by editing the <emphasis>
+ <property>hibernate-log4j.properties</property></emphasis> in <emphasis>
+ <property>org.hibernate.eclipse/
+ directory/jar</property></emphasis>. This file includes a default configuration that only logs WARN and above to a
+ set of custom appenders (PluginFileAppender and PluginLogAppender). You can change these
+ settings to be as verbose or silent as you please - see hibernate documentation for
+ interesting categories and log4j documentation for how to configure logging via a log4j
+ property file.</para>
</section>
-</chapter>
\ No newline at end of file
+</chapter>
Modified: trunk/hibernatetools/docs/reference/en/modules/reverseengineering.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/reverseengineering.xml 2007-11-29 12:41:06 UTC (rev 5147)
+++ trunk/hibernatetools/docs/reference/en/modules/reverseengineering.xml 2007-11-29 13:48:54 UTC (rev 5148)
@@ -2,16 +2,20 @@
<chapter id="reverseengineering">
<title>Controlling reverse engineering</title>
- <para>When using the <jdbcconfiguration> the ant task will read the
+ <para>When using the <emphasis>
+ <property><jdbcconfiguration></property></emphasis> the ant task will read the
database metadata and from that perform a reverse engineering of the
database schema into a normal Hibernate Configuration. It is from this
- object e.g. >hbm2java< can generate other artifacts such as .java,
- .hbm.xml etc.</para>
+ object e.g. <emphasis>
+ <property><hbm2java></property></emphasis>can generate other artifacts such as <emphasis>
+ <property>.java</property></emphasis>,
+ <emphasis>
+ <property>.hbm.xml</property></emphasis> etc.</para>
- <para>To govern this process Hibernate uses a reverse engineering strategy.
+ <para>To govern this process <property>Hibernate</property> uses a reverse engineering strategy.
A reverse engineering strategy is mainly called to provide more java like
names for tables, column and foreignkeys into classes, properties and
- associations. It also used to provide mappings from SQL types to Hibernate
+ associations. It also used to provide mappings from SQL types to <property>Hibernate</property>
types. The strategy can be customized by the user. The user can even provide
its own custom reverse engineering strategy if the provided strategy is not
enough, or simply just provide a small part of the strategy and delegate the
@@ -22,24 +26,28 @@
<para>The default strategy uses some rules for mapping JDBC artifact names
to java artifact names. It also provide basic typemappings from JDBC types
- to Hibernate types. It is the default strategy that uses the packagename
+ to
+ <property>Hibernate</property>
+ types. It is the default strategy that uses the packagename
attribute to convert a table name to a fully qualified classname.</para>
</section>
<section id="hibernaterevengxmlfile">
<title>hibernate.reveng.xml file</title>
- <para>To have fine control over the process a hibernate.reveng.xml file
+ <para>To have fine control over the process a <emphasis>
+ <property>hibernate.reveng.xml</property></emphasis> file
can be provided. In this file you can specify type mappings and table
filtering. This file can be created by hand (its just basic XML) or you
can use the Hibernate plugins which have a specialized editor.</para>
- <para>Note: many databases is case-sensitive with their names and thus if
+ <note><para>Many databases is case-sensitive with their names and thus if
you cannot make some table match and you are sure it is not excluded by a
- <table-filter> then check if the case matches; most databases stores
- table names in uppercase.</para>
+ <table-filter>then check if the case matches; most databases stores
+ table names in uppercase.</para></note>
- <para>The following is an example of a reveng.xml. Following the example
+ <para>The following is an example of a <emphasis>
+ <property>reveng.xml</property></emphasis>. Following the example
is more details about the format.</para>
<programlisting><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
@@ -93,23 +101,31 @@
<section>
<title>Schema Selection (<schema-selection>)</title>
- <para><literal><schema-selection></literal> is used to drive which
- schema's the reverse engineering will try and process.</para>
+ <para><emphasis>
+ <property><schema-selection></property></emphasis> is used to drive which
+ schema's the reverse engineering will try and process.</para>
<para>By default the reverse engineering will read all schemas and then
- use <literal><table-filter></literal> to decide which tables get
+ use <emphasis>
+ <property><table-filter></property></emphasis> to decide which tables get
reverse engineered and which do not; this makes it easy to get started
but can be inefficient on databases with many schemas.</para>
- <para>With <literal><schema-selection></literal> it is thus
+ <para>With <emphasis>
+ <property><schema-selection></property></emphasis> it is thus
possible to limit the actual processed schemas and thus significantly
speed-up the reverse engineering.
- <literal><table-filter></literal> is still used to then decide
+ <emphasis>
+ <property><table-filter></property></emphasis> is still used to then decide
which tables will be included/excluded.</para>
- <para>Note: If no <literal><schema-selection></literal> is
+ <note> <para>If no <literal><schema-selection></literal> is
specified, the reverse engineering works as if all schemas should be
- processed. This is equal to:</para>
+ processed. </para></note>
+
+
+
+ <para>This is equal to:</para>
<programlisting><![CDATA[<schema-selection/>]]></programlisting>
@@ -120,15 +136,19 @@
<section>
<title>Examples</title>
- <para>The following will process all tables from MY_SCHEMA.</para>
+ <para>The following will process all tables from <emphasis>
+ <property>"MY_SCHEMA"</property></emphasis>.</para>
<programlisting><![CDATA[<schema-selection match-schema="MY_SCHEMA"/>]]></programlisting>
<para>It is possible to have multiple
<literal>schema-selection</literal>'s to support multi-schema reading
or simply to limit the processing to very specific tables. The
- following example process all tables in MY_SCHEMA, a specific CITY
- table plus all tables that starts with CODES_ in COMMON_SCHEMA.</para>
+ following example process all tables in <emphasis>
+ <property>"MY_SCHEMA"</property></emphasis>, a specific <emphasis>
+ <property>"CITY"</property></emphasis>
+ table plus all tables that starts with <emphasis>
+ <property>"CODES_ in COMMON_SCHEMA"</property></emphasis>.</para>
<programlisting><![CDATA[<schema-selection match-schema="MY_SCHEMA"/>
<schema-selection match-schema="COMMON_SCHEMA" match-table="CITY"/>
@@ -139,12 +159,13 @@
<section>
<title>Type mappings (<type-mapping>)</title>
- <para>The <literal><type-mapping></literal> section specifies how
- the JDBC types found in the database should be mapped to Hibernate
+ <para>The <emphasis>
+ <property><type-mapping></property></emphasis> section specifies how
+ the JDBC types found in the database should be mapped to Hibernate
types. e.g. java.sql.Types.VARCHAR with a length of 1 should be mapped
to the Hibernate type <literal>yes_no</literal> or
java.sql.Types.NUMERIC should generally just be converted to the
- Hibernate type <literal>long</literal>.</para>
+ Hibernate type <literal>long</literal>.</para>
<programlisting><![CDATA[<type-mapping>
<sql-type
@@ -158,7 +179,7 @@
</type-mapping>]]></programlisting>
<para>The number of attributes specificed and the sequence of the
- <literal>sql-type</literal>'s is important. Meaning that Hibernate will
+ <literal>sql-type</literal>'s is important. Meaning that <property>Hibernate</property> will
search for the most specific first, and if no specific match is found it
will seek from top to bottom when trying to resolve a type
mapping.</para>
@@ -334,7 +355,8 @@
<section>
<title>Table filters (<table-filter>)</title>
- <para>The <table-filter> let you specifcy matching rules for
+ <para>The <emphasis>
+ <property><table-filter></property></emphasis> let you specifcy matching rules for
performing general filtering/setup for tables, e.g. let you include or
exclude specific tables based on the schema or even a specifc
prefix.</para>
@@ -392,7 +414,8 @@
<section>
<title>Specific table configuration (<table>)</title>
- <para><literal><table></literal> allows you to provide explicit
+ <para><emphasis>
+ <property><table></property></emphasis> allows you to provide explicit
configuration on how a table should be reverse engineered. Amongst other
things it allow control over the naming of a class for the table,
specify which identifier generator should be used for the primary key
@@ -443,7 +466,8 @@
<section>
<title><primary-key></title>
- <para>A <literal><primary-key></literal> allows you to define a
+ <para>A <emphasis>
+ <property><primary-key></property></emphasis> allows you to define a
primary-key for tables that does not have such defined in the
database, and probably more importantly it allows you to define which
identifier strategy that should be used (even for already existing
@@ -491,9 +515,10 @@
<section>
<title><column></title>
- <para>With a <column> it is possible to explicitly name the
+ <para>With a <emphasis>
+ <property><column></property></emphasis> it is possible to explicitly name the
resulting property for a column. It is also possible to redefine what
- jdbc and/or hibernate type a column should be processed and finally it
+ jdbc and/or Hibernate type a column should be processed and finally it
is possible to completely exclude a column from processing.</para>
<para><programlistingco>
@@ -549,7 +574,8 @@
<section>
<title><foreign-key></title>
- <para>The <foreign-key> has two purposes. One for allowing to
+ <para>The <emphasis>
+ <property><foreign-key></property></emphasis> has two purposes. One for allowing to
define foreign-keys in databases that does not support them or does
not have them defined in their schema. Secondly, to allow defining the
name of the resulting properties (many-to-one and
@@ -645,16 +671,17 @@
<title>Custom strategy</title>
<para>It is possible to implement a user strategy. Such strategy must
- implement org.hibernate.cfg.reveng.ReverseEngineeringStrategy. It is
- recommended that one uses the DelegatingReverseEngineeringStrategy and
+ implement <emphasis>
+ <property>org.hibernate.cfg.reveng.ReverseEngineeringStrategy</property></emphasis>. It is
+ recommended that one uses the <property>DelegatingReverseEngineeringStrategy</property> and
provide a public constructor which takes another
- ReverseEngineeringStrategy as argument. This will allow you to only
+ <property>ReverseEngineeringStrategy </property> as argument. This will allow you to only
implement the relevant methods and provide a fallback strategy. Example of
custom delegating strategy which converts all column names that ends with
- "PK" into a property named "id".</para>
+ <emphasis>
+ <property>"PK"</property></emphasis> into a property named <emphasis>
+ <property>"id"</property></emphasis>.</para>
- <para></para>
-
<programlisting><![CDATA[public class ExampleStrategy extends DelegatingReverseEngineeringStrategy {
public ExampleStrategy(ReverseEngineeringStrategy delegate) {
@@ -675,16 +702,19 @@
<title>Custom Database Metadata</title>
<para>By default the reverse engineering is performed by reading using the
- JDBC database metadata API. This is done via the class
- <literal>org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect</literal>
+ JDBC database metadata API. This is done via the class
+ <emphasis>
+ <property>org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect</property></emphasis>
which is an implementation of
- <literal>org.hibernate.cfg.reveng.dialect.MetaDataDialect</literal>.</para>
+ <emphasis>
+ <property>org.hibernate.cfg.reveng.dialect.MetaDataDialect</property></emphasis>.</para>
<para>The default implementation can be replaced with an alternative
implementation by setting the property
- <literal>hibernatetool.metadatadialect</literal> to a fully qualified
+ <emphasis>
+ <property>hibernatetool.metadatadialect</property></emphasis> to a fully qualified
classname for a class that implements
- <literal>JDBCMetaDataDialect</literal>.</para>
+ <property>JDBCMetaDataDialect</property>.</para>
<para>This can be used to provide database specific optimized metadata
reading. If you create an optimized/better metadata reading for your
Modified: trunk/hibernatetools/docs/reference/en/modules/setup.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/setup.xml 2007-11-29 12:41:06 UTC (rev 5147)
+++ trunk/hibernatetools/docs/reference/en/modules/setup.xml 2007-11-29 13:48:54 UTC (rev 5148)
@@ -2,69 +2,78 @@
<chapter id="setup">
<title>Download and install Hibernate Tools</title>
- <para>Hibernate tools can be used "standalone" via Ant 1.6.x or fully
- integrated into a Eclipse 3.3.x + WTP 2.x based IDE, such as JBoss Tools or an
- default Eclipse 3.3.x + WTP 2.x installation. The following describes the install
- steps in these environments.</para>
+ <para><property>Hibernate Tools</property> can be used "standalone" via Ant
+ 1.6.x or fully integrated into a Eclipse 3.3.x + WTP 2.x based IDE, such as <property>JBoss
+ Tools</property> or an default Eclipse 3.3.x + WTP 2.x installation. The following describes
+ the install steps in these environments.</para>
<section>
<title>JBoss Tools</title>
- <para>JBoss Tools 2.x includes Hibernate Tools and thus nothing is
- required besides downloading and installing JBoss Tools. If you need
- to update to a newer version of the Hibernate Tools just follow the
- instructions in the Eclipse IDE section.</para>
+ <para><property>JBoss Tools 2.x</property> includes <property>Hibernate Tools</property> and
+ thus nothing is required besides downloading and installing <property>JBoss Tools</property>.
+ If you need to update to a newer version of the <property>Hibernate Tools</property> just
+ follow the instructions in the Eclipse IDE section.</para>
</section>
<section>
<title>Eclipse IDE</title>
- <para>To install into any Eclipse 3.3.x based Eclipse IDE you can either
- download the Hibernate Tools distribution from the Hibernate website or
- use the JBoss Tools update site (see http://tools.hibernate.org for
- links to the update site).</para>
+ <para>To install into any <property>Eclipse 3.3.x</property> based Eclipse IDE you can either
+ download the <property>Hibernate Tools</property> distribution from the <ulink
+ url="http://tools.hibernate.org">Hibernate website</ulink> or use the <property>JBoss
+ Tools</property> update site (see also <ulink url="http://tools.hibernate.org"
+ >http://tools.hibernate.org</ulink> for links to the update site).</para>
- <para>If you download the Hibernate Tools distribution you need to place
- the /plugins and /feature directory into your eclipse directory or eclipse
- extensions directory. Sometimes Eclipse does not automatically detect new
- plugins and thus the tools will not be activated. To ensure eclipse sees
- these changes run eclipse with the -clean option. E.g. <literal>eclipse
- -clean</literal> Using the updatesite does not require any additional
- steps.</para>
+ <para>If you download the <property>Hibernate Tools</property> distribution you need to place
+ the <emphasis>
+ <property>/plugins</property>
+ </emphasis> and <emphasis>
+ <property>/feature</property>
+ </emphasis> directory into your eclipse directory or eclipse extensions directory. Sometimes
+ Eclipse does not automatically detect new plugins and thus the tools will not be activated. To
+ ensure eclipse sees these changes run eclipse with the -clean option. E.g. <literal>eclipse
+ -clean</literal> Using the updatesite does not require any additional steps.</para>
- <para>Tip: If you need more basic instructions on installing plugins and
- general usage of eclipse then check out
- https://eclipse-tutorial.dev.java.net/ and especially
- https://eclipse-tutorial.dev.java.net/visual-tutorials/updatemanager.html
- which covers using the update manager.</para>
+ <note>
+ <para>If you need more basic instructions on installing plugins and general usage of eclipse
+ then check out <ulink url="https://eclipse-tutorial.dev.java.net/"
+ >https://eclipse-tutorial.dev.java.net/</ulink> and especially <ulink
+ url="https://eclipse-tutorial.dev.java.net/visual-tutorials/updatemanager.html"
+ >https://eclipse-tutorial.dev.java.net/visual-tutorials/updatemanager.html</ulink> which covers
+ using the update manager.</para>
+ </note>
<section>
<title>Usage of Eclipse WTP</title>
- <para>The Hibernate tools plugins currently uses WTP 2.x which at this
- time is the latest stable release from the Eclipse Webtools
- project.</para>
+ <para>The <property>Hibernate Tools</property> plugins currently uses <property>WTP
+ 2.x</property> which at this time is the latest stable release from the Eclipse Webtools
+ project.</para>
- <para>Because the WTP project not always have had proper versioning of their plugins
- there might exist WTP plugins in your existing eclipse directory from
- other Eclipse based projects that are from an earlier WTP release but
- has either the same version number or higher. It is thus recommended
- that if you have issues with WTP provided features to try and install
- the plugins on a clean install of eclipse to ensure there are no
- version collisions.</para>
-
+ <para>Because the WTP project not always have had proper versioning of
+ their plugins there might exist WTP plugins in your existing eclipse
+ directory from other Eclipse based projects that are from an earlier
+ WTP release but has either the same version number or higher. It is
+ thus recommended that if you have issues with WTP provided features to
+ try and install the plugins on a clean install of eclipse to ensure there are no version
+ collisions.</para>
+
</section>
</section>
<section>
<title>Ant</title>
- <para>To use the tools via Ant you need the hibernate-tools.jar and
- associated libraries. The libraries are included in the distribution from
- the Hibernate website and the Eclipse updatesite. The libraries are
- located in the eclipse plugins directory at
- <literal>/plugins/org.hibernate.eclipse.x.x.x/lib/tools/.</literal>These
- libraries are 100% independent from the eclipse platform. How to use these
- via ant tasks are described in the Ant chapter.</para>
+ <para>To use the tools via Ant you need the <emphasis>
+ <property>hibernate-tools.jar</property>
+ </emphasis> and associated libraries. The libraries are included in the distribution from the
+ Hibernate website and the Eclipse updatesite. The libraries are located in the eclipse plugins
+ directory at <emphasis>
+ <property>
+ <literal>/plugins/org.hibernate.eclipse.x.x.x/lib/tools/.</literal>
+ </property>
+ </emphasis>These libraries are 100% independent from the eclipse platform. How to use these
+ via ant tasks are described in the Ant chapter.</para>
</section>
-</chapter>
\ No newline at end of file
+</chapter>
17 years
JBoss Tools SVN: r5147 - trunk/seam/docs/reference.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2007-11-29 07:41:06 -0500 (Thu, 29 Nov 2007)
New Revision: 5147
Modified:
trunk/seam/docs/reference/build.xml
Log:
the line was deleted with the previous commit "<property name="modulename" value="seam"></property>"
it couses the build failed
this is fixed now
Modified: trunk/seam/docs/reference/build.xml
===================================================================
--- trunk/seam/docs/reference/build.xml 2007-11-29 00:16:50 UTC (rev 5146)
+++ trunk/seam/docs/reference/build.xml 2007-11-29 12:41:06 UTC (rev 5147)
@@ -1,5 +1,6 @@
<project name="Documentation" default="all.doc" basedir=".">
+<property name="modulename" value="seam"/>
<!-- Set the following property to generate the doco in the output folder -->
<condition property="build.dir" value="${doc-root}/${modulename}" else="${basedir}/../../build/reference">
<isset property="doc-root"/>
17 years
JBoss Tools SVN: r5146 - tags/jbosstools-2.0.0.GA.
by jbosstools-commits@lists.jboss.org
Author: mculpepper(a)jboss.com
Date: 2007-11-28 19:16:50 -0500 (Wed, 28 Nov 2007)
New Revision: 5146
Added:
tags/jbosstools-2.0.0.GA/as/
Log:
retagging as
Copied: tags/jbosstools-2.0.0.GA/as (from rev 5145, trunk/as)
17 years
JBoss Tools SVN: r5144 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-11-28 18:12:19 -0500 (Wed, 28 Nov 2007)
New Revision: 5144
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java
Log:
fixed NPE caused by isComplete() lying (or to be more correct WTP calls enter() before ui is setup so things go foobar if not validated)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java 2007-11-28 16:21:16 UTC (rev 5143)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java 2007-11-28 23:12:19 UTC (rev 5144)
@@ -339,7 +339,15 @@
private String getErrorString() {
if( findServer(name) != null )
return Messages.swf_NameInUse;
+
+ if(deployVal==null || deployVal.trim().length()==0) {
+ return "Deploy folder not specified";
+ }
+ if(deployTmpFolderVal==null || deployTmpFolderVal.trim().length()==0) {
+ return "Temporary deploy folder not specified";
+ }
+
return null;
}
17 years
JBoss Tools SVN: r5143 - trunk/as/docs/reference.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2007-11-28 11:21:16 -0500 (Wed, 28 Nov 2007)
New Revision: 5143
Modified:
trunk/as/docs/reference/build.xml
Log:
the location of build folder id fixed
Modified: trunk/as/docs/reference/build.xml
===================================================================
--- trunk/as/docs/reference/build.xml 2007-11-28 15:18:35 UTC (rev 5142)
+++ trunk/as/docs/reference/build.xml 2007-11-28 16:21:16 UTC (rev 5143)
@@ -2,7 +2,7 @@
<!-- Set the following property to generate the doco in the output folder -->
<property name="modulename" value="as"></property>
- <condition property="build.dir" value="${doc-root}/${modulename}" else="${basedir}/../../build/reference">
+ <condition property="build.dir" value="${doc-root}/${modulename}" else="${basedir}/../build/reference">
<isset property="doc-root"/>
</condition>
17 years
JBoss Tools SVN: r5142 - in trunk/as/docs/reference/en: images/runtimes_servers and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: afedosik
Date: 2007-11-28 10:18:35 -0500 (Wed, 28 Nov 2007)
New Revision: 5142
Modified:
trunk/as/docs/reference/en/images/modules/modules_4.png
trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_3.png
trunk/as/docs/reference/en/modules/runtimes_servers.xml
Log:
http://jira.jboss.com/jira/browse/RHDS-325 renaming in JBoss Server Manager guide, review.
Modified: trunk/as/docs/reference/en/images/modules/modules_4.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_3.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/modules/runtimes_servers.xml
===================================================================
--- trunk/as/docs/reference/en/modules/runtimes_servers.xml 2007-11-28 10:19:23 UTC (rev 5141)
+++ trunk/as/docs/reference/en/modules/runtimes_servers.xml 2007-11-28 15:18:35 UTC (rev 5142)
@@ -76,11 +76,7 @@
It will do no good to try to remember if "JBoss-runtime 5" is the 4.0 install with ejb3? Or the 4.2 install's custom configuration you decided to create.</para>
<para>After pressing finish, you'll see that your new runtime has been added to the list and can now be targeted by webtools type projects or servers, both of which we'll get to later.</para>
</section>
-
- <section><title>Deleting a Runtime</title>
- <para></para>
- </section>
-
+
</section>
<section>
17 years
JBoss Tools SVN: r5141 - trunk/seam/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2007-11-28 05:19:23 -0500 (Wed, 28 Nov 2007)
New Revision: 5141
Modified:
trunk/seam/docs/reference/en/modules/crud_application_walkthrough.xml
Log:
http://jira.jboss.com/jira/browse/RHDS-312
Modified: trunk/seam/docs/reference/en/modules/crud_application_walkthrough.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/crud_application_walkthrough.xml 2007-11-28 09:45:43 UTC (rev 5140)
+++ trunk/seam/docs/reference/en/modules/crud_application_walkthrough.xml 2007-11-28 10:19:23 UTC (rev 5141)
@@ -127,6 +127,8 @@
<para> Press <property>Edit</property> to Edit employees fields.</para>
<para> Enter <emphasis>Login</emphasis> and <emphasis>Password</emphasis> to login. (Use <emphasis>"Crudapp-user"/"secret"</emphasis> for example)</para>
+ <para> After this you will be loged in to the server and it will not ask you to enter login and password if you decide to carry through the same steps again.</para>
+ <para> Link <emphasis><property>Login</property></emphasis> in the right top corner will be changed on label <emphasis>Welcome, crudapp-user</emphasis> and link <emphasis><property>Logout</property></emphasis>.</para>
<figure>
<title>Login page</title>
17 years
JBoss Tools SVN: r5140 - trunk/seam/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: achabatar
Date: 2007-11-28 04:45:43 -0500 (Wed, 28 Nov 2007)
New Revision: 5140
Modified:
trunk/seam/docs/reference/en/modules/crud_database_application.xml
Log:
http://jira.jboss.com/jira/browse/RHDS-312
Modified: trunk/seam/docs/reference/en/modules/crud_database_application.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/crud_database_application.xml 2007-11-28 07:18:31 UTC (rev 5139)
+++ trunk/seam/docs/reference/en/modules/crud_database_application.xml 2007-11-28 09:45:43 UTC (rev 5140)
@@ -15,20 +15,15 @@
<section>
<title>What is CRUD?</title>
<para>
- <property>CRUD</property>
- ("Create, read, update and delete") are the four
- basic functions of persistent storage, a major part of nearly
- all computer software.
+ <property>CRUD</property> is an acronym for the four basic types of SQL commands: <emphasis><property>Create</property></emphasis>, <emphasis><property>Read</property></emphasis>, <emphasis><property>Update</property></emphasis>, <emphasis><property>Delete</property></emphasis>. Most applications have some kind of <property>CRUD</property> functionality, and we can assume that every programmer had to deal with <property>CRUD</property> at some point. A <property>CRUD</property> application is one that uses forms to get data into and out of a database.
</para>
<para>
- More information can be found on Wikipedia site:
- <ulink url="http://en.wikipedia.org/wiki/Create,_read,_update_and_delete">
- www.wikipedia.org</ulink>
+ In the next chapter we will create <link linkend="intro">Seam</link> Web application, connect it to the <ulink url="http://www.postgresql.org/">PostgreSQL</ulink> database and add <property>CRUD</property> support.
</para>
</section>
<section>
- <title>How to create the CRUD Database Application</title>
+ <title>How to create the CRUD Database Application with Seam</title>
<itemizedlist>
<listitem><para>Create a new Seam Web Project using New Project wizard or main menu <emphasis><property>File > New > Seam Web Project</property>.</emphasis></para></listitem>
@@ -45,7 +40,7 @@
<itemizedlist>
<listitem>
<para>Name your project as <emphasis><property>crudapp</property></emphasis> and follow the next wizard steps keeping default settings.</para>
- <para>Please have a look <link linkend="create_seam">here</link> how to create <emphasis><property>Target Runtime</property></emphasis> and <emphasis><property>Seam Runtime</property></emphasis>.</para>
+ <para>Please have a look <link linkend="create_seam">here</link> how to create <emphasis><property>Target Runtime</property></emphasis> and <emphasis><property>Seam Runtime</property></emphasis> in order to get started creating, running, and debugging J2EE applications.</para>
</listitem>
</itemizedlist>
<figure>
@@ -225,7 +220,7 @@
</figure>
<itemizedlist>
- <listitem><para>Switch back to the <property>Seam</property> perspective. From the toolbar select <emphasis><property>New->Seam Generate Entities</property></emphasis> to create necessary entity classes and web pages.
+ <listitem><para>Switch back to the <property>Seam</property> perspective. From the toolbar select <emphasis><property>New->Seam Generate Entities</property></emphasis> to create a set of <property>CRUD</property> Seam components and web pages based on existing tables in the database.
In the <emphasis><property>Generate Seam Entities</property></emphasis> dialog keep everything by default and press <emphasis><property>Finish</property></emphasis>.
</para></listitem>
</itemizedlist>
17 years
JBoss Tools SVN: r5139 - trunk/as.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2007-11-28 02:18:31 -0500 (Wed, 28 Nov 2007)
New Revision: 5139
Removed:
trunk/as/as/
Log:
17 years