|
|||||||||
| Home >> All >> org >> apache >> derby >> impl >> [ load overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derby.impl.load
Class Import

java.lang.Objectorg.apache.derby.vti.VTITemplate
org.apache.derby.impl.load.ImportAbstract
org.apache.derby.impl.load.Import
- All Implemented Interfaces:
- java.sql.ResultSet
- public class Import
- extends ImportAbstract
This class implements import of data from a URL into a table. Import functions provided here in this class shouble be called through Systement Procedures. Import uses VTI , which is supprted only through Systemem procedures mechanism.
| Field Summary | |
protected static java.lang.String |
COLUMNNAMEPREFIX
|
protected java.lang.String[] |
columnNames
|
protected int[] |
columnWidths
|
protected ControlInfo |
controlFileReader
|
protected ImportReadData |
importReadData
|
protected java.sql.ResultSetMetaData |
importResultSetMetaData
|
private java.lang.String |
inputFileName
|
protected java.lang.String[] |
nextRow
|
protected int |
noOfColumnsExpected
|
protected int |
numberOfColumns
|
| Fields inherited from interface java.sql.ResultSet |
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE |
| Constructor Summary | |
Import(java.lang.String inputFileName,
java.lang.String columnDelimiter,
java.lang.String characterDelimiter,
java.lang.String codeset,
int noOfColumnsExpected)
Constructior to Invoke Import from a select statement |
|
| Method Summary | |
void |
close()
closes the resultset |
protected void |
doAllTheWork()
Does all the work |
private void |
doImport()
|
protected ImportReadData |
getImportReadData()
virtual method from the abstract class |
java.sql.ResultSetMetaData |
getMetaData()
Gets the resultset meta data |
int |
getRow()
gets the next row |
java.lang.String |
getString(int columnIndex)
This method returns the value of the specified column as a Java String. |
static void |
importData(java.sql.Connection connection,
java.lang.String schemaName,
java.lang.String tableName,
java.lang.String insertColumnList,
java.lang.String columnIndexes,
java.lang.String inputFileName,
java.lang.String columnDelimiter,
java.lang.String characterDelimiter,
java.lang.String codeset,
short replace)
SYSCS_IMPORT_DATA system Procedure from ij or from a Java application invokes this method to perform import to a table from a file. |
static void |
importTable(java.sql.Connection connection,
java.lang.String schemaName,
java.lang.String tableName,
java.lang.String inputFileName,
java.lang.String columnDelimiter,
java.lang.String characterDelimiter,
java.lang.String codeset,
short replace)
SYSCS_IMPORT_TABLE system Procedure from ij or from a Java application invokes this method to perform import to a table from a file. |
protected void |
loadColumnNames()
|
boolean |
next()
This method advances to the next row in the result set. |
private static void |
performImport(java.sql.Connection connection,
java.lang.String schemaName,
java.lang.String insertColumnList,
java.lang.String columnIndexes,
java.lang.String tableName,
java.lang.String inputFileName,
java.lang.String columnDelimiter,
java.lang.String characterDelimiter,
java.lang.String codeset,
short replace)
|
boolean |
wasNull()
This method tests whether the value of the last column that was fetched was actually a SQL NULL value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
inputFileName
private java.lang.String inputFileName
controlFileReader
protected ControlInfo controlFileReader
importReadData
protected ImportReadData importReadData
columnNames
protected java.lang.String[] columnNames
numberOfColumns
protected int numberOfColumns
columnWidths
protected int[] columnWidths
nextRow
protected java.lang.String[] nextRow
importResultSetMetaData
protected java.sql.ResultSetMetaData importResultSetMetaData
noOfColumnsExpected
protected int noOfColumnsExpected
COLUMNNAMEPREFIX
protected static final java.lang.String COLUMNNAMEPREFIX
- See Also:
- Constant Field Values
| Constructor Detail |
Import
public Import(java.lang.String inputFileName, java.lang.String columnDelimiter, java.lang.String characterDelimiter, java.lang.String codeset, int noOfColumnsExpected) throws java.sql.SQLException
- Constructior to Invoke Import from a select statement
| Method Detail |
doImport
private void doImport()
throws java.lang.Exception
importTable
public static void importTable(java.sql.Connection connection, java.lang.String schemaName, java.lang.String tableName, java.lang.String inputFileName, java.lang.String columnDelimiter, java.lang.String characterDelimiter, java.lang.String codeset, short replace) throws java.sql.SQLException
- SYSCS_IMPORT_TABLE system Procedure from ij or from a Java application
invokes this method to perform import to a table from a file.
importData
public static void importData(java.sql.Connection connection, java.lang.String schemaName, java.lang.String tableName, java.lang.String insertColumnList, java.lang.String columnIndexes, java.lang.String inputFileName, java.lang.String columnDelimiter, java.lang.String characterDelimiter, java.lang.String codeset, short replace) throws java.sql.SQLException
- SYSCS_IMPORT_DATA system Procedure from ij or from a Java application
invokes this method to perform import to a table from a file.
performImport
private static void performImport(java.sql.Connection connection, java.lang.String schemaName, java.lang.String insertColumnList, java.lang.String columnIndexes, java.lang.String tableName, java.lang.String inputFileName, java.lang.String columnDelimiter, java.lang.String characterDelimiter, java.lang.String codeset, short replace) throws java.sql.SQLException
getImportReadData
protected ImportReadData getImportReadData() throws java.lang.Exception
- virtual method from the abstract class
- Specified by:
getImportReadDatain classImportAbstract
doAllTheWork
protected void doAllTheWork()
throws java.lang.Exception
- Does all the work
loadColumnNames
protected void loadColumnNames()
getMetaData
public java.sql.ResultSetMetaData getMetaData()
- Gets the resultset meta data
getRow
public int getRow()
throws java.sql.SQLException
- gets the next row
next
public boolean next()
throws java.sql.SQLException
- Description copied from interface:
java.sql.ResultSet - This method advances to the next row in the result set. Any streams
open on the current row are closed automatically.
close
public void close()
throws java.sql.SQLException
- closes the resultset
wasNull
public boolean wasNull()
- Description copied from interface:
java.sql.ResultSet - This method tests whether the value of the last column that was fetched
was actually a SQL NULL value.
getString
public java.lang.String getString(int columnIndex) throws java.sql.SQLException
- Description copied from interface:
java.sql.ResultSet - This method returns the value of the specified column as a Java
String.
|
|||||||||
| Home >> All >> org >> apache >> derby >> impl >> [ load overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC