public class TorqueJDBCTransformTask extends Task (Code)
This class generates an XML schema of an existing database from
JDBC metadata.
author: Jason van Zyl author: Fedor Karpelevitch version: $Id: TorqueJDBCTransformTask.java 502761 2007-02-02 21:52:05Z tfischer $
getForeignKeys(DatabaseMetaData dbMeta, String tableName) Retrieves a list of foreign key columns for a given table.
Parameters: dbMeta - JDBC metadata. Parameters: tableName - Table from which to retrieve FK information.
getPrimaryKeys(DatabaseMetaData dbMeta, String tableName) Retrieves a list of the columns composing the primary key for a given
table.
Parameters: dbMeta - JDBC metadata. Parameters: tableName - Table from which to retrieve PK information.
getTableNames(DatabaseMetaData dbMeta) Get all the table names in the current database that are not
system tables.
Parameters: dbMeta - JDBC database metadata.
Retrieves all the column names and types for a given table from
JDBC metadata. It returns a List of Lists. Each element
of the returned List is a List with:
element 0 => a String object for the column name.
element 1 => an Integer object for the column type.
element 2 => size of the column.
element 3 => null type.
Parameters: dbMeta - JDBC metadata. Parameters: tableName - Table from which to retrieve column information. The list of columns in tableName. throws: SQLException -
Retrieves a list of foreign key columns for a given table.
Parameters: dbMeta - JDBC metadata. Parameters: tableName - Table from which to retrieve FK information. A list of foreign keys in tableName. throws: SQLException -
Retrieves a list of the columns composing the primary key for a given
table.
Parameters: dbMeta - JDBC metadata. Parameters: tableName - Table from which to retrieve PK information. A list of the primary key parts for tableName. throws: SQLException -
Get all the table names in the current database that are not
system tables.
Parameters: dbMeta - JDBC database metadata. The list of all the tables in a database. throws: SQLException -