KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > sqls > Schema


1 /*
2  * Copyright 2003, 2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15
16  */

17 package org.apache.ws.jaxme.sqls;
18
19 import java.util.Iterator JavaDoc;
20
21
22 /** <p>Interface of a database schema.</p>
23  *
24  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
25  */

26 public interface Schema {
27    public interface Name extends SQLFactory.Ident {
28    }
29
30    /** <p>Returns the {@link org.apache.ws.jaxme.sqls.SQLFactory}
31     * that created this instance of Schema.</p>
32     */

33    public SQLFactory getSQLFactory();
34
35    /** <p>Returns the schema name.</p>
36     */

37    public Name getName();
38
39    /** <p>Creates a new table with the given name in the schema.</p>
40     */

41    public Table newTable(String JavaDoc pName);
42
43    /** <p>Creates a new table with the given name in the schema.</p>
44     */

45    public Table newTable(Table.Name pName);
46
47    /** <p>Returns the table with the given name or null, if no such table exists
48     * in the schema.</p>
49     */

50    public Table getTable(Table.Name pName);
51
52    /** <p>Returns the table with the given name or null, if no such table exists
53     * in the schema.</p>
54     */

55    public Table getTable(String JavaDoc pName);
56
57    /** <p>Returns an {@link Iterator} to all tables in the schema.</p>
58     */

59    public Iterator JavaDoc getTables();
60 }
61
Popular Tags