- All Superinterfaces:
ConstraintDefinition,Definition
- All Known Implementing Classes:
DefaultUniqueKeyDefinition
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
Modifier and TypeMethodDescriptionThe foreign keys referencing this primary keyThe list of columns making up the primary key.booleanWhether this unique key is the primary keyResolve a referenced key.Methods inherited from interface org.jooq.meta.ConstraintDefinition
enforced, getTableMethods inherited from interface org.jooq.meta.Definition
getCatalog, getComment, getDatabase, getDefinitionPath, getInputName, getName, getOutputName, getOverload, getPackage, getQualifiedInputName, getQualifiedInputNamePart, getQualifiedName, getQualifiedNamePart, getQualifiedOutputName, getQualifiedOutputNamePart, getSchema, getSource, isSynthetic
-
Method Details
-
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.
-