KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > dbunit > dataset > IDataSet


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
22 package org.dbunit.dataset;
23
24 /**
25  * Represents a collection of tables.
26  *
27  * @author Manuel Laflamme
28  * @version $Revision: 1.14 $
29  * @since Feb 17, 2002
30  */

31 public interface IDataSet
32 {
33     /**
34      * Returns names of tables in this dataset in proper sequence. Multiple
35      * occurence of the same name may be returned if multiple tables having
36      * the same name are present in the dataset.
37      */

38     public String JavaDoc[] getTableNames() throws DataSetException;
39
40     /**
41      * Returns the specified table metadata.
42      *
43      * @throws AmbiguousTableNameException if dataset contains multiple tables
44      * having the specified name. Use {@link #iterator} to access
45      * to all tables.
46      * @throws NoSuchTableException if dataset do not contains the specified
47      * table
48      */

49     public ITableMetaData getTableMetaData(String JavaDoc tableName)
50             throws DataSetException;
51
52     /**
53      * Returns the specified table.
54      *
55      * @throws AmbiguousTableNameException if dataset contains multiple tables
56      * having the specified name. Use {@link #iterator} to access
57      * to all tables.
58      * @throws NoSuchTableException if dataset do not contains the specified
59      * table
60      */

61     public ITable getTable(String JavaDoc tableName) throws DataSetException;
62
63     /**
64      * Returns tables in this dataset in proper sequence. Multiple tables having
65      * the same name but different data may be returned.
66      *
67      * @deprecated Use {@link #iterator} or {@link #reverseIterator} instead.
68      */

69     public ITable[] getTables() throws DataSetException;
70
71     /**
72      * Returns an iterator over the tables in this dataset in proper sequence.
73      */

74     public ITableIterator iterator() throws DataSetException;
75
76     /**
77      * Returns an iterator over the tables in this dataset in reverse sequence.
78      */

79     public ITableIterator reverseIterator() throws DataSetException;
80 }
81
82
83
84
85
86
87
Popular Tags