01: /*
02: *
03: * The DbUnit Database Testing Framework
04: * Copyright (C)2002-2004, DbUnit.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or (at your option) any later version.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this library; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19: *
20: */
21: package org.dbunit.dataset.stream;
22:
23: import org.dbunit.dataset.DataSetException;
24: import org.dbunit.dataset.ITableMetaData;
25:
26: /**
27: * Receive notification of the content of a dataset.
28: *
29: * @author Manuel Laflamme
30: * @since Apr 17, 2003
31: * @version $Revision: 398 $
32: */
33: public interface IDataSetConsumer {
34: /**
35: * Receive notification of the beginning of a dataset. This method is
36: * invoked only once, before any other methods in this interface.
37: */
38: public void startDataSet() throws DataSetException;
39:
40: /**
41: * Receive notification of the end of a dataset. This method is invoked only
42: * once, and it will be the last method invoked in this interface.
43: */
44: public void endDataSet() throws DataSetException;
45:
46: /**
47: * Receive notification of the beginning of a table. This method is invoked
48: * at the beginning of every table in the dataset; there will be a
49: * corresponding {@link #endDataSet} event for every <code>startTable</code>
50: * event (even when the table is empty).
51: * @param metaData the table metadata
52: */
53: public void startTable(ITableMetaData metaData)
54: throws DataSetException;
55:
56: /**
57: * Receive notification of the end of a table.
58: */
59: public void endTable() throws DataSetException;
60:
61: /**
62: * Receive notification of a table row. This method is invoked to report
63: * each row of a table.
64: * @param values The row values.
65: */
66: public void row(Object[] values) throws DataSetException;
67: }
|