org.eobjects.metamodel.schema
Interface Relationship

All Superinterfaces:
Comparable<Relationship>, Serializable
All Known Implementing Classes:
AbstractRelationship, ImmutableRelationship, MutableRelationship

public interface Relationship
extends Serializable, Comparable<Relationship>

Represents a relationship between two tables where one set of columns is the primary key, and another set is the foreign key.

Author:
Kasper Sørensen
See Also:
Table, Column

Method Summary
 boolean containsColumnPair(Column pkColumn, Column fkColumn)
          Determines whether this relationship contains a specific pair of columns
 Column[] getForeignColumns()
          Gets the foreign key columns of this relationship.
 Table getForeignTable()
          Gets the table of the foreign key column(s).
 Column[] getPrimaryColumns()
          Gets the primary key columns of this relationship.
 Table getPrimaryTable()
          Gets the table of the primary key column(s).
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getPrimaryTable

Table getPrimaryTable()
Gets the table of the primary key column(s).

Returns:
the table of the primary key column(s).

getPrimaryColumns

Column[] getPrimaryColumns()
Gets the primary key columns of this relationship.

Returns:
an array of primary key columns.

getForeignTable

Table getForeignTable()
Gets the table of the foreign key column(s).

Returns:
the table of the foreign key column(s).

getForeignColumns

Column[] getForeignColumns()
Gets the foreign key columns of this relationship.

Returns:
an array of foreign key columns.

containsColumnPair

boolean containsColumnPair(Column pkColumn,
                           Column fkColumn)
Determines whether this relationship contains a specific pair of columns

Parameters:
pkColumn - primary key column
fkColumn - foreign key column
Returns:
true if this relation contains the specified primary and foreign columns as a part of the relation


Copyright © 2007-2013. All Rights Reserved.