db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1345942 - in /db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/templates: customizing.xml database-independence.xml index.xml
Date Mon, 04 Jun 2012 12:42:54 GMT
Author: tfischer
Date: Mon Jun  4 12:42:53 2012
New Revision: 1345942

URL: http://svn.apache.org/viewvc?rev=1345942&view=rev
Log:
Fixes and additions to the templates documentation

Modified:
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/templates/customizing.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/templates/database-independence.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/templates/index.xml

Modified: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/templates/customizing.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/templates/customizing.xml?rev=1345942&r1=1345941&r2=1345942&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/templates/customizing.xml
(original)
+++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/templates/customizing.xml
Mon Jun  4 12:42:53 2012
@@ -34,13 +34,13 @@
       This page is organized such that the high level changes are described
       first and the low-level changes are described later.
       It is recommended to use the first technique which solves
-      your problem
+      your problem.
     </p>
   </section>
   <section name ="Options">
     <p>
       The torque templates come with a lot of options, which can be used
-      to customize behaviour. Thhe following table lists the most commonly
+      to customize behaviour. The following table lists the most commonly
       used options (more might be found and described in the 
       conf/options.properties file of the template package
       of the current unit of generation) :
@@ -50,6 +50,7 @@
       <th> Property </th>
       <th> Default </th>
       <th> Description </th>
+      <th> Used for generation of </th>
     </tr>
 
     <tr>
@@ -62,7 +63,7 @@
         Torque must know the target database platform in order to generate the
         appropriate Java and SQL code, i.e. this option is required.
         Currently supported values are:
-        derby, mssql, mysql, oracle, postgresql.
+        derby, hsqldb, mssql, mysql, oracle, postgresql.
         <br/>
         For SQL generation, you can also specify the a custom name.
         In this case you need to provide an implementation of the interface
@@ -72,6 +73,7 @@
         Its name must be <code>Platform${CustomName}Impl</code>,
         where ${CustomName} must start with an upper case character.
       </td>
+      <td>sql, html, xdoc</td>
     </tr>
     <tr>
       <td><code>torque.om.package</code></td>

Modified: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/templates/database-independence.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/templates/database-independence.xml?rev=1345942&r1=1345941&r2=1345942&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/templates/database-independence.xml
(original)
+++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/templates/database-independence.xml
Mon Jun  4 12:42:53 2012
@@ -33,6 +33,12 @@
       <ul>
         <li>Not all data types are available on all databases.</li>
         <li>
+          Available data types may behave differently on different databases.
+          E.g. Oracle's date type contains time information as well,
+          in contrast to all other databases.
+          
+        </li>
+        <li>
           The maximum length of table names and column names is different
           between different databases. From current knowledge, table names
           shorter than 27 characters and column names shorter than

Modified: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/templates/index.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/templates/index.xml?rev=1345942&r1=1345941&r2=1345942&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/templates/index.xml
(original)
+++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/templates/index.xml
Mon Jun  4 12:42:53 2012
@@ -27,19 +27,23 @@
  <body>
   <section name="Introduction">
     <p>
-      The torque templates are a set of templates for the torque
+      The Torque templates are a set of templates for the Torque
       generator to produce code and SQL for a given data model.
-      The data model needs to follow the torque dtd (TODO: link to dtd).<br/>
+      The data model needs to follow the 
+      <a href="database-4-0.xsd">torque schema</a>.<br/>
       In the templates, the different generation goals (om classes, sql, doc...)
       are organized in different packages. For each generation goal,
       the correct package needs to be accessed. This is described in detail
       in the following sections.<br/>
-      In the following, it is assumed that the maven 2 torque-generator plugin
-      is used to process the templates.
+      In the following, it is assumed that the Torque Maven plugin
+      is used to process the templates. For using the Torque Ant tasks, 
+      modify the instructions according to the 
+      <a href="../ant-tasks/reference/index.html">Torque Ant tasks documentation</a>,
+      
     </p>
     <subsection name="Preparation">
       <p>
-        For adding the maven 2 torque-generator plugin to your build,
+        For adding the Torque Maven plugin to your build,
         add the following to your pom.xml:
       </p>
       <source><![CDATA[
@@ -78,14 +82,12 @@
               <sourceDir>${torque.schema.source.dir}</sourceDir>
               <options>
                 <torque.om.package>${torque.target.package}</torque.om.package>
-                <torque.database>${torque.target.database}</torque.database>
               </options>
             </configuration>
           </execution>
       ]]></source>
       <p>
-        Replace ${torque.target.database} with the target database type 
-        (e.g. mysql, oracle). Replace ${torque.schema.source.dir} 
+        Replace ${torque.schema.source.dir} 
         with the directory where you put your database schemata 
         (e.g. /src/main/schema). Replace ${torque.target.package} 
         with the base package for your generation, e.g. org.apache.torque.test.
@@ -95,89 +97,23 @@
         tag. The available options are described below.
       </p>
       <p>
-        This will generate the om code for all source files in the schema
-        directory ending on -schema.xml, but excluding id-table-schema.xml. 
+        This execution will generate the om code for all source files 
+        in the schema directory ending on -schema.xml, 
+        but excluding id-table-schema.xml. 
         The output will be produced in the directories 
         target/generated-sources and src/main/generated-java.
       </p>
       <p>
-        Below are the most commonly used options which are available 
-        for the generation om classes. A list of all options can be found
-        in the torque templates jar in the path 
-        org/apache/torque/templates/om/conf/options.properties.
-      </p>
-      <table>
-        <tr>
-          <th>option</th>
-          <th>default value</th>
-          <th>description</th>
-        </tr>
-        <tr>
-          <td>torque.om.package</td>
-          <td>-</td>
-          <td>The name of the root package for the generated classes</td>
-        </tr>
-        <tr>
-          <td>torque.database</td>
-          <td>-</td>
-          <td>The database to generate for. One of derby, mssql, mysql, oracle
-          or postgresql.
-          TODO check whether this is still needed for OM generation; generated
-          code should be independent of database.
-          </td>
-        </tr>
-        <tr>
-          <td>torque.om.useManagers</td>
-          <td>false</td>
-          <td>
-            Whether Manager classes should be generated which cache data objects
-            using JCS.
-          </td>
-        </tr>
-        <tr>
-          <td>torque.om.generateBeans</td>
-          <td>false</td>
-          <td>
-            If true, Torque generates a bean object for each data object, 
-            plus methods to convert data objects to beans and vice versa.
-          </td>
-        </tr>
-        <tr>
-          <td>torque.om.silentDbFetch</td>
-          <td>true</td>
-          <td>
-            If true, Torque silently fetches data objects related by foreign
-            key relations if the getter of a related data object is invoked
-            and the field read from the getter is not yet initialized.
-            If false, Torque simply returns null if the related objects 
-            have not yet been read.
-            This option has no effect if torque.objectIsCaching is set to false.
-          </td>
-        </tr>
-        <tr>
-          <td>torque.om.addGetByNameMethods</td>
-          <td>true</td>
-          <td>
-            If true, Torque adds methods to get database fields
-            by name/position.
-          </td>
-        </tr>
-        <tr>
-          <td>torque.om.complexObjectModel.generateFillers</td>
-          <td>false</td>
-          <td>
-            Whether filler methods are generated which can efficiently read
-            data objects related by a foreign key relation for a list of other
-            data objects.
-          </td>
-        </tr>
-      </table>
+        See the <a href="customizing.html">Customizing</a> page for a
+        documentation of available options which can be used to customize
+        the generated output.
+      </p>
     </subsection> 
     <subsection name="Generation of ddl sql">
       <p>
         For generating the data description language(ddl) sql for the tables,
         add the following execution to the executions list
-        of the maven torque-gf plugin:
+        of the Torque Maven plugin:
       </p>
       <source><![CDATA[
           <execution>
@@ -215,7 +151,7 @@
       <p>
         For generating html documentation for the tables,
         add the following execution to the executions list
-        of the maven torque-gf plugin:
+        of the Torque Maven plugin:
       </p>
       <source><![CDATA[
           <execution>
@@ -256,7 +192,7 @@
         For generating xdoc documentation for the tables 
         (to be included into your maven site),
         add the following execution to the executions list
-        of the maven torque-gf plugin:
+        of the Torque Maven plugin:
       </p>
       <source><![CDATA[
           <execution>
@@ -307,7 +243,7 @@
         For extracting the structure of an existing database into
         a schema file,
         add the following execution to the executions list
-        of the maven Torque generator plugin:
+        of the Torque Maven plugin:
       </p>
       <source><![CDATA[
           <execution>
@@ -340,21 +276,6 @@
         You may want to replace ${torque.database.schema} with the database 
         schema to read, if not please remove the line containing it.
       </p>
-      <p>
-        This will generate a schema.xml from all visible tables in the
-        database in the target/generated-schema directory.
-        You may then want to add the following configuration to your pom
-        to include this directory in your site:
-      </p>
-      <source><![CDATA[
-      <plugin>
-        <artifactId>maven-site-plugin</artifactId>
-        <groupId>org.apache.maven.plugins</groupId>
-        <configuration>
-          <xdocDirectory>target/generated-xdocs</xdocDirectory>
-        </configuration>
-      </plugin>
-      ]]></source>        
     </subsection> 
   </section>
  </body>



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message