Package org.apache.derby.impl.load
Class ExportAbstract
- java.lang.Object
-
- org.apache.derby.impl.load.ExportAbstract
-
- Direct Known Subclasses:
Export
abstract class ExportAbstract extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected java.sql.Connectionconprotected ControlInfocontrolFileReaderprotected java.lang.StringentityNameprotected ExportResultSetForObjectexportResultSetForObjectprotected ExportWriteDataAbstractexportWriteDataprotected booleanlobsInExtFileprotected java.lang.StringschemaNameprotected java.lang.StringselectStatement
-
Constructor Summary
Constructors Constructor Description ExportAbstract()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voiddoAllTheWork()protected ControlInfogetControlFileReader()protected abstract ExportWriteDataAbstractgetExportWriteData()private java.lang.String[]getOneRowAtATime(java.sql.ResultSet rs, boolean[] isLargeBinary, boolean[] isLargeChar)convert resultset data for the current row to string array.protected java.sql.ResultSetresultSetForEntity()static java.lang.StringstringifyObject(java.lang.Object udt)
-
-
-
Field Detail
-
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
-
lobsInExtFile
protected boolean lobsInExtFile
-
-
Method Detail
-
resultSetForEntity
protected java.sql.ResultSet resultSetForEntity() throws java.lang.Exception- Throws:
java.lang.Exception
-
getOneRowAtATime
private java.lang.String[] getOneRowAtATime(java.sql.ResultSet rs, boolean[] isLargeBinary, boolean[] isLargeChar) throws java.lang.Exceptionconvert resultset data for the current row to string array. If large objects are being exported to an external file, then write the lob data into the external file and store the lob data location in the string array for that column.- Parameters:
rs- resultset that contains the data to export.isLargeBinary- boolean array, whose elements will be true, if the column type is blob/or other large binary type, otherwise false.isLargeChar- boolean array, whose elements will be true, if the column type is clob/ other large char type, otherwise false.- Returns:
- A string array of the row data to write to export file.
- Throws:
java.lang.Exception- if any errors during conversion.
-
stringifyObject
public static java.lang.String stringifyObject(java.lang.Object udt) throws java.lang.Exception- Throws:
java.lang.Exception
-
getControlFileReader
protected ControlInfo getControlFileReader()
-
getExportWriteData
protected abstract ExportWriteDataAbstract getExportWriteData() throws java.lang.Exception
- Throws:
java.lang.Exception
-
doAllTheWork
protected void doAllTheWork() throws java.lang.Exception- Throws:
java.lang.Exception
-
-