net.sourceforge.jdbcimporter
Class ImportEntityDef

java.lang.Object
  extended bynet.sourceforge.jdbcimporter.EntityDef
      extended bynet.sourceforge.jdbcimporter.ImportEntityDef

public class ImportEntityDef
extends EntityDef

The ImportEntityDef class defines an entity (table) to be imported. This definition includes:

Version:
0.6
Author:
Chris Nagy

Field Summary
 
Fields inherited from class net.sourceforge.jdbcimporter.EntityDef
columns
 
Constructor Summary
ImportEntityDef()
           
 
Method Summary
 void addColumn(ColumnDef columnDef)
          Adds a column definition.
 BinaryDelimiterParser getBinaryDelimiterParser()
          Returns the binary delimiter parser used to parse the input file.
 ImportColumnDef[] getColumns()
          Returns the list of columns that will be imported
 DelimiterParser getDelimiterParser()
          Returns the delimiter parser used to parse the input file
 ImportEngine getImportEngine()
          Returns the import engine to use when importing data for this entity.
 int getNumBytesToSkip()
          Returns the number of bytes to skip before passing to the reader to the delimiter parser.
 RowTranslator getRowTranslator()
          Returns the row translator.
 java.io.File getSource()
          Returns the file containing the data to import.
 java.lang.String getSourceEncoding()
          Returns the file's encoding of the import data (may be null).
 boolean hasColumnsToGenerate()
          Returns true if some column's values need to be generated.
 void setBinaryDelimiterParser(BinaryDelimiterParser newBinaryParser)
          Sets the binary delimiter parser used to parse the input file into rows and columns to be imported into the database.
 void setDelimiterParser(DelimiterParser newParser)
          Sets the delimiter parser used to parse the input file into rows and columns to be imported into the database.
 void setImportEngine(ImportEngine engine)
          Sets the import engine to use when importing data for this entity.
 void setNumBytesToSkip(int numBytes)
          Sets the number of bytes to skip before passing the reader to the delimiter parser.
 void setRowTranslator(RowTranslator rowTranslator)
          Sets the row translator.
 void setSource(java.io.File newSource)
          Sets the source of the import data.
 void setSourceEncoding(java.lang.String newSourceEncoding)
          Sets the source file's encoding of the import data.
 java.lang.String toString()
          Overrides Object.toString()
 
Methods inherited from class net.sourceforge.jdbcimporter.EntityDef
addProperty, getCatalog, getColumnCount, getColumnIterator, getProperty, getSchema, getTable, setCatalog, setSchema, setTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImportEntityDef

public ImportEntityDef()
Method Detail

addColumn

public void addColumn(ColumnDef columnDef)
Adds a column definition.

Overrides:
addColumn in class EntityDef
Parameters:
columnDef - the definition of the column

setSource

public void setSource(java.io.File newSource)
Sets the source of the import data.

Parameters:
newSource - the file containing the data to import.

getSource

public java.io.File getSource()
Returns the file containing the data to import.

Returns:
import file

setSourceEncoding

public void setSourceEncoding(java.lang.String newSourceEncoding)
Sets the source file's encoding of the import data.

Parameters:
newSourceEncoding - the encoding of the file.
Since:
0.71

getSourceEncoding

public java.lang.String getSourceEncoding()
Returns the file's encoding of the import data (may be null).

Returns:
encoding
Since:
0.71

setDelimiterParser

public void setDelimiterParser(DelimiterParser newParser)
Sets the delimiter parser used to parse the input file into rows and columns to be imported into the database.

Parameters:
newParser - the delimiter parser

getDelimiterParser

public DelimiterParser getDelimiterParser()
Returns the delimiter parser used to parse the input file

Returns:
delimiter parser

setBinaryDelimiterParser

public void setBinaryDelimiterParser(BinaryDelimiterParser newBinaryParser)
Sets the binary delimiter parser used to parse the input file into rows and columns to be imported into the database.

Parameters:
newBinaryParser - the binary delimiter parser
Since:
0.74

getBinaryDelimiterParser

public BinaryDelimiterParser getBinaryDelimiterParser()
Returns the binary delimiter parser used to parse the input file.

Returns:
binary delimiter parser
Since:
0.74

setNumBytesToSkip

public void setNumBytesToSkip(int numBytes)
Sets the number of bytes to skip before passing the reader to the delimiter parser.

Parameters:
numBytes - The number of bytes
Since:
0.72

getNumBytesToSkip

public int getNumBytesToSkip()
Returns the number of bytes to skip before passing to the reader to the delimiter parser.

Returns:
The number of bytes
Since:
0.72

setRowTranslator

public void setRowTranslator(RowTranslator rowTranslator)
Sets the row translator.

Parameters:
rowTranslator - row translator
Since:
0.72

getRowTranslator

public RowTranslator getRowTranslator()
Returns the row translator.

Returns:
row translator
Since:
0.72

setImportEngine

public void setImportEngine(ImportEngine engine)
Sets the import engine to use when importing data for this entity.

Parameters:
engine - the import engine

getImportEngine

public ImportEngine getImportEngine()
Returns the import engine to use when importing data for this entity.

Returns:
the import engine

getColumns

public ImportColumnDef[] getColumns()
Returns the list of columns that will be imported

Returns:
list of column definitions

hasColumnsToGenerate

public boolean hasColumnsToGenerate()
Returns true if some column's values need to be generated.

Returns:
true if some column's values need to be generated
Since:
0.7

toString

public java.lang.String toString()
Overrides Object.toString()