01: /*
02: * RowDataProducer.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 workbench.interfaces.JobErrorHandler;
15: import workbench.util.MessageBuffer;
16: import workbench.util.ValueConverter;
17:
18: /**
19: *
20: * @author support@sql-workbench.net
21: */
22: public interface RowDataProducer {
23: public static final String SKIP_INDICATOR = "$wb_skip$";
24:
25: void setReceiver(RowDataReceiver receiver);
26:
27: void start() throws Exception;
28:
29: void cancel();
30:
31: void stop();
32:
33: MessageBuffer getMessages();
34:
35: void setAbortOnError(boolean flag);
36:
37: void setErrorHandler(JobErrorHandler handler);
38:
39: boolean hasErrors();
40:
41: boolean hasWarnings();
42:
43: void setValueConverter(ValueConverter converter);
44:
45: void setCheckDependencies(boolean flag);
46:
47: /**
48: * Return the last "raw" record that was sent to the RowDataReceiver.
49: * This is used to log invalid records
50: */
51: String getLastRecord();
52:
53: boolean isCancelled();
54: }
|