-
- 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<ForeignKeyDefinition>getForeignKeys()The foreign keys referencing this primary keyList<ColumnDefinition>getKeyColumns()The list of columns making up the primary key.booleanisPrimaryKey()Whether this unique key is the primary keyUniqueKeyDefinitionresolveReferencedKey()Resolve a referenced key.-
Methods inherited from interface org.jooq.meta.ConstraintDefinition
enforced, getTable
-
Methods inherited from interface org.jooq.meta.Definition
getCatalog, getComment, getDatabase, getDefinitionPath, getInputName, getName, getOutputName, getOverload, getPackage, getQualifiedInputName, getQualifiedInputNamePart, getQualifiedName, getQualifiedNamePart, getQualifiedOutputName, getQualifiedOutputNamePart, getSchema, getSource
-
-
-
-
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.
-
getForeignKeys
List<ForeignKeyDefinition> getForeignKeys()
The foreign keys referencing this 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.
-
-