Torque
Home PageCategories: Persistence - Data-tier
Author: The Apache Software Foundation
Latest version: 3.2
Added 2006-06-26
Torque does not use reflection to access user-provided classes, but it generates the necessary classes from an XML schema describing the database layout (which can either be written by hand or generated from an existing database). The XML schema can also be used to generate and execute a SQL script which creates all the tables in the database.
As Torque hides database-specific implementation details, it makes an application independent of a specific database if no exotic features of the database are used.
You can override the autogenerated methods and thus change their behaviour.
Torque consists of:
- runtime: contains everything to allow an application to access the database. It is the only component of Torque needed in your application and can be used standalone.
- Maven plugin: creates the object classes for accessing and storing data from the database. It can also generate the XML description of an existing database and (in reverse) create an SQL script to create the tables in the database. Internally, the Maven plugin uses the generator to accomplish these tasks.
- generator: contains Ant tasks that do all the work for the Maven plugin.
- templates: contain the building blocks used by the generator to create the object classes, SQL scripts and the like. You can change the templates if you want to customize the output of the generator.
Built for Java |
Free or free version available |
Source code provided |