public abstract class ImportAdapter
extends java.lang.Object
implements java.util.Iterator<java.lang.String[]>
ImportConfiguration.| Modifier and Type | Field and Description |
|---|---|
protected DataType<?>[] |
dataTypes
Array of datatypes describing the columns.
|
protected java.lang.String[] |
header
The header.
|
protected int[] |
indexes
Indexes of columns that should be imported
This keeps track of columns that should be imported, as not all columns
will necessarily be imported.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ImportAdapter(ImportConfiguration config)
Creates a new instance of this object with given configuration.
|
| Modifier and Type | Method and Description |
|---|---|
static ImportAdapter |
create(ImportConfiguration config)
Factory method
This will return an appropriate ImportAdapter for each implemented data
source
ImportAdapter. |
protected DataType<?>[] |
getColumnDatatypes()
Returns an array with datatypes of columns that should be imported.
|
ImportConfiguration |
getConfig()
Returns the configuration used by the import adapter.
|
java.lang.String[] |
getHeader()
Returns the header.
|
java.lang.Integer |
getLength()
Returns the number of records, if available, null otherwise
|
abstract int |
getProgress()
Returns the percentage of data has has already been imported.
|
protected java.lang.String[] header
protected DataType<?>[] dataTypes
protected int[] indexes
protected ImportAdapter(ImportConfiguration config)
config - configpublic static ImportAdapter create(ImportConfiguration config) throws java.io.IOException
ImportAdapter. Refer to the specific ImportAdapter itself
for details.config - configjava.io.IOExceptionpublic ImportConfiguration getConfig()
configpublic java.lang.String[] getHeader()
public java.lang.Integer getLength()
public abstract int getProgress()
protected DataType<?>[] getColumnDatatypes()