View Javadoc
1   /*
2   Copyright (c) 2016 James Ahlborn
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 com.healthmarketscience.jackcess;
18  
19  import java.io.IOException;
20  
21  /**
22   * Basic metadata about a single database Table.  This is the top-level
23   * information stored in a (local) database which can be retrieved without
24   * attempting to load the Table itself.
25   *
26   * @author James Ahlborn
27   * @usage _intermediate_class_
28   */
29  public interface TableMetaData 
30  {
31    /**
32     * The name of the table (as it is stored in the database)
33     */
34    public String getName();
35  
36    /**
37     * {@code true} if this is a linked table, {@code false} otherwise.
38     */
39    public boolean isLinked();
40    
41    /**
42     * {@code true} if this is a system table, {@code false} otherwise.
43     */
44    public boolean isSystem();
45  
46    /**
47     * The name of this linked table in the linked database if this is a linked
48     * table, {@code null} otherwise.
49     */
50    public String getLinkedTableName();
51  
52    /**
53     * The name of this the linked database if this is a linked table, {@code
54     * null} otherwise.
55     */
56    public String getLinkedDbName();
57  
58    /**
59     * Opens this table from the given Database instance.
60     */
61    public Table open(Database db) throws IOException;
62  }