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<CHILD,PARENT>, InverseForeignKey<PARENT,CHILD>, 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 Link icon

    • getTable Link icon

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

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

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

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

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

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