|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The ImportEngine defines the methods needed to import a row into a database.
Field Summary | |
static int |
BATCH_SUCCESS_ROWS_UNKNOWN
Static variable that is equal to constant java.sql.Statement.SUCCESS_NO_INFO (from jdk1.4) |
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 entityDef)
Sets the entity definition to use for importing the row |
Field Detail |
public static final int BATCH_SUCCESS_ROWS_UNKNOWN
Method Detail |
public void setConnection(java.sql.Connection con)
con
- database connectionpublic java.sql.Connection getConnection()
public void setEntityDef(ImportEntityDef entityDef)
entityDef
- entity definitionpublic void init() throws java.sql.SQLException
java.sql.SQLException
- if a database error occurs during initializationpublic void cleanup() throws java.sql.SQLException
java.sql.SQLException
- if a database error occurs during cleanuppublic void importRow(ColumnValue[] values) throws java.sql.SQLException, MalformedDataException
values
- the column values for the row
java.sql.SQLException
- if a database error occurs during the import
MalformedDataException
public void setBatchMode(boolean flag)
flag
- true if the import will use batch modepublic void executeBatch() throws java.sql.BatchUpdateException
java.sql.BatchUpdateException
- If not all rows were imported then throw a BatchUpdateException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |