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
IOException
SQLException
public void writeRow(TableInfo table, Map<Cols,String> data) throws IOException
writeRow
in interface IDBWriter
IOException
public void close() throws IOException
close
in interface IDBWriter
IOException
Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.