org.apache.derby.impl.load
Class Export
java.lang.Object
org.apache.derby.impl.load.ExportAbstract
org.apache.derby.impl.load.Export
- public class Export
- extends ExportAbstract
This class provides ways to export data from
a table or a view into a file. Export functions provided
in this class are called through Systement Procedures.
Constructor Summary |
private |
Export(java.sql.Connection con,
java.lang.String schemaName,
java.lang.String tableName,
java.lang.String selectStatement,
java.lang.String outputFileName,
java.lang.String characterDelimeter,
java.lang.String columnDelimeter,
java.lang.String codeset)
|
Method Summary |
protected void |
doAllTheWork()
|
private void |
doExport()
|
static void |
exportQuery(java.sql.Connection con,
java.lang.String selectStatement,
java.lang.String outputFileName,
java.lang.String columnDelimeter,
java.lang.String characterDelimeter,
java.lang.String codeset)
SYSCS_EXPORT_QUERY system Procedure from ij or from a Java application
invokes this method to perform export of the data retrieved by select statement to a file. |
static void |
exportTable(java.sql.Connection con,
java.lang.String schemaName,
java.lang.String tableName,
java.lang.String outputFileName,
java.lang.String columnDelimeter,
java.lang.String characterDelimeter,
java.lang.String codeset)
SYSCS_EXPORT_TABLE system Procedure from ij or from a Java application
invokes this method to perform export of a table data to a file. |
protected ControlInfo |
getControlFileReader()
|
protected ExportWriteDataAbstract |
getExportWriteData()
For internal use only |
java.lang.String[] |
getOneRowAtATime(java.sql.ResultSet rs)
|
protected java.sql.ResultSet |
resultSetForEntity()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
outputFileName
private java.lang.String outputFileName
controlFileReader
protected ControlInfo controlFileReader
exportResultSetForObject
protected ExportResultSetForObject exportResultSetForObject
exportWriteData
protected ExportWriteDataAbstract exportWriteData
con
protected java.sql.Connection con
entityName
protected java.lang.String entityName
schemaName
protected java.lang.String schemaName
selectStatement
protected java.lang.String selectStatement
Export
private Export(java.sql.Connection con,
java.lang.String schemaName,
java.lang.String tableName,
java.lang.String selectStatement,
java.lang.String outputFileName,
java.lang.String characterDelimeter,
java.lang.String columnDelimeter,
java.lang.String codeset)
throws java.sql.SQLException
doExport
private void doExport()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
exportTable
public static void exportTable(java.sql.Connection con,
java.lang.String schemaName,
java.lang.String tableName,
java.lang.String outputFileName,
java.lang.String columnDelimeter,
java.lang.String characterDelimeter,
java.lang.String codeset)
throws java.sql.SQLException
- SYSCS_EXPORT_TABLE system Procedure from ij or from a Java application
invokes this method to perform export of a table data to a file.
- Parameters:
con
- The Cloudscape database connection URL for the database containing the tableschemaName
- schema name of the table data is being exported fromtableName
- Name of the Table from which data has to be exported.outputFileName
- Name of the file to which data has to be exported.codeset
- Codeset that should be used to write the data to the file
- Throws:
SQL
- Exception on errors
java.sql.SQLException
exportQuery
public static void exportQuery(java.sql.Connection con,
java.lang.String selectStatement,
java.lang.String outputFileName,
java.lang.String columnDelimeter,
java.lang.String characterDelimeter,
java.lang.String codeset)
throws java.sql.SQLException
- SYSCS_EXPORT_QUERY system Procedure from ij or from a Java application
invokes this method to perform export of the data retrieved by select statement to a file.
- Parameters:
con
- The Cloudscape database connection URL for the database containing the tableselectStatement
- select query that is used to export the dataoutputFileName
- Name of the file to which data has to be exported.codeset
- Codeset that should be used to write the data to the file
- Throws:
SQL
- Exception on errors
java.sql.SQLException
getExportWriteData
protected ExportWriteDataAbstract getExportWriteData()
throws java.lang.Exception
- For internal use only
- Specified by:
getExportWriteData
in class ExportAbstract
- Throws:
java.lang.Exception
- if there is an error
resultSetForEntity
protected java.sql.ResultSet resultSetForEntity()
throws java.lang.Exception
- Throws:
java.lang.Exception
getOneRowAtATime
public java.lang.String[] getOneRowAtATime(java.sql.ResultSet rs)
throws java.lang.Exception
- Throws:
java.lang.Exception
getControlFileReader
protected ControlInfo getControlFileReader()
doAllTheWork
protected void doAllTheWork()
throws java.lang.Exception
- Throws:
java.lang.Exception
Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.