-
- Type Parameters:
R
- TheFOREIGN KEY
's owner table recordO
- The referencedKEY
's owner table record
- All Superinterfaces:
Key<R>
,Named
,QueryPart
,Serializable
public interface ForeignKey<R extends Record,O extends Record> extends Key<R>
AForeignKey
is an object referencing aUniqueKey
. It represents aFOREIGN KEY
relationship between two tables.Instances of this type cannot be created directly. They are available from generated code.
- Author:
- Lukas Eder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Result<R>
fetchChildren(Collection<? extends O> records)
Fetch child records of a given set of records through this foreign keyResult<R>
fetchChildren(O record)
Fetch child records of a given record through this foreign keyResult<R>
fetchChildren(O... records)
Fetch child records of a given set of records through this foreign keyO
fetchParent(R record)
Fetch a parent record of a given record through this foreign keyResult<O>
fetchParents(Collection<? extends R> records)
Fetch parent records of a given set of record through this foreign keyResult<O>
fetchParents(R... records)
Fetch parent records of a given set of record through this foreign keyUniqueKey<O>
getKey()
The referencedKey
-
Methods inherited from interface org.jooq.Key
constraint, enforced, getFields, getFieldsArray, getTable
-
Methods inherited from interface org.jooq.Named
getComment, getName, getQualifiedName, getUnqualifiedName
-
-
-
-
Method Detail
-
fetchParent
O fetchParent(R record) throws DataAccessException
Fetch a parent record of a given record through this foreign keyThis returns a parent record referenced by a given record through this foreign key. If no parent record was found, this returns
null
- Throws:
DataAccessException
- if something went wrong executing the query- See Also:
TableRecord.fetchParent(ForeignKey)
-
fetchParents
Result<O> fetchParents(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.
- Throws:
DataAccessException
- if something went wrong executing the query- See Also:
TableRecord.fetchParent(ForeignKey)
-
fetchParents
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.
- Throws:
DataAccessException
- if something went wrong executing the query- See Also:
TableRecord.fetchParent(ForeignKey)
-
fetchChildren
Result<R> fetchChildren(O record) throws DataAccessException
Fetch child records of a given record through this foreign keyThis returns childs record referencing a given record through this foreign key
- Throws:
DataAccessException
- if something went wrong executing the query- See Also:
UpdatableRecord.fetchChild(ForeignKey)
,UpdatableRecord.fetchChildren(ForeignKey)
-
fetchChildren
Result<R> fetchChildren(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
- Throws:
DataAccessException
- if something went wrong executing the query- See Also:
UpdatableRecord.fetchChild(ForeignKey)
,UpdatableRecord.fetchChildren(ForeignKey)
-
fetchChildren
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
- Throws:
DataAccessException
- if something went wrong executing the query- See Also:
UpdatableRecord.fetchChild(ForeignKey)
,UpdatableRecord.fetchChildren(ForeignKey)
-
-