Module org.jooq
Package org.jooq

Interface Key<R extends Record>

Type Parameters:
R - The KEY's owner table record
All Superinterfaces:
Named, QueryPart, Serializable
All Known Subinterfaces:
ForeignKey<R,​O>, UniqueKey<R>

public interface Key<R extends Record> extends Named
A Key is an object representing a UNIQUE KEY, a PRIMARY KEY, or a FOREIGN KEY.

Instances of this type cannot be created directly. They are available from generated code.

Author:
Lukas Eder
  • Method Details

    • getTable

      @NotNull @NotNull Table<R> getTable()
      The Key's owner table
    • getFields

      @NotNull @NotNull List<TableField<R,​?>> getFields()
      The fields that make up the KEY
    • getFieldsArray

      @NotNull @NotNull TableField<R,​?>[] getFieldsArray()
      The fields that make up the KEY
      See Also:
      getFields()
    • constraint

      @NotNull @NotNull Constraint constraint()
      Get this KEY as a formal Constraint specification.
    • enforced

      boolean enforced()
      Whether this key is being enforced.
    • nullable

      boolean nullable()
      Whether this key is (partially) nullable.