|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jdbcimporter.engine.BasicEngine
The BasicEngine class implements the ImportEngine interface to provide basic import capability. The BasicEngine simply tries to insert the row into the current table. The following SQL Types are supported:
Field Summary | |
protected static org.apache.commons.logging.Log |
LOG
The log for debug information. |
Fields inherited from interface net.sourceforge.jdbcimporter.ImportEngine |
BATCH_SUCCESS_ROWS_UNKNOWN |
Constructor Summary | |
BasicEngine()
|
Method Summary | |
void |
cleanup()
Cleans up any resources that the import engine used to import data for the current entity definition. |
void |
executeBatch()
Call executeBatch on the allocated statements. |
java.sql.Connection |
getConnection()
Returns the database connection to use for importing the row. |
void |
importRow(ColumnValue[] values)
Imports the given set of values as a row into the database |
void |
init()
Initializes the import engine with the current entity definition. |
void |
setBatchMode(boolean flag)
Sets whether the import will use batch mode. |
void |
setConnection(java.sql.Connection con)
Sets the database connection to use for importing the row. |
void |
setEntityDef(ImportEntityDef newEntityDef)
Sets the entity definition to use for importing the row |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static org.apache.commons.logging.Log LOG
Constructor Detail |
public BasicEngine()
Method Detail |
public void setConnection(java.sql.Connection con)
ImportEngine
setConnection
in interface ImportEngine
con
- database connectionImportEngine.setConnection(Connection)
public java.sql.Connection getConnection()
ImportEngine
getConnection
in interface ImportEngine
ImportEngine.getConnection()
public void setEntityDef(ImportEntityDef newEntityDef)
ImportEngine
setEntityDef
in interface ImportEngine
newEntityDef
- entity definitionImportEngine.setEntityDef(ImportEntityDef)
public void init() throws java.sql.SQLException
ImportEngine
init
in interface ImportEngine
java.sql.SQLException
- if a database error occurs during initializationImportEngine.init()
public void cleanup() throws java.sql.SQLException
ImportEngine
cleanup
in interface ImportEngine
java.sql.SQLException
- if a database error occurs during cleanupImportEngine.cleanup()
public void importRow(ColumnValue[] values) throws java.sql.SQLException, MalformedDataException
ImportEngine
importRow
in interface ImportEngine
values
- the column values for the row
java.sql.SQLException
- if a database error occurs during the import
MalformedDataException
ImportEngine.importRow(ColumnValue[])
public void setBatchMode(boolean flag)
ImportEngine
setBatchMode
in interface ImportEngine
flag
- true if the import will use batch modeImportEngine.setBatchMode(boolean)
public void executeBatch() throws java.sql.BatchUpdateException
ImportEngine
executeBatch
in interface ImportEngine
java.sql.BatchUpdateException
- If not all rows were imported then throw a BatchUpdateExceptionImportEngine.executeBatch()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |