Torque's generation tasks

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.

Torque offers a Maven plugin (maven-plugin) that can be used to invoke the generator.

Torque also offers an Ant build file (build-torque.xml) which could be added to your project. It defines the following targets:

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

SQL tasks

  • sql

    generates SQL source from an XML schema describing a database structure
  • create-db

    generates simple scripts for creating databases on various platforms.
  • datadtd

    generates data DTD from an XML schema describing a database structure
  • datadump

    dumping data from db into XML
  • datasql

    generates SQL source from an XML data file
  • jdbc

    generates an XML schema of an existing database from JDBC metadata
  • insert-sql

    inserts a SQL file into its designated database
  • sql2xml

    generates an xml schema from an sql schema

Torque tasks

  • om

    generates the Object/Peer/Manager model for Torque.
  • id-table-init-sql

    generates the initialization sql for the id table

OJB tasks

The OJB support is new and will be enhanced in future versions.

  • ojb-model

    generates a simple object model for ojb
  • ojb-repository

    generates the repository for ojb

Other tasks

  • doc

    generates html or xml documentation for xml schemas