org.cementj.database
Class DbExporter

java.lang.Object
  extended by org.cementj.database.DbExporter

public class DbExporter
extends java.lang.Object

Class to export and import data from a relational database using any JDBC driver.

Author:
Derek C. Ashmore

Field Summary
static java.lang.String DEFAULT_DELIMITER
           
static java.text.SimpleDateFormat TIMESTAMP_FORMAT
           
 
Constructor Summary
DbExporter()
           
 
Method Summary
 void exportFile(java.lang.String fileName)
          Exports a file to delimited text.
 java.lang.String getDelimiter()
          Delimiter used in export file.
 java.sql.Connection getExportConnection()
          Connection used for the export operation.
 java.lang.String getExportTableName()
          Table name used for export.
 java.sql.Connection getImportConnection()
          Connection used for Import operation.
 java.lang.String getImportTableName()
          Table name used for import.
 void importFile(java.lang.String fileName)
          Imports a file from delimited text.
static void main(java.lang.String[] args)
           
 void setDelimiter(java.lang.String string)
          Delimiter used in export file.
 void setExportConnection(java.sql.Connection connection)
          Connection used for the export operation.
 void setExportTableName(java.lang.String string)
          Table name used for export.
 void setImportConnection(java.sql.Connection connection)
          Connection used for Import operation.
 void setImportTableName(java.lang.String string)
          Table name used for import.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DELIMITER

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

TIMESTAMP_FORMAT

public static final java.text.SimpleDateFormat TIMESTAMP_FORMAT
Constructor Detail

DbExporter

public DbExporter()
Method Detail

exportFile

public void exportFile(java.lang.String fileName)
Exports a file to delimited text.

Parameters:
fileName -

importFile

public void importFile(java.lang.String fileName)
Imports a file from delimited text.

Parameters:
fileName -

main

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

getExportConnection

public java.sql.Connection getExportConnection()
Connection used for the export operation.

Returns:

getExportTableName

public java.lang.String getExportTableName()
Table name used for export.

Returns:

getImportConnection

public java.sql.Connection getImportConnection()
Connection used for Import operation.

Returns:

getImportTableName

public java.lang.String getImportTableName()
Table name used for import.

Returns:

setExportConnection

public void setExportConnection(java.sql.Connection connection)
Connection used for the export operation.

Parameters:
connection -

setExportTableName

public void setExportTableName(java.lang.String string)
Table name used for export.

Parameters:
string -

setImportConnection

public void setImportConnection(java.sql.Connection connection)
Connection used for Import operation.

Parameters:
connection -

setImportTableName

public void setImportTableName(java.lang.String string)
Table name used for import.

Parameters:
string -

getDelimiter

public java.lang.String getDelimiter()
Delimiter used in export file.

Returns:

setDelimiter

public void setDelimiter(java.lang.String string)
Delimiter used in export file.

Parameters:
string -


Copyright © 2003 Delta Vortex Technologies, Inc. All Rights Reserved.