From: <hib...@li...> - 2006-05-02 11:06:24
|
Author: max...@jb... Date: 2006-05-02 07:06:09 -0400 (Tue, 02 May 2006) New Revision: 9849 Modified: trunk/HibernateExt/tools/doc/reference/en/modules/ant.xml trunk/HibernateExt/tools/doc/reference/en/modules/reverseengineering.xml Log: noop Modified: trunk/HibernateExt/tools/doc/reference/en/modules/ant.xml =================================================================== --- trunk/HibernateExt/tools/doc/reference/en/modules/ant.xml 2006-05-02 03:21:21 UTC (rev 9848) +++ trunk/HibernateExt/tools/doc/reference/en/modules/ant.xml 2006-05-02 11:06:09 UTC (rev 9849) @@ -37,8 +37,7 @@ hibernate tools dependencies as well as the jdbc driver.</para> <para>Notice that to use the annotation based Configuration you must get - a release from <link - linkend="???">http://annotations.hibernate.org</link>.</para> + a release from http://annotations.hibernate.org.</para> <para></para> @@ -51,11 +50,13 @@ <area coords="3 55" id="ht2" /> - <area coords="5 55" id="ht3" /> + <area coords="4 55" id="ht3" /> <area coords="7 55" id="ht4" /> - <area coords="9 55" id="config" /> + <area coords="8 55" id="ht5" /> + + <area coords="10 55" id="ht6" /> </areaspec> <programlisting><![CDATA[<hibernatetool @@ -72,7 +73,7 @@ <calloutlist> <callout arearefs="ht1"> - <para><literal>destdir</literal> (requiredl): destination + <para><literal>destdir</literal> (required): destination directory for files generated with exporters.</para> </callout> @@ -94,12 +95,12 @@ providing custom properties to user defined templates.</para> </callout> - <callout arearefs="config"> + <callout arearefs="ht5"> <para>One of 4 different ways of configuring the Hibernate Meta Model must be specified.</para> </callout> - <callout arearefs="???"> + <callout arearefs="ht6"> <para>One or more of the exporters must be specified</para> </callout> </calloutlist> @@ -184,7 +185,7 @@ <area coords="5 55" id="cfg4" /> - <area coords="6 55" id="cfg5" /> + <area coords="7 55" id="cfg5" /> </areaspec> <programlisting><![CDATA[<configuration @@ -338,23 +339,24 @@ <title>JDBC Configuration for reverse engineering (<jdbcconfiguration>)</title> - <para>A <jdbcconfiguration> is used to perform reverse - engineering of the database from a JDBC connection.</para> + <para>A <literal><jdbcconfiguration></literal> 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>The <jdbcconfiguration> has the same attributes as a - <configuration> plus the following additional attributes:</para> + <para>The <literal><jdbcconfiguration></literal> has the same + attributes as a <literal><configuration></literal> plus the + following additional attributes:</para> <para><programlistingco> <areaspec> - <area coords="4 57" id="xcfg1" /> + <area coords="3 57" id="xcfg1" /> - <area coords="5 57" id="xcfg2" /> + <area coords="4 57" id="xcfg2" /> - <area coords="6 57" id="xcfg3" /> - + <area coords="5 57" id="xcfg3" /> </areaspec> <programlisting><![CDATA[<jdbcconfiguration Modified: trunk/HibernateExt/tools/doc/reference/en/modules/reverseengineering.xml =================================================================== --- trunk/HibernateExt/tools/doc/reference/en/modules/reverseengineering.xml 2006-05-02 03:21:21 UTC (rev 9848) +++ trunk/HibernateExt/tools/doc/reference/en/modules/reverseengineering.xml 2006-05-02 11:06:09 UTC (rev 9849) @@ -31,13 +31,16 @@ <para>To have fine control over the process a hibernate.reveng.xml 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</para> + 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>can use the Hibernate plugins which have a specialized - editor.</para> + <para>Note: 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> - <para>The following is an example of such a file.</para> + <para>The following is an example of a reveng.xml. Following the example + is more details about the format.</para> <programlisting><![CDATA[<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-reverse-engineering @@ -45,7 +48,6 @@ <hibernate-reverse-engineering> -<schema-selection <type-mapping> <!-- jdbc-type is name fom java.sql.Types --> <sql-type jdbc-type="VARCHAR" length='20' hibernate-type="SomeUserType" /> @@ -394,10 +396,7 @@ 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 - etc. Note: many databases is case-sensitive with their names and thus if - you cannot make the 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> + etc.</para> <programlistingco> <areaspec> @@ -427,7 +426,7 @@ </callout> <callout arearefs="tablefilter-matchschema"> - <para>schema (Optionl): Schema name for table</para> + <para>schema (Optional): Schema name for table</para> </callout> <callout arearefs="tablefilter-matchname"> @@ -436,7 +435,7 @@ <callout arearefs="tablefilter-exclude"> <para>clase (Optional): The class name for table. Default name is - camelcase version of the table name. </para> + camelcase version of the table name.</para> </callout> </calloutlist> </programlistingco> @@ -444,43 +443,200 @@ <section> <title><primary-key></title> - <para></para> + <para>A <literal><primary-key></literal> 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 + primary-key's).</para> - <programlisting><![CDATA[<primary-key + <programlistingco> + <areaspec> + <area coords="2 55" id="pk-generatorclass" /> + + <area coords="3 55" id="pk-generatorparam" /> + + <area coords="5 55" id="pk-keycolumn" /> + </areaspec> + + <programlisting><![CDATA[<primary-key <generator class="generatorname"> <param name="param_name">parameter value</param> </generator> <key-column...> </primary-key>]]></programlisting> + + <calloutlist> + <callout arearefs="pk-generatorclass"> + <para>generator/class (Optional): defines which identifier + generator should be used. The class name is any hibernate short + hand name or fully quailfied class name for an identifier + strategy.</para> + </callout> + + <callout arearefs="pk-generatorparam"> + <para>generator/param (Optional): Allows to specify which + parameter with name and value should be passed to the identifier + generator</para> + </callout> + + <callout arearefs="pk-keycolumn"> + <para>key-column (Optional): Specifies which column(s ) the + primary-key consists of. A key-column is same as column, but + does not have the exclude property.</para> + </callout> + </calloutlist> + </programlistingco> </section> <section> <title><column></title> - <para></para> + <para>With a <column> 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 + is possible to completely exclude a column from processing.</para> - <programlisting><![CDATA[<column + <para><programlistingco> + <areaspec> + <area coords="2 55" id="column-name" /> + + <area coords="3 55" id="column-jdbctype" /> + + <area coords="4 55" id="column-type" /> + + <area coords="5 55" id="column-propertytype" /> + + <area coords="6 55" id="column-exclude" /> + </areaspec> + + <programlisting><![CDATA[<column name="column_name" jdbc-type="java.sql.Types type" type="hibernate_type" property="propertyName" exclude="true|false" />]]></programlisting> + + <calloutlist> + <callout arearefs="column-name"> + <para>name (Required): Column name</para> + </callout> + + <callout arearefs="column-jdbctype"> + <para>jdbc-type (Optional): Which jdbc-type this column should + be processed as. A value from java.sql.Types, either numerical + (93) or the constant name (TIMESTAMP).</para> + </callout> + + <callout arearefs="column-type"> + <para>type (Optional): Which hibernate-type to use for this + specific column.</para> + </callout> + + <callout arearefs="column-propertytype"> + <para>property (Optional): What property name will be + generated for this column.</para> + </callout> + + <callout arearefs="column-exclude"> + <para>exclude (default: false): set to true if this column + should be ignored.</para> + </callout> + </calloutlist> + </programlistingco></para> </section> <section> <title><foreign-key></title> - <para></para> + <para>The <foreign-key> 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 + one-to-many's).</para> - <programlisting><![CDATA[<foreign-key + <para>Note</para> + + <para><programlistingco> + <areaspec> + <area coords="2 55" id="foreignkey-name" /> + + <area coords="3 55" id="foreignkey-catalog" /> + + <area coords="4 55" id="foreignkey-schema" /> + + <area coords="5 55" id="foreignkey-table" /> + + <area coords="7 55" id="foreignkey-columnref" /> + + <area coords="8 55" id="foreignkey-manytoone" /> + + <area coords="10 55" id="foreignkey-set" /> + </areaspec> + + <programlisting><![CDATA[<foreign-key constraint-name="foreignKeyName" foreign-catalog="catalogName" foreign-schema="schemaName" foreign-table="tableName" > <column-ref local-column="columnName" foreign-column="foreignColumnName"/> + <many-to-one + property="aPropertyName" + exclude="true|false"/> + <set + property="aCollectionName" + exclude="true|false"/> </foreign-key>]]></programlisting> + + <calloutlist> + <callout arearefs="foreignkey-name"> + <para>constraint-name (Required): Name of the foreign key + constraint. Important when naming many-to-one and set. It is + the constraint-name that is used to link the processed + foreign-keys with the resulting property names.</para> + </callout> + + <callout arearefs="foreignkey-catalog"> + <para>foreign-catalog (Optional): Name of the foreign table's + catalog. (Only relevant if you want to explicitly define a + foreign key)</para> + </callout> + + <callout arearefs="foreignkey-schema"> + <para>foreign-schema (Optional): Name of the foreign table's + schema. (Only relevant if you want to explicitly define a + foreign key)</para> + </callout> + + <callout arearefs="foreignkey-table"> + <para>foreign-table (Optional): Name of the foreign table. + (Only relevant if you want to explicitly define a foreign + key)</para> + </callout> + + <callout arearefs="foreignkey-columnref"> + <para>column-ref (Optional): Defines that the foreign-key + constraint between a local-column and foreign-column name. + (Only relevant if you want to explicitly define a foreign + key)</para> + </callout> + + <callout arearefs="foreignkey-manytoone"> + <para>many-to-one (Optional): Defines that a many-to-one + should be created and the property attribute specifies the + name of the resulting property. Exclude can be used to + explicitly define that it should be created or not.</para> + </callout> + + <callout arearefs="foreignkey-set"> + <para>set (Optional): Defines that a set should be created + based on this foreign-key and the property attribute specifies + the name of the resulting (set) property. Exclude can be used + to explicitly define that it should be created or not.</para> + </callout> + </calloutlist> + </programlistingco></para> </section> </section> </section> |