Package org.jooq.meta

Interface ForeignKeyDefinition

All Superinterfaces:
ConstraintDefinition, Definition
All Known Implementing Classes:
DefaultForeignKeyDefinition

public interface ForeignKeyDefinition extends ConstraintDefinition
An object holding information about a foreign key relationship.
Author:
Lukas Eder
  • Method Details

    • getKeyTable

      Deprecated.
      - [#9672] - jOOQ 3.13 - Use ConstraintDefinition.getTable() instead.
      The definition of the referencing table
    • getKeyColumns

      List<ColumnDefinition> getKeyColumns()
      The list of columns making up the foreign key.
    • getReferencedKey

      UniqueKeyDefinition getReferencedKey()
      The referenced key.
    • resolveReferencedKey

      UniqueKeyDefinition resolveReferencedKey()
      Resolve a referenced key.

      If getReferencedKey() coincides itself with a foreign key, resolve that foreign key recursively. In case of ambiguity (two foreign keys coinciding with a single unique key), this returns null.

    • getReferencedTable

      TableDefinition getReferencedTable()
      The definition of the referenced table.
    • getReferencedColumns

      List<ColumnDefinition> getReferencedColumns()
      The list of columns referenced by this foreign key
    • countSimilarReferences

      int countSimilarReferences()
      Count the number of references between referencing and referenced tables.
    • getInverse

      Get the inverse key.
    • getDeleteRule

      QOM.ForeignKeyRule getDeleteRule()
      The ON DELETE rule or null, if unspecified.
    • getUpdateRule

      QOM.ForeignKeyRule getUpdateRule()
      The ON UPDATE rule or null, if unspecified.