public class Import
extends com.pivotal.gemfirexd.internal.impl.load.ImportBase
ResultSet, so users can
override/transform the individual columns or rows being returned from the
import procedure. Use the ImportBase.getColumnType(int) method to get the
actual type of a column (ImportBase.getMetaData() will only return
binary/lob/string/udt types). The ImportBase.getCurrentRow() method will return
the whole row as an array of strings while ImportBase.getCurrentLineNumber()
returns the current line number (latter can be useful for error messages). To
override individual columns, one or more of the following methods can be
overridden:
ResultSet.getBytes(int): for BINARY types; data is normally
serialized as a hex string
ResultSet.getBlob(int): for BLOB data types; note that if the LOBs
are in an external file (IMPORT_XXX_LOBS_FROM_EXTFILE procedure), then an
override may need to take care of reading from that external file
ResultSet.getClob(int): for CLOB data types; note that if the LOBs
are in an external file (IMPORT_XXX_LOBS_FROM_EXTFILE procedure), then an
override may need to take care of reading from that external file
ResultSet.getObject(int): for user-defined types; data is normally
serialized as hex string, so typically implementations will invoke
ResultSet.getBytes(int) to get the bytes and then deserialize it
ResultSet.getString(int): for all other data types the string read
from the file is returned
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
lobsInExtFile |
protected boolean |
wasNull |
| Constructor and Description |
|---|
Import(java.lang.String inputFileName,
java.lang.String columnDelimiter,
java.lang.String characterDelimiter,
java.lang.String codeset,
long offset,
long endPosition,
boolean hasColumnDefinitionInFile,
int noOfColumnsExpected,
java.lang.String columnTypes,
boolean lobsInExtFile,
int importCounter,
java.lang.String columnTypeNames,
java.lang.String udtClassNamesString)
Constructor to invoke Import from a select statement.
|
Import(java.lang.String inputFileName,
java.lang.String columnDelimiter,
java.lang.String characterDelimiter,
java.lang.String codeset,
long offset,
long endPosition,
int noOfColumnsExpected,
java.lang.String columnTypes,
boolean lobsInExtFile,
int importCounter,
java.lang.String columnTypeNames,
java.lang.String udtClassNamesString)
Constructor to invoke Import from a select statement.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
destringifyObject(java.lang.String arg0) |
static java.lang.Object |
readObject(byte[] arg0) |
arrayToString, getColumnType, getCurrentRow, importData, importTableabsolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getCharacterStream, getCharacterStream, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getHoldability, getInt, getInt, getLong, getLong, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getStatement, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, isWrapperFor, last, moveToCurrentRow, moveToInsertRow, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, unwrap, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamppublic Import(java.lang.String inputFileName,
java.lang.String columnDelimiter,
java.lang.String characterDelimiter,
java.lang.String codeset,
long offset,
long endPosition,
int noOfColumnsExpected,
java.lang.String columnTypes,
boolean lobsInExtFile,
int importCounter,
java.lang.String columnTypeNames,
java.lang.String udtClassNamesString)
throws java.sql.SQLException
java.sql.SQLExceptionpublic Import(java.lang.String inputFileName,
java.lang.String columnDelimiter,
java.lang.String characterDelimiter,
java.lang.String codeset,
long offset,
long endPosition,
boolean hasColumnDefinitionInFile,
int noOfColumnsExpected,
java.lang.String columnTypes,
boolean lobsInExtFile,
int importCounter,
java.lang.String columnTypeNames,
java.lang.String udtClassNamesString)
throws java.sql.SQLException
java.sql.SQLExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.