net.sourceforge.jdbcimporter
Class ImportDef

java.lang.Object
  extended bynet.sourceforge.jdbcimporter.ImportDef

public class ImportDef
extends java.lang.Object

The ImportDef class defines a set of entities to import into a given database. This definition includes:

Version:
0.6
Author:
Chris Nagy

Constructor Summary
ImportDef()
           
 
Method Summary
 void addEntity(ImportEntityDef newEntity)
          Adds an entity definition into the set that is imported.
 java.io.File getBadFile()
          Returns the log file to write bad data.
 int getBatchCount()
          Returns the number of rows to import before calling executeBatch.
 int getCommitCount()
          Returns the number of rows to import before committing.
 ConnectionDef getConnectionDef()
          Returns to the connection definition.
 ImportEntityDef[] getEntities()
          Returns the set of entity definitions to import.
 java.io.File getLogFile()
          Returns the log file to write log messages.
 java.io.File getPostSQLFile()
          Returns the file containing the sql statements that will be executed after the import.
 java.io.File getPreSQLFile()
          Returns the file containing the sql statements that will be executed before the import.
 boolean isTrimValues()
          Returns whether values should be trimmed after reading them from the delimiter parser.
 void setBadFile(java.io.File newFile)
          Sets the log file to write bad data.
 void setBatchCount(int count)
          Sets the number of rows to import before calling executeBatch.
 void setCommitCount(int count)
          Sets the number of rows to import before committing.
 void setConnectionDef(ConnectionDef newDef)
          Sets the connection definition.
 void setLogFile(java.io.File newFile)
          Sets the log file to write log messages.
 void setPostSQLFile(java.io.File newFile)
          Sets the file containing the sql statements that will be executed after the import.
 void setPreSQLFile(java.io.File newFile)
          Sets the file containing the sql statements that will be executed before the import.
 void setTrimValues(boolean trimValues)
          Sets the flag indicating whether values should be trimmed after reading them from the delimiter parser.
 java.lang.String toString()
          Overrides Object.toString()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImportDef

public ImportDef()
Method Detail

setConnectionDef

public void setConnectionDef(ConnectionDef newDef)
Sets the connection definition.

Parameters:
newDef - definition of connection

getConnectionDef

public ConnectionDef getConnectionDef()
Returns to the connection definition.

Returns:
definition of connection

setLogFile

public void setLogFile(java.io.File newFile)
Sets the log file to write log messages.

Parameters:
newFile - log file

getLogFile

public java.io.File getLogFile()
Returns the log file to write log messages.

Returns:
log file

setBadFile

public void setBadFile(java.io.File newFile)
Sets the log file to write bad data.

Parameters:
newFile - log file

getBadFile

public java.io.File getBadFile()
Returns the log file to write bad data.

Returns:
log file

setPostSQLFile

public void setPostSQLFile(java.io.File newFile)
Sets the file containing the sql statements that will be executed after the import. The sql statements inside the file should be separated by the semi-colon character.

Parameters:
newFile - the file
Since:
0.67

getPostSQLFile

public java.io.File getPostSQLFile()
Returns the file containing the sql statements that will be executed after the import.

Returns:
the file
Since:
0.67

setPreSQLFile

public void setPreSQLFile(java.io.File newFile)
Sets the file containing the sql statements that will be executed before the import. The sql statements inside the file should be separated by the semi-colon character.

Parameters:
newFile - The preSQLFile to set.
Since:
0.67

getPreSQLFile

public java.io.File getPreSQLFile()
Returns the file containing the sql statements that will be executed before the import.

Returns:
the file
Since:
0.67

isTrimValues

public boolean isTrimValues()
Returns whether values should be trimmed after reading them from the delimiter parser.

Returns:
flag
Since:
0.67

setTrimValues

public void setTrimValues(boolean trimValues)
Sets the flag indicating whether values should be trimmed after reading them from the delimiter parser.

Parameters:
trimValues - flag.
Since:
0.67

addEntity

public void addEntity(ImportEntityDef newEntity)
Adds an entity definition into the set that is imported.

Parameters:
newEntity - entity definition to be added

getEntities

public ImportEntityDef[] getEntities()
Returns the set of entity definitions to import.

Returns:
set of entity definitions

setCommitCount

public void setCommitCount(int count)
Sets the number of rows to import before committing. The default is one.

Parameters:
count - the number of rows

getCommitCount

public int getCommitCount()
Returns the number of rows to import before committing.

Returns:
the number of rows

setBatchCount

public void setBatchCount(int count)
Sets the number of rows to import before calling executeBatch. The default is one.

Parameters:
count - the number of rows

getBatchCount

public int getBatchCount()
Returns the number of rows to import before calling executeBatch.

Returns:
the number of rows

toString

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