public class DBWriter extends Object implements IDBWriter
Beware, this deletes the db file with each initialization.
Each thread must construct its own DBWriter because each DBWriter creates its own PreparedStatements at initialization.
| Constructor and Description |
|---|
DBWriter(Connection connection,
List<TableInfo> tableInfos,
JDBCUtil dbUtil,
MimeBuffer mimeBuffer) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
This closes the writer by executing batch and
committing changes.
|
int |
getMimeId(String mimeString) |
void |
writeRow(TableInfo table,
Map<Cols,String> data) |
public DBWriter(Connection connection, List<TableInfo> tableInfos, JDBCUtil dbUtil, MimeBuffer mimeBuffer) throws IOException, SQLException
IOExceptionSQLExceptionpublic void writeRow(TableInfo table, Map<Cols,String> data) throws IOException
writeRow in interface IDBWriterIOExceptionpublic void close()
throws IOException
close in interface IDBWriterIOExceptionCopyright © 2007–2022 The Apache Software Foundation. All rights reserved.