KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > dbunit > dataset > stream > IDataSetConsumer


1 /*
2  *
3  * The DbUnit Database Testing Framework
4  * Copyright (C)2002-2004, DbUnit.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * 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 /**
28  * Receive notification of the content of a dataset.
29  *
30  * @author Manuel Laflamme
31  * @since Apr 17, 2003
32  * @version $Revision: 1.2 $
33  */

34 public interface IDataSetConsumer
35 {
36     /**
37      * Receive notification of the beginning of a dataset. This method is
38      * invoked only once, before any other methods in this interface.
39      */

40     public void startDataSet() throws DataSetException;
41
42     /**
43      * Receive notification of the end of a dataset. This method is invoked only
44      * once, and it will be the last method invoked in this interface.
45      */

46     public void endDataSet() throws DataSetException;
47
48     /**
49      * Receive notification of the beginning of a table. This method is invoked
50      * at the beginning of every table in the dataset; there will be a
51      * corresponding {@link #endDataSet} event for every <code>startTable</code>
52      * event (even when the table is empty).
53      * @param metaData the table metadata
54      */

55     public void startTable(ITableMetaData metaData) throws DataSetException;
56
57     /**
58      * Receive notification of the end of a table.
59      */

60     public void endTable() throws DataSetException;
61
62     /**
63      * Receive notification of a table row. This method is invoked to report
64      * each row of a table.
65      * @param values The row values.
66      */

67     public void row(Object JavaDoc[] values) throws DataSetException;
68 }
69
Popular Tags