db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1403473 [1/2] - in /db/torque/torque4/trunk/torque-site: ./ src/site/ src/site/xdoc/ src/site/xdoc/documentation/codegen-reference/ src/site/xdoc/documentation/codegen-reference/generator-internals/ src/site/xdoc/documentation/modules/ant-...
Date Mon, 29 Oct 2012 20:02:15 GMT
Author: tfischer
Date: Mon Oct 29 20:02:13 2012
New Revision: 1403473

URL: http://svn.apache.org/viewvc?rev=1403473&view=rev
Log:
Reorganized the documentation

Added:
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/concepts.xml
      - copied unchanged from r1402320, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/reference/concepts.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/configuration.xml
      - copied unchanged from r1402320, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/reference/configuration.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/existing-target-modes.xml
      - copied unchanged from r1402320, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/reference/existing-target-modes.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/extending.xml
      - copied unchanged from r1402320, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/reference/extending.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/generator-internals/
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/generator-internals/index.xml
      - copied unchanged from r1402320, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/reference/internals.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/generator-internals/outletTypes.xml
      - copied unchanged from r1402320, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/reference/internals/outletTypes.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/index.xml
      - copied, changed from r1402320, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/reference/index.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/avalon.xml
      - copied unchanged from r1402320, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/other/other-howtos/avalon-howto.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/beans.xml
      - copied, changed from r1398200, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/beans.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/connections-transactions.xml
      - copied, changed from r1398200, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/connections-transactions.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/customizing-generation.xml
      - copied, changed from r1402320, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/templates/customizing.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/database-independence.xml
      - copied unchanged from r1402320, 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/orm-reference/defining-the-schema.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/exceptions.xml
      - copied unchanged from r1401997, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/exceptions.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/extend-classes.xml
      - copied, changed from r1398200, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/extend-classes.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/index.xml
      - copied, changed from r1398200, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/index.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/inheritance.xml
      - copied unchanged from r1402320, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/other/other-howtos/inheritance-guide.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/initialisation-configuration.xml
      - copied, changed from r1398200, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/initialisation-configuration.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/managers-cache.xml
      - copied, changed from r1398200, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/managers-cache.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/migration-from-torque-3.xml
      - copied unchanged from r1402320, db/torque/torque4/trunk/torque-site/src/site/xdoc/migration-from-torque-3.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/new-database-support.xml
      - copied, changed from r1398200, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/new-database-support.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/read-from-db.xml
      - copied, changed from r1398200, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/read-from-db.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/relevant-classes.xml
      - copied, changed from r1398200, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/relevant-classes.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/running-the-generator.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/supported-databases.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/write-to-db.xml
      - copied, changed from r1398200, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/write-to-db.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/tutorial/
      - copied from r1402320, db/torque/torque4/trunk/torque-site/src/site/xdoc/tutorial/
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/tutorial/orm/step2.xml
      - copied, changed from r1402323, db/torque/torque4/trunk/torque-site/src/site/xdoc/tutorial/orm/step2.xml
Removed:
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/reference/
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/
    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/specialFeatures.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/other/
    db/torque/torque4/trunk/torque-site/src/site/xdoc/migration-from-torque-3.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/tutorial/
Modified:
    db/torque/torque4/trunk/torque-site/pom.xml
    db/torque/torque4/trunk/torque-site/src/site/site.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/ant-tasks/reference/index.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven-plugin/index.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/templates/index.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/tutorial/orm/step3-ant.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/tutorial/orm/step3-maven.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/index.xml

Modified: db/torque/torque4/trunk/torque-site/pom.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/pom.xml?rev=1403473&r1=1403472&r2=1403473&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/pom.xml (original)
+++ db/torque/torque4/trunk/torque-site/pom.xml Mon Oct 29 20:02:13 2012
@@ -424,7 +424,7 @@
                 <copy todir="${project.reporting.outputDirectory}/documentation/modules/generator/reports/" file="${basedir}/../torque-generator/target/site/checkstyle.rss" />
 
                 <!-- templates extra report pages -->
-                <copy todir="${project.reporting.outputDirectory}/documentation/modules/templates">
+                <copy todir="${project.reporting.outputDirectory}/documentation/orm-reference">
                   <fileset dir="${basedir}/../torque-templates/target/site">
                     <include name="*.xsd" />
                   </fileset>

Modified: db/torque/torque4/trunk/torque-site/src/site/site.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/site.xml?rev=1403473&r1=1403472&r2=1403473&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/site.xml (original)
+++ db/torque/torque4/trunk/torque-site/src/site/site.xml Mon Oct 29 20:02:13 2012
@@ -42,7 +42,7 @@
       <item name="License"               href="http://www.apache.org/licenses/"/>
       <item name="Team"                  href="/team-list.html"/>
       <item name="Developer Information" href="/developer-info/index.html" collapse="true">
-        <item name="Subversion / CVS"    href="/developer-info/subversion.html"/>
+        <item name="Subversion"          href="/developer-info/subversion.html"/>
         <item name="Test project"        href="/developer-info/test-project.html"/>
         <item name="Code style"          href="/developer-info/codestyle.html"/>
         <item name="Developer Guide"     href="/developer-info/developer-guide.html"/>
@@ -55,18 +55,54 @@
       <item name="Thanks"                href="http://www.apache.org/foundation/thanks.html"/>
     </menu>
 
-    <menu name="Module Documentation">
-      <item name="Modules"               href="/documentation/modules/index.html">
+    <menu name="Documentation">
+      <item name="Tutorial"              href="/documentation/tutorial/index.html" collapse="true">
+        <item name="OR-Mapping"          href="/documentation/tutorial/orm/index.html" collapse="true">
+          <item name="step1-ant"         href="/documentation/tutorial/orm/step1-ant.html"/>
+          <item name="step1-maven"       href="/documentation/tutorial/orm/step1-maven.html"/>
+          <item name="step2"             href="/documentation/tutorial/orm/step2.html"/>
+          <item name="step3-ant"         href="/documentation/tutorial/orm/step3-ant.html"/>
+          <item name="step3-maven"       href="/documentation/tutorial/orm/step3-maven.html"/>
+          <item name="step4"             href="/documentation/tutorial/orm/step4.html"/>
+          <item name="step5"             href="/documentation/tutorial/orm/step5.html"/>
+          <item name="step6-ant"         href="/documentation/tutorial/orm/step6-ant.html"/>
+          <item name="step6-maven"       href="/documentation/tutorial/orm/step6-maven.html"/>
+        </item>
+        <item name="Code Generation"     href="/documentation/tutorial/codegen/gettingStarted.html"/>
+      </item>
+      <item name="OR Mapping Reference"  href="/documentation/orm-reference/index.html" collapse="true">
+        <item name="Defining the Schema" href="/documentation/orm-reference/defining-the-schema.html"/>
+        <item name="Running the Generator" href="/documentation/orm-reference/running-the-generator.html"/>
+        <item name="Database independence" href="/documentation/orm-reference/database-independence.html"/>
+        <item name="Initialisation of the Runtime" href="/documentation/orm-reference/initialisation-configuration.html"/>
+        <item name="Reading from the DB" href="/documentation/orm-reference/read-from-db.html"/>
+        <item name="Writing to the DB"   href="/documentation/orm-reference/write-to-db.html"/>
+        <item name="Extending classes"   href="/documentation/orm-reference/extend-classes.html"/>
+        <item name="Connections and Transactions" href="/documentation/orm-reference/connections-transactions.html"/>
+        <item name="Exception handling"  href="/documentation/orm-reference/exceptions.html"/>
+        <item name="Inheritance"         href="/documentation/orm-reference/inheritance.html"/>
+        <item name="Supported databases" href="/documentation/orm-reference/supported-databases.html"/>
+        <item name="Supporting a new DB" href="/documentation/orm-reference/new-database-support.html"/>
+        <item name="Managers and Cache"  href="/documentation/orm-reference/managers-cache.html"/>
+        <item name="Beans"               href="/documentation/orm-reference/beans.html"/>
+        <item name="Avalon Component"    href="/documentation/orm-reference/avalon.html"/>
+        <item name="Customizing the generation" href="/documentation/orm-reference/customizing-generation.html"/>
+        <item name="Relevant classes"    href="/documentation/orm-reference/relevant-classes.html"/>
+        <item name="Source XSD"          href="/documentation/orm-reference/database-4-0.xsd"/>
+        <item name="Source XSD (strict)" href="/documentation/orm-reference/database-4-0-strict.xsd"/>
+        <item name="Migration from Torque 3" href="/documentation/orm-reference/migration-from-torque-3.html"/>
+      </item>
+      <item name="Code Generation Reference" href="/documentation/codegen-reference/index.html" collapse="true">
+        <item name="Concepts"            href="/documentation/codegen-reference/concepts.html"/>
+        <item name="Configuration"       href="/documentation/codegen-reference/configuration.html"/>
+        <item name="Extending"           href="/documentation/codegen-reference/extending.html"/>
+        <item name="Target Modes"        href="/documentation/codegen-reference/existing-target-modes.html"/>
+        <item name="Generator Internals" href="/documentation/codegen-reference/generator-internals/index.html" collapse="true">
+          <item name="Outlet Types"      href="/documentation/codegen-reference/generator-internals/outletTypes.html"/>
+        </item>
+      </item>
+      <item name="Module Documentation"  href="/documentation/modules/index.html" collapse="true">
         <item name="Generator"           href="/documentation/modules/generator/index.html" collapse="true">
-          <item name="Reference"         href="/documentation/modules/generator/reference/index.html" collapse="true">
-            <item name="Concepts"        href="/documentation/modules/generator/reference/concepts.html"/>
-            <item name="Configuration"   href="/documentation/modules/generator/reference/configuration.html"/>
-            <item name="Extending"       href="/documentation/modules/generator/reference/extending.html"/>
-            <item name="Target Modes"    href="/documentation/modules/generator/reference/existing-target-modes.html"/>
-            <item name="Internals"       href="/documentation/modules/generator/reference/internals.html" collapse="true">
-              <item name="Outlet Types" href="/documentation/modules/generator/reference/internals/outletTypes.html"/>
-            </item>
-          </item>
           <item name="Dependencies"      href="/documentation/modules/generator/dependencies.html"/>
           <item name="Project Reports"   href="/documentation/modules/generator/reports/index.html" collapse="true">
             <item name="Metrics"         href="/documentation/modules/generator/reports/jdepend-report.html"/>
@@ -83,11 +119,6 @@
           </item>
         </item>
         <item name="Templates"           href="/documentation/modules/templates/index.html" collapse="true">
-          <item name="Source XSD" href="/documentation/modules/templates/database-4-0.xsd"/>
-          <item name="Source XSD (strict)" href="/documentation/modules/templates/database-4-0-strict.xsd"/>
-          <item name="Customizing the output" href="/documentation/modules/templates/customizing.html"/>
-          <item name="Database independence"  href="/documentation/modules/templates/database-independence.html"/>
-          <item name="Special Features"  href="/documentation/modules/templates/specialFeatures.html"/>
           <item name="Dependencies"      href="/documentation/modules/templates/dependencies.html"/>
           <item name="Project Reports"   href="/documentation/modules/templates/reports/index.html" collapse="true">
             <item name="Metrics"         href="/documentation/modules/templates/reports/jdepend-report.html"/>
@@ -142,19 +173,6 @@
           </item>
         </item>
         <item name="Runtime"             href="/documentation/modules/runtime/index.html" collapse="true">
-          <item name="Reference"         href="/documentation/modules/runtime/reference/index.html" collapse="true">
-            <item name="Initialisation"  href="/documentation/modules/runtime/reference/initialisation-configuration.html"/>
-            <item name="Reading from the DB" href="/documentation/modules/runtime/reference/read-from-db.html"/>
-            <item name="Writing to the DB" href="/documentation/modules/runtime/reference/write-to-db.html"/>
-            <item name="Extending classes" href="/documentation/modules/runtime/reference/extend-classes.html"/>
-            <item name="Connections"     href="/documentation/modules/runtime/reference/connections-transactions.html"/>
-            <item name="Multiple DBs"    href="/documentation/modules/runtime/reference/multiple-dbs.html"/>
-            <item name="Managers and Cache" href="/documentation/modules/runtime/reference/managers-cache.html"/>
-            <item name="Beans"           href="/documentation/modules/runtime/reference/beans.html"/>
-            <item name="Exceptions"      href="/documentation/modules/runtime/reference/exceptions.html"/>
-            <item name="Relevant classes" href="/documentation/modules/runtime/reference/relevant-classes.html"/>
-            <item name="Supporting a new DB" href="/documentation/modules/runtime/reference/new-database-support.html"/>
-          </item>
           <item name="Dependencies"      href="/documentation/modules/runtime/dependencies.html"/>
           <item name="Project Reports"   href="/documentation/modules/runtime/reports/index.html" collapse="true">
             <item name="Metrics"         href="/documentation/modules/runtime/reports/jdepend-report.html"/>
@@ -171,41 +189,8 @@
           </item>
         </item>
       </item>
-      <item name="Tutorial"              href="/tutorial/index.html" collapse="true">
-        <item name="ORM"                 href="/tutorial/orm/index.html" collapse="true">
-          <item name="step1-ant"         href="/tutorial/orm/step1-ant.html"/>
-          <item name="step1-maven"       href="/tutorial/orm/step1-maven.html"/>
-          <item name="step2"             href="/tutorial/orm/step2.html"/>
-          <item name="step3-ant"         href="/tutorial/orm/step3-ant.html"/>
-          <item name="step3-maven"       href="/tutorial/orm/step3-maven.html"/>
-          <item name="step4"             href="/tutorial/orm/step4.html"/>
-          <item name="step5"             href="/tutorial/orm/step5.html"/>
-          <item name="step6-ant"         href="/tutorial/orm/step6-ant.html"/>
-          <item name="step6-maven"       href="/tutorial/orm/step6-maven.html"/>
-        </item>
-        <item name="Code Generation"     href="/tutorial/codegen/gettingStarted.html"/>
-      </item>
-      <item name="Migration from Torque 3" href="/migration-from-torque-3.html"/>
     </menu>
 
-	<menu name="Other Documentation">
-      <item name="Supported Databases" href="/documentation/other/supported-databases.html"/>
-      <item name="Database Howtos"     href="/documentation/other/database-howtos/index.html" collapse="true">
-        <item name="Derby"             href="/documentation/other/database-howtos/derby-howto.html"/>
-        <item name="HSQLDB"            href="/documentation/other/database-howtos/hsqldb-howto.html"/>
-        <item name="MS SQL Server"     href="/documentation/other/database-howtos/mssql-howto.html"/>
-        <item name="MySQL"             href="/documentation/other/database-howtos/mysql-howto.html"/>
-        <item name="Oracle"            href="/documentation/other/database-howtos/oracle-howto.html"/>
-        <item name="Postgres"          href="/documentation/other/database-howtos/postgres-howto.html"/>
-      </item>
-      <item name="Other Howtos"        href="/documentation/other/other-howtos/index.html" collapse="true">
-        <item name="Database Layout"   href="/documentation/other/other-howtos/database-layout-howto.html"/>
-        <item name="DB Schema Support" href="/documentation/other/other-howtos/schema-howto.html"/>
-        <item name="Inheritance"       href="/documentation/other/other-howtos/inheritance-guide.html"/>
-        <item name="Avalon Component"  href="/documentation/other/other-howtos/avalon-howto.html"/>
-      </item>
-	</menu>
-	
     <menu name="Previous releases">
       <item name="Torque 3.3"          href="../torque-3.3/index.html" target="_blank"/>
     </menu>

Copied: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/index.xml (from r1402320, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/reference/index.xml)
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/index.xml?p2=db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/index.xml&p1=db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/reference/index.xml&r1=1402320&r2=1403473&rev=1403473&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/reference/index.xml (original)
+++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/index.xml Mon Oct 29 20:02:13 2012
@@ -21,15 +21,24 @@
 <document>
 
  <properties>
-  <title>Torque Generator Reference</title>
+  <title>Torque Code-Generation Reference</title>
  </properties>
 
  <body>
  
   <section name="Contents">
     <p>
-      This folder contains references on how to use the Torque generator.
+      This folder contains references on how to use the Torque generator
+      as general-purpose code generator.
     </p>
+    <p>
+      The Torque generator aims to achieve the following objectives:
+    </p>
+    <ul>
+      <li>Small conceptual and configurational overhead</li>
+      <li>Output from existing templates should be easily modifiable</li>
+      <li>Not bound to a single template language</li>
+    </ul>
   </section>
 
  </body>

Modified: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/ant-tasks/reference/index.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/ant-tasks/reference/index.xml?rev=1403473&r1=1403472&r2=1403473&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/ant-tasks/reference/index.xml (original)
+++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/ant-tasks/reference/index.xml Mon Oct 29 20:02:13 2012
@@ -30,46 +30,9 @@
       Torque generator.
     </p>
     <p>
-      The only task this plugin offers currently is the generator task, which
-      starts the Torque generator. It has to be defined as follows in the
-      buildfile before it can be used:
-    </p>
-    <source><![CDATA[
-  <taskdef
-    name="torque-generator"
-    classpathref="ant-classpath"
-    classname="org.apache.torque.ant.task.TorqueGeneratorTask"/>
-    ]]></source>
-    <p>
-      where ant-classpath points to a path which contains all jars from the
-      binary Torque ant tasks distribution.
-    </p>
-    <p>
-      A basic configuration for using pre-defined templates would be
-    </p>
-    <source><![CDATA[
-    <torque-generator 
-        packaging="classpath"
-        configPackage="${templates-config-package}"
-        sourceDir="${source-dir}">
-      <option key="${option-key}" value="${option-value}"/>
-      ...
-    </torque-generator>
-     ]]></source>   
-    <p>
-      The documentation of the templates should give you to the values for
-      ${templates-config-package} and the necessary/possible options to set.
-      Set ${source-dir} to the directory where the source files for the
-      generation are located.
-      The templates jar must also be available in the ant-classpath path. 
-    </p>
-    <p>
-      See <a href="generator-task.html">the generator task documentation</a>
-      for the available configuration parameters.
-    </p> 
-    <p>
-      See <a href="../../../../tutorial/orm/step1-ant.html">the ORM tutorial</a>
-      for a complete build file example.
+      The only task this plugin offers currently is the
+      <a href="generator-task.html">generator task</a>, which
+      starts the Torque generator. 
     </p> 
   </section>
  </body>

Modified: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven-plugin/index.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven-plugin/index.xml?rev=1403473&r1=1403472&r2=1403473&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven-plugin/index.xml (original)
+++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven-plugin/index.xml Mon Oct 29 20:02:13 2012
@@ -20,15 +20,15 @@
 
 <document>
  <properties>
-  <title>Torque Maven 2 Plugin - Documentation</title>
+  <title>Torque Maven Plugin - Documentation</title>
  </properties>
 
  <body>
 
-  <section name="Torque Maven 2 Plugin">
+  <section name="Torque Maven Plugin">
     <p>
-      The Torque Maven 2 plugin can currently be used to
-      run the Torque generator. For more information, see the 
+      The Torque Maven plugin can currently be used to
+      run the Torque generator within Maven 2/3. For more information, see the 
       <a href="reference/index.html">plugin reference</a>.
     </p>
   </section>

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=1403473&r1=1403472&r2=1403473&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 Oct 29 20:02:13 2012
@@ -21,261 +21,15 @@
 <document>
 
  <properties>
-  <title>Torque templates</title>
+  <title>Torque Templates</title>
  </properties>
 
  <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 
-      <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 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>
   </section>
-  <section name="Preparation">
-    <p>
-      For adding the Torque Maven plugin to your build,
-      add the following to your pom.xml:
-    </p>
-    <source><![CDATA[
-    <plugin>
-      <groupId>org.apache.torque</groupId>
-      <artifactId>torque-maven-plugin</artifactId>
-      <version>4.0-beta1</version>
-      <executions>
-         ...(see below)
-      </executions
-      <dependencies>
-        <dependency>
-          <groupId>org.apache.torque</groupId>
-          <artifactId>torque-templates</artifactId>
-          <version>4.0-beta1</version>
-        </dependency>
-      </dependencies>
-    </plugin>
-    ]]></source>
-  </section>
-  <section name="Generation of om classes">
-    <p>
-      For generating the OM classes, add the following execution to the
-      executions list of the torque-generator plugin:
-    </p>
-    <source><![CDATA[
-        <execution>
-          <id>generate-sources</id>
-          <phase>generate-sources</phase>
-          <goals>
-            <goal>generate</goal>
-          </goals>
-          <configuration>
-            <packaging>classpath</packaging>
-            <configPackage>org.apache.torque.templates.om</configPackage>
-            <sourceDir>${torque.schema.source.dir}</sourceDir>
-            <options>
-              <torque.om.package>${torque.target.package}</torque.om.package>
-            </options>
-          </configuration>
-        </execution>
-    ]]></source>
-    <p>
-      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.
-    </p>
-    <p>
-      You can add additional options to the configuration inside the options
-      tag. The available options are described below.
-    </p>
-    <p>
-      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>
-      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>
-  </section> 
-  <section 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 Torque Maven plugin:
-    </p>
-    <source><![CDATA[
-        <execution>
-          <id>generate-sql</id>
-          <phase>generate-sources</phase>
-          <goals>
-            <goal>generate</goal>
-          </goals>
-          <configuration>
-            <packaging>classpath</packaging>
-            <configPackage>org.apache.torque.templates.sql</configPackage>
-            <sourceDir>${torque.schema.source.dir}</sourceDir>
-            <newFileTargetDir>target/generated-sql</newFileTargetDir>
-            <compileNewFileTargetDir>false</compileNewFileTargetDir>
-            <compileModifiedFileTargetDir>false</compileModifiedFileTargetDir>
-            <options>
-              <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} 
-      with the directory where you put your database schemata 
-      (e.g. /src/main/schema). 
-    </p>
-    <p>
-      This will generate the sql code for all source files in the schema
-      directory ending on -schema.xml; the output goes to the directory 
-      target/generated-sql.
-    </p>
-  </section> 
-  <section name="Generation of html documentation">
-    <p>
-      For generating html documentation for the tables,
-      add the following execution to the executions list
-      of the Torque Maven plugin:
-    </p>
-    <source><![CDATA[
-        <execution>
-          <id>generate-html-doc</id>
-          <phase>generate-sources</phase>
-          <goals>
-            <goal>generate</goal>
-          </goals>
-          <configuration>
-            <packaging>classpath</packaging>
-            <configPackage>org.apache.torque.templates.doc.html</configPackage>
-            <sourceDir>${torque.schema.source.dir}</sourceDir>
-            <newFileTargetDir>target/generated-docs</newFileTargetDir>
-            <compileNewFileTargetDir>false</compileNewFileTargetDir>
-            <compileModifiedFileTargetDir>false</compileModifiedFileTargetDir>
-            <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} 
-      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.
-    </p>
-    <p>
-      This will generate the html documentation for all source files
-      in the schema directory ending on -schema.xml.
-      The output will be produced in the directory target/generated-docs.
-    </p>
-  </section> 
-  <section name="Generation of xdoc documentation">
-    <p>
-      For generating xdoc documentation for the tables 
-      (to be included into your maven site),
-      add the following execution to the executions list
-      of the Torque Maven plugin:
-    </p>
-    <source><![CDATA[
-        <execution>
-          <id>generate-xdoc</id>
-          <phase>pre-site</phase>
-          <goals>
-            <goal>generate</goal>
-          </goals>
-          <configuration>
-            <packaging>classpath</packaging>
-            <configPackage>org.apache.torque.templates.doc.xdoc</configPackage>
-            <sourceDir>${torque.schema.source.dir}</sourceDir>
-            <newFileTargetDir>target/generated-xdocs</newFileTargetDir>
-            <compileNewFileTargetDir>false</compileNewFileTargetDir>
-            <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} 
-      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.
-    </p>
-    <p>
-      This will generate the xdoc documentation
-      for all source files in the schema directory ending on -schema.xml.
-      The output is produced in the directory target/generated-xdocs.
-      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>        
-  </section> 
-  <section name="Generation of XML schema from an existing database">
-    <p>
-      For extracting the structure of an existing database into
-      a schema file,
-      add the following execution to the executions list
-      of the Torque Maven plugin:
-    </p>
-    <source><![CDATA[
-        <execution>
-          <id>generate-schema-from-jdbc</id>
-          <phase>generate-test-sources</phase>
-          <goals>
-            <goal>generate</goal>
-          </goals>
-          <configuration>
-            <packaging>classpath</packaging>
-            <configPackage>org.apache.torque.templates.jdbc2schema</configPackage>
-            <newFileTargetDir>target/generated-schema</newFileTargetDir>
-            <newFileTargetDirUsage>none</newFileTargetDirUsage>
-            <options>
-              <torque.jdbc2schema.driver>${torque.driver}</torque.jdbc2schema.driver>
-              <torque.jdbc2schema.url>${torque.database.url}</torque.jdbc2schema.url>
-              <torque.jdbc2schema.user>${torque.database.user}</torque.jdbc2schema.user>
-              <torque.jdbc2schema.password>${torque.database.password}</torque.jdbc2schema.password>
-              <torque.jdbc2schema.schema>${torque.database.schema}</torque.jdbc2schema.schema>
-            </options>
-          </configuration>
-        </execution>
-    ]]></source>
-    <p>
-      Replace ${torque.driver} with the fully qualified class name of the
-      database driver. Replace ${torque.database.url} 
-      with the url to connect to the database.
-      Replace ${torque.database.user} and ${torque.database.password} 
-      with the database username and the corresponding password.
-      You may want to replace ${torque.database.schema} with the database 
-      schema to read, if not please remove the line containing it.
-    </p>
-  </section> 
  </body>
 </document>
\ No newline at end of file

Copied: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/beans.xml (from r1398200, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/beans.xml)
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/beans.xml?p2=db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/beans.xml&p1=db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/beans.xml&r1=1398200&r2=1403473&rev=1403473&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/beans.xml (original)
+++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/beans.xml Mon Oct 29 20:02:13 2012
@@ -20,7 +20,7 @@
 
 <document>
  <properties>
-  <title>Torque Runtime Reference - Beans</title>
+  <title>Torque ORM Reference - Beans</title>
   <author email="fischer@seitenbau.de">Thomas Fischer</author>
  </properties>
 

Copied: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/connections-transactions.xml (from r1398200, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/connections-transactions.xml)
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/connections-transactions.xml?p2=db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/connections-transactions.xml&p1=db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/connections-transactions.xml&r1=1398200&r2=1403473&rev=1403473&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/connections-transactions.xml (original)
+++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/connections-transactions.xml Mon Oct 29 20:02:13 2012
@@ -20,7 +20,7 @@
 
 <document>
  <properties>
-   <title>Torque Runtime Reference - Reading from the database</title>
+   <title>Torque ORM Reference - Reading from the database</title>
    <author email="fischer@seitenbau.de">Thomas Fischer</author>
  </properties>
 

Copied: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/customizing-generation.xml (from r1402320, 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/orm-reference/customizing-generation.xml?p2=db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/customizing-generation.xml&p1=db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/templates/customizing.xml&r1=1402320&r2=1403473&rev=1403473&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/orm-reference/customizing-generation.xml Mon Oct 29 20:02:13 2012
@@ -28,7 +28,7 @@
   <section name="Introduction">
     <p>
       This page gives an overview what can be done to customize the
-      output of the Torque templates.  In most cases, there is
+      output of the generation process.  In most cases, there is
       more than one possibility; the same thing can be achieved through
       high-level changes as well as through low-level changes.
       This page is organized such that the high level changes are described
@@ -39,7 +39,7 @@
   </section>
   <section name ="Options">
     <p>
-      The torque templates come with a lot of options, which can be used
+      The Torque templates come with a lot of options, which can be used
       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
@@ -50,7 +50,7 @@
       <th> Property </th>
       <th> Default </th>
       <th> Description </th>
-      <th> Used for generation of </th>
+      <th> Used for generation of</th>
     </tr>
 
     <tr>
@@ -75,6 +75,55 @@
       </td>
       <td>sql, html, xdoc</td>
     </tr>
+
+    <tr>
+      <td colspan="3"><strong> Java Template Variables </strong>
+      (only used for the generation of java classes)</td>
+    </tr>
+    <tr>
+      <td><code>torque.om.addGetByNameMethods</code></td>
+      <td><code>true</code></td>
+      <td>
+        If true, Torque adds methods to get database fields
+        by name/position.
+      </td>
+    </tr>
+    <tr>
+      <td><code>torque.om.save.addSaveMethods</code></td>
+      <td><code>true</code></td>
+      <td>Determines whether a save method is generated.</td>
+    </tr>
+    <tr>
+      <td><code>torque.om.save.saveException</code></td>
+      <td><code>Exception</code></td>
+      <td>Defines which Exception should be thrown by the DbObject.save() method.</td>
+    </tr>
+    <tr>
+      <td><code>torque.om.trackModified</code></td>
+      <td><code>true</code></td>
+      <td>
+        Determines whether code should be added to track
+        whether a DbObject was modified.
+      </td>
+    </tr>
+    <tr>
+      <td><code>torque.om.trackNew</code></td>
+      <td><code>true</code></td>
+      <td>
+        Determines whether code should be added to track
+        whether a DbObject was read from or already written to the database.
+      </td>
+    </tr>
+    <tr>
+      <td><code>torque.om.addTimeStamp</code></td>
+      <td><code>true</code></td>
+      <td>
+        If true, Torque puts time stamps in generated om files.
+        This also triggers the generation of &quot;serialVersionUID&quot;-constants
+        in the classes that implement Serializable (object, peer and manager).
+        The version is equal to the generation timestamp.
+      </td>
+    </tr>
     <tr>
       <td><code>torque.om.package</code></td>
       <td><code>N/A</code></td>
@@ -191,55 +240,6 @@
         <code>${torque.om.package}</code>
       </td>
     </tr>
-
-    <tr>
-      <td colspan="3"><strong> Java Template Variables </strong>
-      (only used for the om generation target)</td>
-    </tr>
-    <tr>
-      <td><code>torque.om.addGetByNameMethods</code></td>
-      <td><code>true</code></td>
-      <td>
-        If true, Torque adds methods to get database fields
-        by name/position.
-      </td>
-    </tr>
-    <tr>
-      <td><code>torque.om.save.addSaveMethods</code></td>
-      <td><code>true</code></td>
-      <td>Determines whether a save method is generated.</td>
-    </tr>
-    <tr>
-      <td><code>torque.om.save.saveException</code></td>
-      <td><code>Exception</code></td>
-      <td>Defines which Exception should be thrown by the DbObject.save() method.</td>
-    </tr>
-    <tr>
-      <td><code>torque.om.trackModified</code></td>
-      <td><code>true</code></td>
-      <td>
-        Determines whether code should be added to track
-        whether a DbObject was modified.
-      </td>
-    </tr>
-    <tr>
-      <td><code>torque.om.trackNew</code></td>
-      <td><code>true</code></td>
-      <td>
-        Determines whether code should be added to track
-        whether a DbObject was read from or already written to the database.
-      </td>
-    </tr>
-    <tr>
-      <td><code>torque.om.addTimeStamp</code></td>
-      <td><code>true</code></td>
-      <td>
-        If true, Torque puts time stamps in generated om files.
-        This also triggers the generation of &quot;serialVersionUID&quot;-constants
-        in the classes that implement Serializable (object, peer and manager).
-        The version is equal to the generation timestamp.
-      </td>
-    </tr>
     <tr>
       <td><code>torque.om.className.baseDbObjectClassNamePrefix</code></td>
       <td><code>Base</code></td>
@@ -315,14 +315,6 @@
         that the generated base bean classes will extend.
       </td>
     </tr>
-    <tr>
-      <td><code>torque.om.java5</code></td>
-      <td><code>true</code></td>
-      <td>
-        Whether Java5 generics and iteration shorthand should be used
-        in generated code.
-      </td>
-    </tr>
 
     <tr>
       <td colspan="3"><strong> JDBC2Schema settings </strong>
@@ -412,7 +404,6 @@
     If there is no option which does what you want, you can override
     some of the templates. See the generator reference and the ant tasks
     or maven plugin documentation on how to do this.
-    
   </section>
  </body>
 </document>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/defining-the-schema.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/defining-the-schema.xml?rev=1403473&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/defining-the-schema.xml (added)
+++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/defining-the-schema.xml Mon Oct 29 20:02:13 2012
@@ -0,0 +1,396 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<document>
+ <properties>
+  <title>Torque ORM Reference - Defining the Schema</title>
+ </properties>
+
+ <body>
+ 
+  <section name="Creating a database schema">
+    <subsection name="Introduction">
+      <p>
+        A Torque database schema consists of one or more XML files
+        describing the structure of the databases.
+        The files which are considered by the generator can be configured
+        by the sourceIncludes and sourceExcludes settings of the
+        maven plugin or ant task. By default, all files are considered
+        ending with the suffix <code>schema.xml</code>.
+      </p>
+      <p>
+        All schema files should comply either to
+        <a href="database-4-0-strict">database-4-0-strict.xsd</a>
+        or to <a href="database-4-0.xsd">database-4-0.xsd</a>.
+        The difference between the strict schema
+        and the normal schema is that in the strict schema, additional
+        naming restrictions are made which are aimed at better interoperability
+        between databases.
+      </p>
+      <p>
+        
+        It is recommended to ensure schema compliance
+        by adding xsd information into the root database element, e.g.
+      </p>
+      <source><![CDATA[
+<database 
+    xmlns="http://db.apache.org/torque/4.0/templates/database"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://db.apache.org/torque/4.0/templates/database 
+        http://db.apache.org/torque/4.0/templates/database-strict.xsd"
+   ...
+      ]]></source>
+      <p>
+        or
+      </p>
+      <source><![CDATA[
+<database 
+    xmlns="http://db.apache.org/torque/4.0/templates/database"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://db.apache.org/torque/4.0/templates/database 
+        http://db.apache.org/torque/4.0/templates/database.xsd"
+   ...
+      ]]></source>
+    </subsection>
+
+    <subsection name="Organisation of the schema files">
+      <p>
+        A single database can consist of one or more schema files.
+        For small database definitions, it is best to use one schema file
+        per database.
+        For complicated database definitions, it can be better to use
+        more than one schema files.
+        To have foreign key references between tables in different files,
+        other schema files can either be included using the
+        <code>include-schema</code> element, 
+        or they can be referenced using the <code>external-schema</code>
+        element.
+        The difference between included and referenced schemata is that 
+        an included schema can have foreign key relations between all tables
+        in all files, whereas with referenced schema files, relations from the
+        referenced schema to the main schema are forbidden.
+        With both included and referenced schema files, 
+        care should be taken that the imported/included files 
+        are not read on their own by the  maven plugin or ant tasks.
+      </p>
+      <p>
+        For example, in the test project, the files included-schema.xml and 
+        ext-schema.xml are included respectively referenced 
+        by the test-schema.xml.
+        In the configuration of the torque-maven-plugin in the pom, these
+        files are excluded as source files in order to read them only via the
+        include-schema/external-schema element and not as schema files of
+        their own.
+      </p>
+    </subsection>
+
+    <subsection name="The database element">
+      <p>
+        Each schema file contains one database element as root element.
+        The database element must have a <code>name</code> attribute,
+        which defines the default handle by which the database can be accessed.
+        For example, in the test project, most databases have the name
+        <code>bookstore</code>, so by default they are accessed by the 
+        bookstore configuration settings.
+        A database can also define whether by default primitive or object types
+        are used (via the <code>defaultJavaType</code> attribute),
+        or which is the default id method to use to generate primary keys
+        (via the <code>defaultIdMethod</code> attribute).
+        For more attributes and possible values, see the xsd
+        <a href="database-4-0.xsd">database-4-0.xsd</a>.
+      </p>
+      <p>
+        The database element can have the following child elements
+      </p>
+      <ul>
+        <li>option (currently not used by the torque templates)</li>
+        <li>include-schema (see above)</li>
+        <li>external-schema (see above)</li>
+        <li>domain (definition of common data types, see below)</li>
+        <li>table (see below)</li>
+        <li>view (see below)</li>
+      </ul>
+    </subsection>
+    <subsection name="domains">
+      <p>
+        A domain is used to create a common type definition.
+        A domain must have a name and a data type
+        and can have a size, scale and default value.
+        Once the domain is defined, it can be used as any other data type. 
+      </p>
+    </subsection>
+
+    <subsection name="tables">
+      <p>
+        Tables are defined by the table element.
+        All tables must have a name and should have at least some columns. 
+        It is recommended that each table has a primary key
+        (see below for reasons).
+        Torque supports composite primary keys; to create one simply set
+        the primary-key attribute to true in more than one column
+        of the same table.
+      </p>
+      <p>
+        Torque can auto-generate numeric primary keys using either
+        the native database mechanism (idMethod="native", recommended)
+        or a method involving an extra table (idMethod="idBroker").
+      </p>
+      <p>
+        Foreign key relations between tables can be defined using the 
+        foreign-key element. Foreign keys can consist of one or more columns,
+        simply add a reference elements for each column in the foreign key.
+      </p>
+      <p>
+        Indexes on the table can be set using the index element.
+        Indexes can also consist of one or more columns. 
+        "Normal" indexes are not unique, use the unique element for 
+        defining unique constraints.
+      </p>
+    </subsection>
+
+    <subsection name="Columns">
+      <p>
+       There are some column names which you can not use in Torque although
+       your database would support them. These are any column name that contains
+       characters that are not in Java's variable identifier character set.  
+       The reason is that column names are used as variable names in the OM Peer
+       classes and these columns will cause the Torque generated code to not 
+       compile.  
+       </p>
+       
+       <p>
+       Note however, that SQL92 standard and up uses the same identifier
+       characters as Java for non-delimited columns. So this should only apply 
+       to columns defined by the SQL standard as delimited columns, i.e. 
+       columns referred to surrounded by double quotes.  Delimited column 
+       are considered to be case sensitive and/or contain non-standard 
+       characters.  However, most good cross DB server designs should avoid 
+       these special types of column since some servers don't support delimited 
+       columns.
+       </p>
+       
+       <p>
+       In addition, there are two column names that are handled slighly 
+       differently in the OM Peer classes.  This is so they will not produce 
+       constants twice in the generated code. The following column names (case is 
+       ignored) will have an &quot;_&quot; prefixed in front of them in the Peer
+       classes:
+       <ul>
+        <li>TABLE_NAME => _TABLE_NAME</li>
+        <li>DATABASE_NAME => _DATABASE_NAME</li>
+       </ul>
+      </p>
+      
+      <p>
+       Furthermore, it is recommended that you do not use words which have
+       a defined meaning in SQL as column names. Even if you can trick your
+       database into using them, it is not sure whether Torque can do the same.
+       And besides, even if it works for one database, if you ever decide
+       to use another database, you may run into trouble then.
+      </p>
+    </subsection>
+
+    <subsection name="Primary keys">
+      <p>
+       For every table, you should create a primary key which has no meaning
+       in real life. The reasons for this are:
+      </p>
+  
+      <p>
+       You should use a primary key at all because it creates a well-defined
+       link between the objects in the database and the objects in memory.
+       Often, one has to decide whether a java object in memory describes
+       &quot;the same&quot; object as a certain row in the database.
+       For example if you read an object from a database, 
+       change a field value and write it again to the database,
+       you would usually want to update the row you read from.
+       This is only possible if Torque can find the row
+       in the database from which the object originated. For this, the
+       primary key is used in relational databases. If two java objects have
+       the same primary key, they describe &quot;the same thing&quot; and refer
+       to the same row in the database. If you do not have
+       a primary key, there is no well-defined way to decide if two java
+       objects describe &quot;the same thing&quot;. You might run into not
+       being able to update an object.
+      </p>
+  
+      <p>
+       Now that we know why we want to have a primary key at all, why should
+       it have no meaning in real life ? This can be explained best by an
+       example. Consider a table which holds manufactured parts. Each part
+       has an unique serial number. So it is tempting to use the serial number
+       as a primary key. But now imagine that we have registered the wrong
+       serial number for a certain part in the database. Remember that
+       the primary key is used to decide &quot;is it the same object?&quot;
+       So we cannot change the serial number of a specified object without
+       making it another object.
+      </p>
+  
+      <p>
+       In Torque, this problem manifests itself in that there is no easy way
+       to change the primary key of an object; you must trick Torque into it
+       by using Torque's internals. This should be avoided if possible.
+       If you use an additional primary key which
+       has no meaning in real life, you do not run into that trouble.
+      </p>
+    </subsection>
+
+    <subsection name="views">
+      <p>
+        Views behave much as tables, except that they cannot be written to.
+        and that they usually reference data from other tables.
+      </p>
+      <p>
+        A view definition must contain the column names and types.
+      </p>
+      <p>
+        To let Torque create the sql for the view, you can specify 
+        a sql suffix for the view, e.g. 
+        "from book join author on book.author_id=author.author_id", and the
+        select snippet for each column using the select attribute, e.g. 
+        "author.author_id"".
+        This will usually work only for simple views, but is easy to read
+        in the schema.
+        If you cannot create the sql like this, you can also fill the attribute
+        createSql with the sql needed to create the sql.
+      </p>
+    </subsection>
+    <subsection name="examle schema file">
+      <p>
+        For an example schema file conaining most of the discussed features,
+        look at the bookstore-schema.xml from the test project.
+      </p>
+    </subsection>
+  </section>
+  
+  <section name="More than one database">
+    <p>
+      Torque can access multiple databases with different structure and even
+      different database vendors from within one Torque instance.
+      Basically this means that Torque's inbuilt connection handling can handle
+      more than one database connection pool.
+    </p>
+    <p>
+      There are three different scenarios for multiple databases,
+      with different levels of support from Torque:
+    </p>
+    <ul>
+      <li>
+        Each table has a unique name; different tables belong to different
+        databases. This situation is fully supported by the Torque runtime.
+        If the generated peer classes (generated by the torque generator 
+        using the torque templates) are used, the different databases are
+        handled automatically in the standard cases because each table has
+        a default database to which it belongs.
+      </li>
+      <li>
+        Some or all table names are not unique (there are tables with the
+        same name in different databases), and the tables with the same
+        name have the same structure (same column names and data types etc).
+        This situation is also fully supported by the Torque runtime.
+        However, the generated peer classes are not generated for this
+        situation; meaning that by default, a connection for querying and
+        saving is always opened to the default database for the given table
+        name.
+        This means you will either need to pass the correct database handle name
+        for querying and saving, or not use the connection handling
+        provided by the peer classes.
+      </li>
+      <li>
+        Some or all table names are not unique (there are tables with the
+        same name in different databases), and some of the tables with the same
+        name have a different structure than other tables with the same name.
+        This situation is not recommended, it is unclear to which extent it is
+        supported.
+      </li>
+    </ul>
+    
+    <subsection name="Databases with the same structure">
+      <p>
+        If your databases have the same structure, define the schema and 
+        generate the classes as if it were only one database.
+        Accessing different databases using the generated classes is covered 
+        <a href="read-from-db.html#Accessing_Multiple_Databases">later</a>
+        in this documentation.
+      </p>
+    </subsection>
+    <subsection name="Databases with different structures">
+      <p>
+        On schema creation time, make sure that the different databases
+        are defined in different schema files. Also make sure that the different
+        databases have different name attributes in the database element.
+        Then, define different database handles using the database names
+        from the schema files. Torque will then use the database handle with
+        the key equal to the database element's name attribute for each table.
+      </p>
+      <p>
+        It is recommended to generate the classes for the different databases
+        into different packages to keep them apart.
+        To achieve this, the corresponding classes must be generated
+        in different generator runs with different package settings.
+      </p>
+    </subsection>
+  </section>
+
+  <section name="Using database Schema names">
+
+    <p>
+      It is possible to qualify table names with schema names
+      (as in ${schema}.${table}) at generate time. To do this, use the
+      fully qualified table name as name attribute in the &lt;table&gt;
+      element of your schema.xml.
+      For example, to use the schema "bookstore" for the table "book",
+      use the following table definition:
+    </p>
+
+    <source><![CDATA[
+...
+<table name="bookstore.book" description="Book table">
+...
+]]>
+    </source>
+
+    <p>
+      If the standard naming method is used, the resulting
+      java class will be named Bookstorebook. If you want to omit
+      the schema name in the java name
+      (i.e. the resulting java class should be named "Book"),
+      you can either use the javaName attribute of the table definition:
+    </p>
+
+    <source><![CDATA[
+...
+<table name="bookstore.book" javaName="Book" description="Book table">
+...
+]]>
+    </source>
+
+    <p>
+      or TODO describe alternatives
+    </p>
+
+    <p>
+      If you use a sequence to autogenerate ids, 
+      the sequence will be generated in the same schema as the table.
+    </p>
+
+  </section>
+ </body>
+</document>

Copied: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/extend-classes.xml (from r1398200, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/extend-classes.xml)
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/extend-classes.xml?p2=db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/extend-classes.xml&p1=db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/extend-classes.xml&r1=1398200&r2=1403473&rev=1403473&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/extend-classes.xml (original)
+++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/extend-classes.xml Mon Oct 29 20:02:13 2012
@@ -21,7 +21,7 @@
 <document>
 
  <properties>
-    <title>Torque Runtime Reference - Extending the Base Classes</title>
+    <title>Torque ORM Reference - Extending the Base Classes</title>
     <author email="fischer@seitenbau.de">Thomas Fischer</author>
     <author email="leon@opticode.co.za">Leon Messerschmidt</author>
     <author email="jvanzyl@periapt.com">Jason van Zyl</author>

Copied: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/index.xml (from r1398200, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/index.xml)
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/index.xml?p2=db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/index.xml&p1=db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/index.xml&r1=1398200&r2=1403473&rev=1403473&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/index.xml (original)
+++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/index.xml Mon Oct 29 20:02:13 2012
@@ -21,34 +21,37 @@
 <document>
 
  <properties>
-  <title>Torque Runtime Reference</title>
-  <author email="fischer@seitenbau.de">Thomas Fischer</author>
+  <title>Torque ORM Reference</title>
  </properties>
 
  <body>
  
-  <section name="Contents">
+  <section name="Introduction">
     
     <p>
-     <br/>
-     <a href="initialisation-configuration.html">Initialisation and Configuration</a>
-     <br/><br/>
-     <a href="read-from-db.html">Reading from the database</a>
-     <br/><br/>
-     <a href="write-to-db.html">Writing to the database</a>
-     <br/><br/>
-     <a href="extend-classes.html">Extending the base classes</a>
-     <br/><br/>
-     <a href="connections-transactions.html">Connection and Transaction handling</a>
-     <br/><br/>
-     <a href="managers-cache.html">Managers and Caching</a>
-     <br/><br/>    
-     <a href="beans.html">Beans</a>
-     <br/><br/>
-     <a href="relevant-classes.html">Relevant classes</a>
-     <br/><br/>
-     <a href="new-database-support.html">Supporting a new Database</a>
-     <br/><br/>
+      This Reference contains information about how to use Torque as 
+      a Object-Relational mapper (a tool that maps from relational databases
+      to java classes).
+    </p>
+    <p>
+      To access a database with Torque, the following steps are needed, 
+      which are described in this documentation in detail:
+    </p>
+    <ul>
+      <li>
+        Define a schema file describing the database structure 
+        (tables, columns etc.)
+      </li>
+      <li>
+        Generate classes and database creation files from the schema.
+      </li>
+      <li>
+        Use the generated classes (and the torque-runtime library classes)
+        to access the database.
+      </li>
+    </ul>
+    <p>
+      Use the navigation on the left to choose the topic you are interested in.
     </p>
  
   </section>

Copied: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/initialisation-configuration.xml (from r1398200, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/initialisation-configuration.xml)
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/initialisation-configuration.xml?p2=db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/initialisation-configuration.xml&p1=db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/initialisation-configuration.xml&r1=1398200&r2=1403473&rev=1403473&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/initialisation-configuration.xml (original)
+++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/initialisation-configuration.xml Mon Oct 29 20:02:13 2012
@@ -21,7 +21,7 @@
 <document>
 
  <properties>
-  <title>Torque Runtime Reference - Initialisation and Configuration</title>
+  <title>Torque ORM Reference - Initialisation and Configuration</title>
   <author email="jmcnally@apache.org">John McNally</author>
   <author email="mpoeschl@marmot.at">Martin Poeschl</author>
   <author email="seade@backstagetech.com.au">Scott Eade</author>
@@ -179,15 +179,29 @@ torque.database.bookstore.adapter.myadap
         Torque provides factories to use the commons-dbcp pools as well as a 
         general factory that uses JNDI to retrieve the <code>DataSource</code>.
         The JNDI factory looks up a <code>DataSource</code> bound to JNDI; it
-        also provides a simple property file based way to configure and deploy most
-        <code>DataSource</code>'s, though in many cases a pool may already be
-        bound to JNDI and torque only needs to use it.
+        also provides a simple property file based way
+        to configure and deploy most <code>DataSource</code>'s,
+        though in many cases a pool may already be bound to JNDI
+        and Torque only needs to use it.<br/>
+        See the sections
+        <a href="#SharedPoolDataSourceFactory">SharedPoolDataSourceFactory</a>
+        and
+        <a href="#JndiDataSourceFactory">JndiDataSourceFactory</a>
+        for the most commonly used built-in data source factories in Torque.
       </p>
 
     </subsection>
-    
-  </section>
+
+    <subsection name="Multiple databases">
+      <p>
+        The configuration of multiple databases is very similar to the
+        configurations described in the rest of this section,
+        however you will need to define more than one database handle.
+      </p>
+    </subsection>
   
+  </section>
+
   <section name="SharedPoolDataSourceFactory">
 
     <p>
@@ -394,21 +408,21 @@ torque.dsfactory.bookstore.jndi.path=jdb
         <code>torque.properties</code> file:
       </p>
     
-    <source><![CDATA[
-    ##
-    ## Selecting a database schema for all data sources:
-    ##
-    
-    # All data sources use the public schema unless overridden
-    torque.defaults.schema = public
-    
-    ##
-    ## Selecting the schema 'foo' for the database "bar"
-    
-    # use the foo database
-    torque.database.bar.schema = foo
-    ]]>
-    </source>
+      <source><![CDATA[
+      ##
+      ## Selecting a database schema for all data sources:
+      ##
+      
+      # All data sources use the public schema unless overridden
+      torque.defaults.schema = public
+      
+      ##
+      ## Selecting the schema 'foo' for the database "bar"
+      
+      # use the foo database
+      torque.database.bar.schema = foo
+      ]]>
+      </source>
     
       <p>
         If no schema is configured in the torque properties or in other places,
@@ -419,10 +433,29 @@ torque.dsfactory.bookstore.jndi.path=jdb
 
     <subsection name="Other Means to Control schemas">
       <p>
-        See the
-        <a href="../../../other/other-howtos/schema-howto.html">Schema Howto</a>
-        for other ways to control the used schema.
+        You can change the schema which is used for unqualified table names 
+        per-Database in the Torque Runtime. The schema name is
+        queried dynamically whenever a Torque command accesses the database
+        and can be changed (if you have the same table layout on multiple
+        schemas, you can reuse your Peer classes thus reducing the number of
+        classes used).
       </p>
+    
+      <source><![CDATA[
+      /* Set the schema name for database "bar" to "foo" */
+      
+      Torque.setSchema("bar", "foo");
+      
+      /* Reset the schema names (no longer qualify
+       * accesses to the tables of the "bar" database
+       */
+      Torque.setSchema("bar", null);
+      
+      /* Get the current schema for the "bar" database */
+      String barSchema = Torque.getSchema("bar");
+      ]]>
+      </source>
+    
     </subsection>
   </section>
 

Copied: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/managers-cache.xml (from r1398200, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/managers-cache.xml)
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/managers-cache.xml?p2=db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/managers-cache.xml&p1=db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/managers-cache.xml&r1=1398200&r2=1403473&rev=1403473&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/managers-cache.xml (original)
+++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/managers-cache.xml Mon Oct 29 20:02:13 2012
@@ -21,7 +21,7 @@
 <document>
 
  <properties>
-   <title>Torque Runtime Reference - Managers and Caching</title>
+   <title>Torque ORM Reference - Managers and Caching</title>
    <author email="jmcnally@collab.net">John McNally</author>
  </properties>
 

Copied: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/new-database-support.xml (from r1398200, db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/new-database-support.xml)
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/new-database-support.xml?p2=db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/new-database-support.xml&p1=db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/new-database-support.xml&r1=1398200&r2=1403473&rev=1403473&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/new-database-support.xml (original)
+++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/new-database-support.xml Mon Oct 29 20:02:13 2012
@@ -21,7 +21,7 @@
 <document>
 
  <properties>
-  <title>Torque Runtime Reference - Support for new Databases</title>
+  <title>Torque ORM Reference - Support for new Databases</title>
   <author email="jon@latchkey.com">Jon S. Stevens</author>
   <author email="fischer@seitenbau.de">Thomas Fischer</author>
   <author email="tv@apache.org">Thomas Vandahl</author>



---------------------------------------------------------------------
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