Class DbFk

  • All Implemented Interfaces:
    Serializable

    public class DbFk
    extends Object
    implements Serializable
    Represents a database foreign key hard link between two tables.
    Since:
    2.0.0
    Author:
    Rui Vilao (rui.vilao@feedzai.com)
    See Also:
    Serialized Form
    • Method Detail

      • getLocalColumns

        public List<String> getLocalColumns()
        Gets the local columns names. These columns are from the local table where the foreign key is defined (the child table); this group of columns is what composes the foreign key.
        Returns:
        The local columns names.
      • getForeignColumns

        @Deprecated
        public List<String> getForeignColumns()
        Deprecated.
        a "foreign key" is actually composed from the local columns of the table where it is defined (the child table); this name is wrong and will eventually be removed ─ use getReferencedColumns() instead.
        Gets the referenced columns names. These columns are from the table that the foreign key constraint references (the parent table); the values in these columns need to match the values in the local columns that define the foreign key.
        Returns:
        The list of referenced columns names.
      • getReferencedColumns

        public List<String> getReferencedColumns()
        Gets the referenced columns names. These columns are from the table that the foreign key constraint references (the parent table); the values in these columns need to match the values in the local columns that define the foreign key.
        Returns:
        The list of referenced columns names.
      • getForeignTable

        @Deprecated
        public String getForeignTable()
        Deprecated.
        a "foreign key" is actually composed from the local columns of the table where it is defined (the child table); this method was used to get the name of the referenced table, which is the parent table, thus the name of the method is wrong and it will eventually be removed ─ use getReferencedTable() instead.
        Gets the name of the referenced table (parent table).
        Returns:
        The name of the referenced table.
      • getReferencedTable

        public String getReferencedTable()
        Gets the name of the referenced table (parent table).
        Returns:
        The name of the referenced table.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object