|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enableit.db.darrt.AbstractFileHandler | +--org.enableit.db.darrt.AbstractSchemaHandler | +--org.enableit.db.darrt.SchemaExporter
Export database schemas as XML.
Note on ASA interpretation of DatabaseMetaData object: SchemaConstants.SCHEMA = users and groups.
Field Summary | |
static java.lang.String |
COL_TYPE
|
static java.lang.String |
FK
|
static java.lang.String |
FK_DATA_COL_NAME
|
static java.lang.String |
FK_DATA_COLUMN
|
static java.lang.String |
FK_DISPLAY_COL_NAME
|
static java.lang.String |
FK_DISPLAY_COLUMN
|
static java.lang.String |
FK_TABLE
|
static java.lang.String |
NULLABLE
|
static java.lang.String |
PK
|
Fields inherited from class org.enableit.db.darrt.AbstractFileHandler |
ABOUT |
Constructor Summary | |
SchemaExporter()
Default Constructor. |
Method Summary | |
org.w3c.dom.Document |
export(org.enableit.db.beans.Provider provider)
Export the schema identified by the Provider parameter. |
org.w3c.dom.Document |
export(java.lang.String dataSourceName)
Export the schema identified by the provided connection parameters. |
org.w3c.dom.Document |
export(java.lang.String driver,
java.lang.String url,
java.lang.String userid,
java.lang.String password)
Export the schema identified by the provided connection parameters. |
org.w3c.dom.Document |
exportToFile(org.enableit.db.beans.Provider provider,
int outputMode)
Export the schema identified by the Provider parameter
to a file. |
java.lang.String |
getFileName(org.enableit.db.beans.Provider provider)
Algorhythm is as follows: If set, use the filename provided. If set, use the name of the provider. Use data source name or URL within Provider
to infer a name that should be unique in most cases.
|
static void |
main(java.lang.String[] args)
|
void |
setFileName(java.lang.String fileName)
The name of the file to write schema to if exportToFile
invoked. |
void |
setSchemaName(java.lang.String targetSchema)
The name of the schema to be exported. |
void |
setTableTypes(java.lang.String tableTypes)
Set the table types to export. |
void |
setTableTypes(java.lang.String[] tableTypes)
An array of table types to be exported. |
Methods inherited from class org.enableit.db.darrt.AbstractSchemaHandler |
addListener, addListeners, diffSchemas, getDatabase, getDebug, getListeners, getOnlineRefSchema, getOnlineTargetSchema, getRefDatabase, getRefSchemaName, getRefSchemaUrl, getTablePattern, getTargetDatabase, getTargetSchemaUrl, setDebug, setOnlineRefSchema, setOnlineTargetSchema, setRefDatabase, setRefSchemaName, setRefSchemaUrl, setTablePattern, setTargetDatabase, setTargetSchemaUrl |
Methods inherited from class org.enableit.db.darrt.AbstractFileHandler |
getOperDir, setOperDir |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String COL_TYPE
public static final java.lang.String NULLABLE
public static final java.lang.String PK
public static final java.lang.String FK
public static final java.lang.String FK_TABLE
public static final java.lang.String FK_DATA_COLUMN
public static final java.lang.String FK_DATA_COL_NAME
public static final java.lang.String FK_DISPLAY_COLUMN
public static final java.lang.String FK_DISPLAY_COL_NAME
Constructor Detail |
public SchemaExporter()
Method Detail |
public void setFileName(java.lang.String fileName)
exportToFile
invoked.
If not specified the file will be named according to the logical
name contained in the Provider
parameter.
fileName
- to export to.public java.lang.String getFileName(org.enableit.db.beans.Provider provider)
Provider
to infer a name that should be unique in most cases.
public void setSchemaName(java.lang.String targetSchema)
If no schema is specified all will be exported.
public void setTableTypes(java.lang.String tableTypes)
public void setTableTypes(java.lang.String[] tableTypes)
Table types include such things as 'TABLE' and 'VIEW', though the exact list depends on the database vendor.
If no table types are specified all will be exported.
public org.w3c.dom.Document export(org.enableit.db.beans.Provider provider) throws DBException
Provider
parameter.
provider
- Encapsulation of the Data Source information.
DBException
public org.w3c.dom.Document export(java.lang.String driver, java.lang.String url, java.lang.String userid, java.lang.String password) throws DBException
DBException
public org.w3c.dom.Document export(java.lang.String dataSourceName) throws DBException
DBException
public org.w3c.dom.Document exportToFile(org.enableit.db.beans.Provider provider, int outputMode) throws DBException
Provider
parameter
to a file.
To control where the file is written call setOperDir
first.
provider
- Encapsulation of the Data Source information.outputMode
- Controls the number of files output.
Enumerated in SchemaConstants
. One of
OM_SINGLE_FILE, OM_SINGLE_FILE_AND_FILE_PER_TABLE,
OM_FILE_PER_TABLE.
DBException
public static void main(java.lang.String[] args)
args
- args[0] - tableName to turn into XML representation
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |