View Javadoc
1   /*
2   Copyright (c) 2013 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.util.List;
20  
21  /**
22   * Information about a relationship between two tables in the {@link
23   * Database}.
24   *
25   * @author James Ahlborn
26   * @usage _general_class_
27   */
28  public interface Relationship 
29  {
30    public enum JoinType {
31      INNER, LEFT_OUTER, RIGHT_OUTER;
32    }
33    
34    public String getName();
35    
36    public Table getFromTable();
37  
38    public List<Column> getFromColumns();
39  
40    public Table getToTable();
41  
42    public List<Column> getToColumns();
43  
44    public boolean isOneToOne();
45  
46    public boolean hasReferentialIntegrity();
47  
48    public boolean cascadeUpdates();
49    
50    public boolean cascadeDeletes();
51  
52    public boolean cascadeNullOnDelete();
53  
54    public boolean isLeftOuterJoin();
55  
56    public boolean isRightOuterJoin();
57  
58    public JoinType getJoinType();
59  }