Package org.jooq.meta

Interface UniqueKeyDefinition

  • All Superinterfaces:
    ConstraintDefinition, Definition
    All Known Implementing Classes:
    DefaultUniqueKeyDefinition

    public interface UniqueKeyDefinition
    extends ConstraintDefinition
    An object holding information about an inverse foreign key relationship.

    This object may either represent a primary key or a unique key. It holds a list of foreign keys referencing this key.

    Author:
    Lukas Eder
    • Method Detail

      • isPrimaryKey

        boolean isPrimaryKey()
        Whether this unique key is the primary key
      • getKeyColumns

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

        UniqueKeyDefinition resolveReferencedKey()
        Resolve a referenced key.

        If this key coincides 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.