-
- All Known Implementing Classes:
ForeignKeyImpl
public interface ForeignKeyForeign key for referential integrity.Because Tentackle references PDOs only by id there is only one attribute per foreign key.
- Author:
- harald
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AttributegetReferencedAttribute()Gets the referenced attribute.EntitygetReferencedEntity()Gets the referenced entity.EntitygetReferencedTableProvidingEntity()Gets the entity that provides the table for the referenced entity.AttributegetReferencingAttribute()Gets the referencing attribute.EntitygetReferencingEntity()Gets the referencing entity.EntitygetReferencingTableProvidingEntity()Gets the entity that provides the table for the referencing entity.booleanisComposite()Returns whether the reference is via a composite relation.java.lang.StringsqlCreateForeignKey(org.tentackle.sql.Backend backend)Creates the foreign key creation sql code.
-
-
-
Method Detail
-
getReferencingEntity
Entity getReferencingEntity()
Gets the referencing entity.- Returns:
- the referencing entity
-
getReferencingAttribute
Attribute getReferencingAttribute()
Gets the referencing attribute.- Returns:
- the referencing attribute
-
getReferencedEntity
Entity getReferencedEntity()
Gets the referenced entity.- Returns:
- the referenced entity
-
getReferencedAttribute
Attribute getReferencedAttribute()
Gets the referenced attribute.- Returns:
- the referenced attribute
-
isComposite
boolean isComposite()
Returns whether the reference is via a composite relation.- Returns:
- true if composite
-
sqlCreateForeignKey
java.lang.String sqlCreateForeignKey(org.tentackle.sql.Backend backend)
Creates the foreign key creation sql code.- Parameters:
backend- the backend to create sql code for- Returns:
- the SQL code
-
getReferencingTableProvidingEntity
Entity getReferencingTableProvidingEntity()
Gets the entity that provides the table for the referencing entity.- Returns:
- the entity, never null
-
getReferencedTableProvidingEntity
Entity getReferencedTableProvidingEntity()
Gets the entity that provides the table for the referenced entity.- Returns:
- the entity, never null
-
-