Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.enableit.db
Class SchemaExporter  view SchemaExporter download SchemaExporter.java

java.lang.Object
  extended byorg.enableit.db.SchemaExporter

Deprecated. Moved to darrt subpackage

public class SchemaExporter
extends java.lang.Object

Export database schemas as XML. Note on ASA interpretation of DatabaseMetaData object: SCHEMA = users and groups


Field Summary
private  java.lang.String catalog
          Deprecated.  
static java.lang.String CATALOGS
          Deprecated.  
static java.lang.String COL_NAME
          Deprecated.  
static java.lang.String COL_TYPE
          Deprecated.  
static java.lang.String COLUMN
          Deprecated.  
static java.lang.String DESCRIPTION
          Deprecated.  
static java.lang.String DRIVER
          Deprecated.  
static java.lang.String FK
          Deprecated.  
static java.lang.String FK_DATA_COL_NAME
          Deprecated.  
static java.lang.String FK_DATA_COLUMN
          Deprecated.  
static java.lang.String FK_DISPLAY_COL_NAME
          Deprecated.  
static java.lang.String FK_DISPLAY_COLUMN
          Deprecated.  
static java.lang.String FK_TABLE
          Deprecated.  
private static org.apache.log4j.Category logger
          Deprecated. Define a static Category instance for logging.
static java.lang.String METADATA
          Deprecated.  
static java.lang.String NAME
          Deprecated.  
static java.lang.String NULLABLE
          Deprecated.  
static java.lang.String PK
          Deprecated.  
static java.lang.String PROVIDER
          Deprecated.  
static java.lang.String ROOT_ELEMENT
          Deprecated.  
static java.lang.String SCHEMA
          Deprecated.  
static java.lang.String SCHEMAS
          Deprecated.  
static java.lang.String TABLE
          Deprecated.  
private  java.lang.String tablePattern
          Deprecated.  
private  java.lang.String targetDir
          Deprecated.  
private  java.lang.String targetSchema
          Deprecated.  
static java.lang.String URL_STRING
          Deprecated.  
static java.lang.String VSN
          Deprecated.  
 
Constructor Summary
SchemaExporter()
          Deprecated. Default Constructor
 
Method Summary
private  void addTables(java.sql.DatabaseMetaData dmd, org.w3c.dom.Document doc, java.lang.String schemaName, org.w3c.dom.Element schemaTag)
          Deprecated. Extract table metadata adding appropriate tags.
private  org.w3c.dom.Document export(java.sql.Connection conn)
          Deprecated. Export the schema at the database already connected to.
 org.w3c.dom.Document export(java.lang.String driver, java.lang.String url, java.lang.String userid, java.lang.String password)
          Deprecated. Export the schema identified by the provided connection parameters.
private  java.lang.String getPackageDir(java.lang.String javaPackage)
          Deprecated. Returns the directory name classes should be stored in based on the Java package name received
static void main(java.lang.String[] args)
          Deprecated.  
 void setTablePattern(java.lang.String tablePattern)
          Deprecated. A pattern identifying tables whose schema should be exported.
 void setTargetSchema(java.lang.String targetSchema)
          Deprecated. The name of the schema to be exported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static org.apache.log4j.Category logger
Deprecated. 
Define a static Category instance for logging.


tablePattern

private java.lang.String tablePattern
Deprecated. 

catalog

private java.lang.String catalog
Deprecated. 

targetDir

private java.lang.String targetDir
Deprecated. 

targetSchema

private java.lang.String targetSchema
Deprecated. 

ROOT_ELEMENT

public static final java.lang.String ROOT_ELEMENT
Deprecated. 
See Also:
Constant Field Values

SCHEMA

public static final java.lang.String SCHEMA
Deprecated. 
See Also:
Constant Field Values

PROVIDER

public static final java.lang.String PROVIDER
Deprecated. 
See Also:
Constant Field Values

DRIVER

public static final java.lang.String DRIVER
Deprecated. 
See Also:
Constant Field Values

VSN

public static final java.lang.String VSN
Deprecated. 
See Also:
Constant Field Values

URL_STRING

public static final java.lang.String URL_STRING
Deprecated. 
See Also:
Constant Field Values

METADATA

public static final java.lang.String METADATA
Deprecated. 
See Also:
Constant Field Values

CATALOGS

public static final java.lang.String CATALOGS
Deprecated. 
See Also:
Constant Field Values

SCHEMAS

public static final java.lang.String SCHEMAS
Deprecated. 
See Also:
Constant Field Values

DESCRIPTION

public static final java.lang.String DESCRIPTION
Deprecated. 
See Also:
Constant Field Values

TABLE

public static final java.lang.String TABLE
Deprecated. 
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
Deprecated. 
See Also:
Constant Field Values

COLUMN

public static final java.lang.String COLUMN
Deprecated. 
See Also:
Constant Field Values

COL_NAME

public static final java.lang.String COL_NAME
Deprecated. 
See Also:
Constant Field Values

COL_TYPE

public static final java.lang.String COL_TYPE
Deprecated. 
See Also:
Constant Field Values

NULLABLE

public static final java.lang.String NULLABLE
Deprecated. 
See Also:
Constant Field Values

PK

public static final java.lang.String PK
Deprecated. 
See Also:
Constant Field Values

FK

public static final java.lang.String FK
Deprecated. 
See Also:
Constant Field Values

FK_TABLE

public static final java.lang.String FK_TABLE
Deprecated. 
See Also:
Constant Field Values

FK_DATA_COLUMN

public static final java.lang.String FK_DATA_COLUMN
Deprecated. 
See Also:
Constant Field Values

FK_DATA_COL_NAME

public static final java.lang.String FK_DATA_COL_NAME
Deprecated. 
See Also:
Constant Field Values

FK_DISPLAY_COLUMN

public static final java.lang.String FK_DISPLAY_COLUMN
Deprecated. 
See Also:
Constant Field Values

FK_DISPLAY_COL_NAME

public static final java.lang.String FK_DISPLAY_COL_NAME
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

SchemaExporter

public SchemaExporter()
Deprecated. 
Default Constructor

Method Detail

setTablePattern

public void setTablePattern(java.lang.String tablePattern)
Deprecated. 
A pattern identifying tables whose schema should be exported.

Single chars may be represented by '_' and multiple chars by '%'.


setTargetSchema

public void setTargetSchema(java.lang.String targetSchema)
Deprecated. 
The name of the schema to be exported.

If no schema is specified all will be exported.


export

public org.w3c.dom.Document export(java.lang.String driver,
                                   java.lang.String url,
                                   java.lang.String userid,
                                   java.lang.String password)
                            throws DBException
Deprecated. 
Export the schema identified by the provided connection parameters.


export

private org.w3c.dom.Document export(java.sql.Connection conn)
                             throws DBException
Deprecated. 
Export the schema at the database already connected to.


addTables

private void addTables(java.sql.DatabaseMetaData dmd,
                       org.w3c.dom.Document doc,
                       java.lang.String schemaName,
                       org.w3c.dom.Element schemaTag)
                throws java.lang.Exception
Deprecated. 
Extract table metadata adding appropriate tags.


main

public static void main(java.lang.String[] args)
Deprecated. 

getPackageDir

private java.lang.String getPackageDir(java.lang.String javaPackage)
Deprecated. 
Returns the directory name classes should be stored in based on the Java package name received