Class Table.ForeignKey

java.lang.Object
com.invirgance.convirgance.jdbc.schema.Table.ForeignKey
Enclosing class:
Table

public class Table.ForeignKey extends Object
  • Method Details

    • getName

      public String getName()
      Returns the object name of the foreign key relationship, if available. In some database the relationship may not be named. In which case this will return null.
      Returns:
      the name of the foreign key relationship if available, null otherwise
    • getTable

      public Table getTable()
      The table the foreign key belongs to
      Returns:
      the Table containing the foreign key columns
    • getColumn

      public Column getColumn()
      Returns the foreign key column. An exception is thrown if the foreign key consists of more than one column.
      Returns:
      the foreign key column
      Throws:
      com.invirgance.convirgance.ConvirganceException - if the foreign key consists of more than one column
    • getColumns

      public Column[] getColumns()
      Returns the list of columns in the foreign key
      Returns:
      the columns in the foreign key
    • getTarget

      public Table getTarget()
      The table being targeted by the foreign key. Typically, the foreign key references this table's primary keys.
      Returns:
      the Table exposing its primary keys to the foreign key reference
    • getTargetKey

      public Column getTargetKey()
      Returns:
    • getTargetKeys

      public Column[] getTargetKeys()
      The keys referenced by the foreign key, typically the primary keys of the target table.
      Returns:
      key columns referenced by the foreign key
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object