org.apache.derby.impl.load
Class ExportAbstract

java.lang.Object
  extended by org.apache.derby.impl.load.ExportAbstract
Direct Known Subclasses:
Export

abstract class ExportAbstract
extends java.lang.Object


Field Summary
protected  java.sql.Connection con
           
protected  ControlInfo controlFileReader
           
protected  java.lang.String entityName
           
protected  ExportResultSetForObject exportResultSetForObject
           
protected  ExportWriteDataAbstract exportWriteData
           
protected  boolean lobsInExtFile
           
protected  java.lang.String schemaName
           
protected  java.lang.String selectStatement
           
 
Constructor Summary
ExportAbstract()
           
 
Method Summary
protected  void doAllTheWork()
           
protected  ControlInfo getControlFileReader()
           
protected abstract  ExportWriteDataAbstract getExportWriteData()
           
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.ResultSet resultSetForEntity()
           
static java.lang.String stringifyObject(java.lang.Object udt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

ExportAbstract

ExportAbstract()
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.Exception
convert 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

Built on Thu 2012-03-29 21:53:33+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.