<?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>Tasks Reference</title>
    <author email="mpoeschl@marmot.at">Martin Poeschl</author>
    <author email="seade@backstagetech.com.au">Scott Eade</author>
  </properties>

  <body>
    <section name="Torque's generation tasks">
      <p>
        Torque uses a single XML database schema to generate the SQL for
        your target database and Torque's Peer-based object relation model
        representing your XML database schema. Additionally, an HTML document
        describing the database can be generated if you wish to make a
        browseable version of the database schema.
      </p>

      <p>
        Torque offers a <a href="http://maven.apache.org/">Maven</a> plugin
        (<a href="../maven-plugin/index.html">maven-plugin</a>) 
        that can be used to invoke the generator.
      </p>

      <p>
        Torque also offers an <a href="http://ant.apache.org/">Ant</a> build
        file (<code>build-torque.xml</code>) which could be added to your
        project. It defines the following targets:
      </p>

      <p>
        The following tasks are available as both Ant tasks
        (<code>ant @task@</code>) and, after installing maven-plugin as
        Maven goals (<code>maven torque:@task@</code>):
      </p>

      <subsection name="SQL tasks">
        <ul>
          <li>
            <strong>sql</strong><br/>
            generates SQL source from an XML schema describing a database
            structure
          </li>
          <p/>
          <li>
            <strong>create-db</strong><br/>
            generates simple scripts for creating databases on various
            platforms.
          </li>
          <p/>
          <li>
            <strong>datadtd</strong><br/>
            generates data DTD from an XML schema describing a database
            structure
          </li>
          <p/>
          <li>
            <strong>datadump</strong><br/>
            dumping data from db into XML
          </li>
          <p/>
          <li>
            <strong>datasql</strong><br/>
            generates SQL source from an XML data file
          </li>
          <p/>
          <li>
            <strong>jdbc</strong><br/>
            generates an XML schema of an existing database from JDBC metadata
          </li>
          <p/>
          <li>
            <strong>insert-sql</strong><br/>
            inserts a SQL file into its designated database
          </li>
          <p/>
          <li>
            <strong>sql2xml</strong><br/>
            generates an xml schema from an sql schema
          </li>
          <p/>
        </ul>
      </subsection>
      <subsection name="Torque tasks">
        <ul>
          <li>
            <strong>om</strong><br/>
            generates the Object/Peer/Manager model for Torque.
          </li>
          <p/>
          <li>
            <strong>id-table-init-sql</strong><br/>
            generates the initialization sql for the id table
          </li>
          <p/>
        </ul>
      </subsection>
      <subsection name="OJB tasks">
        <p>
          The OJB support is new and will be enhanced in future versions.
        </p>
        <ul>
          <li>
            <strong>ojb-model</strong><br/>
            generates a simple object model for ojb
          </li>
          <p/>
          <li>
            <strong>ojb-repository</strong><br/>
            generates the repository for ojb
          </li>
        </ul>
      </subsection>
      <subsection name="Other tasks">
        <ul>
          <li>
            <strong>doc</strong><br/>
            generates html or xml documentation for xml schemas
          </li>
          <p/>
        </ul>
      </subsection>

    </section>
  </body>
</document>
