public class Export extends ExportAbstract
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
lobsFileName |
private java.lang.String |
outputFileName |
con, controlFileReader, entityName, exportResultSetForObject, exportWriteData, lobsInExtFile, schemaName, selectStatement
Modifier | Constructor and Description |
---|---|
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) |
Modifier and Type | Method and Description |
---|---|
private boolean |
dataFileExists(java.lang.String fileName)
Checks whether the data file exists .
|
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 |
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,
java.lang.String lobsFileName)
SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE 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.
|
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,
java.lang.String lobsFileName)
SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE system procedure from ij
or from a Java application invokes this method to perform
export of a table data to a file.
|
private boolean |
fileExists(java.io.File file)
Checks if the specified file exists.
|
protected ExportWriteDataAbstract |
getExportWriteData()
For internal use only
|
private boolean |
lobsFileExists(java.lang.String fileName)
Checks whether the lobs file exists .
|
private void |
setLobsExtFileName(java.lang.String lobsFileName)
Set the file name to which larg object data has to be exported, and
also set flag to indicate that large objects are exported to a
different file.
|
doAllTheWork, getControlFileReader, resultSetForEntity, stringifyObject
private java.lang.String outputFileName
private java.lang.String lobsFileName
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
java.sql.SQLException
private void doExport() throws java.sql.SQLException
java.sql.SQLException
private void setLobsExtFileName(java.lang.String lobsFileName) throws java.sql.SQLException
lobsFileName
- the file to to which lob data has to be exported.java.sql.SQLException
- if file name is null.private boolean lobsFileExists(java.lang.String fileName) throws java.sql.SQLException
fileName
- the file to to which lob data has to be exported.java.sql.SQLException
- if file name is null.private boolean dataFileExists(java.lang.String fileName) throws java.sql.SQLException
fileName
- the file to to which lob data has to be exported.java.sql.SQLException
- if file name is null.private final boolean fileExists(java.io.File file)
file
- the file to checktrue
if the file exists, false
if not.java.lang.SecurityException
- if the required privileges are missingpublic 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
con
- The Derby 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.columnDelimeter
- Delimiter that seperates columns in the output filecharacterDelimeter
- Delimiter that is used to quoate non-numeric typescodeset
- Codeset that should be used to write the data to the filejava.sql.SQLException
- on errorspublic 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, java.lang.String lobsFileName) throws java.sql.SQLException
con
- The Derby 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.columnDelimeter
- Delimiter that seperates columns
in the output file.characterDelimeter
- Delimiter that is used to quote
non-numeric types.codeset
- Codeset that should be used to
write the data to the file/lobsFileName
- Name of the file to which large object
data has to be exported.java.sql.SQLException
- on errorspublic 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
con
- The Derby 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.columnDelimeter
- Delimiter that seperates columns in the output filecharacterDelimeter
- Delimiter that is used to quiote non-numeric typescodeset
- Codeset that should be used to write the data to the filejava.sql.SQLException
- on errorspublic 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, java.lang.String lobsFileName) throws java.sql.SQLException
con
- The Derby 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.columnDelimeter
- Delimiter that seperates columns in
the output filecharacterDelimeter
- Delimiter that is used to quote
non-numeric typescodeset
- Codeset that should be used to write the data to the filelobsFileName
- Name of the file to which
large object data has to be exported.java.sql.SQLException
- on errorsprotected ExportWriteDataAbstract getExportWriteData() throws java.lang.Exception
getExportWriteData
in class ExportAbstract
java.lang.Exception
- if there is an errorApache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.