01: /*
02: * RowDataReceiver.java
03: *
04: * This file is part of SQL Workbench/J, http://www.sql-workbench.net
05: *
06: * Copyright 2002-2008, Thomas Kellerer
07: * No part of this code maybe reused without the permission of the author
08: *
09: * To contact the author please send an email to: support@sql-workbench.net
10: *
11: */
12: package workbench.db.importer;
13:
14: import java.sql.SQLException;
15: import workbench.db.ColumnIdentifier;
16: import workbench.db.TableIdentifier;
17:
18: /**
19: *
20: * @author support@sql-workbench.net
21: */
22: public interface RowDataReceiver {
23: boolean shouldProcessNextRow();
24:
25: void nextRowSkipped();
26:
27: void processRow(Object[] row) throws SQLException;
28:
29: void setTableCount(int total);
30:
31: void setCurrentTable(int current);
32:
33: void setTargetTable(TableIdentifier table,
34: ColumnIdentifier[] columns) throws SQLException;
35:
36: void importFinished();
37:
38: void importCancelled();
39:
40: void tableImportError();
41:
42: /**
43: * Log an error with the receiver that might have occurred
44: * during parsing of the source data.
45: */
46: void recordRejected(String record);
47: }
|