- Type Parameters:
- R- The- FOREIGN KEY's owner table record
- O- The referenced- KEY's owner table record
- All Superinterfaces:
- Key<R>,- Named,- QueryPart,- Serializable
ForeignKey is an object referencing a UniqueKey. It
 represents a FOREIGN KEY relationship between two tables.
 Instances of this type cannot be created directly. They are available from generated code.
- Author:
- Lukas Eder
- 
Method SummaryModifier and TypeMethodDescriptionchildren(Collection<? extends O> records) Get a table expression representing the children of a record, given this foreign key.Get a table expression representing the children of a record, given this foreign key.Get a table expression representing the children of a record, given this foreign key.fetchChildren(Collection<? extends O> records) Fetch child records of a given set of records through this foreign keyfetchChildren(O record) Fetch child records of a given record through this foreign keyfetchChildren(O... records) Fetch child records of a given set of records through this foreign keyfetchParent(R record) Fetch a parent record of a given record through this foreign keyfetchParents(Collection<? extends R> records) Fetch parent records of a given set of record through this foreign keyfetchParents(R... records) Fetch parent records of a given set of record through this foreign keygetKey()The referencedUniqueKey.@NotNull List<TableField<O,?>> The fields that make up the referencedUniqueKey.@NotNull TableField<O,?> @NotNull [] The fields that make up the referencedUniqueKey.Get a table expression representing the parent of a record, given this foreign key.parents(Collection<? extends R> records) Get a table expression representing the parents of a record, given this foreign key.Get a table expression representing the parents of a record, given this foreign key.Methods inherited from interface org.jooq.Keyconstraint, enforced, getFields, getFieldsArray, getTable, nullableMethods inherited from interface org.jooq.Named$name, getComment, getCommentPart, getName, getQualifiedName, getUnqualifiedName
- 
Method Details- 
getKeyThe referencedUniqueKey.
- 
getKeyFieldsThe fields that make up the referencedUniqueKey.This returns the order in which the fields of getKey()are referenced, which is usually the same as the fields ofKey.getFields(), but not necessarily so.
- 
getKeyFieldsArrayThe fields that make up the referencedUniqueKey.This returns the order in which the fields of getKey()are referenced, which is usually the same as the fields ofKey.getFieldsArray(), but not necessarily so.- See Also:
 
- 
fetchParentFetch a parent record of a given record through this foreign keyThis returns a parent record referenced by a given record through this foreign key, as if fetching from parent(Record). If no parent record was found, this returnsnull- Throws:
- DataAccessException- if something went wrong executing the query
- See Also:
 
- 
fetchParentsFetch parent records of a given set of record through this foreign keyThis returns parent records referenced by any record in a given set of records through this foreign key, as if fetching from parents(Record...).- Throws:
- DataAccessException- if something went wrong executing the query
- See Also:
 
- 
fetchParents@NotNull @Blocking @NotNull Result<O> fetchParents(Collection<? extends R> records) throws DataAccessException Fetch parent records of a given set of record through this foreign keyThis returns parent records referenced by any record in a given set of records through this foreign key, as if fetching from parents(Collection).- Throws:
- DataAccessException- if something went wrong executing the query
- See Also:
 
- 
fetchChildrenFetch child records of a given record through this foreign keyThis returns childs record referencing a given record through this foreign key, as if fetching from children(Record).- Throws:
- DataAccessException- if something went wrong executing the query
- See Also:
 
- 
fetchChildrenFetch child records of a given set of records through this foreign keyThis returns childs record referencing any record in a given set of records through this foreign key, as if fetching from children(Record...).- Throws:
- DataAccessException- if something went wrong executing the query
- See Also:
 
- 
fetchChildren@NotNull @Blocking @NotNull Result<R> fetchChildren(Collection<? extends O> records) throws DataAccessException Fetch child records of a given set of records through this foreign keyThis returns childs record referencing any record in a given set of records through this foreign key, as if fetching from children(Collection).- Throws:
- DataAccessException- if something went wrong executing the query
- See Also:
 
- 
parentGet a table expression representing the parent of a record, given this foreign key.
- 
parentsGet a table expression representing the parents of a record, given this foreign key.
- 
parentsGet a table expression representing the parents of a record, given this foreign key.
- 
childrenGet a table expression representing the children of a record, given this foreign key.
- 
childrenGet a table expression representing the children of a record, given this foreign key.
- 
childrenGet a table expression representing the children of a record, given this foreign key.
 
-