Interface ForeignKey

All Known Implementing Classes:
ForeignKeyImpl

public interface ForeignKey
Foreign key for referential integrity.

Because Tentackle references PDOs only by id there is only one attribute per foreign key.

Author:
harald
  • Method Details

    • 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

      String sqlCreateForeignKey(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