Class ForeignKeyColumn

  • All Implemented Interfaces:
    Column

    public class ForeignKeyColumn
    extends DefaultColumn
    The definition of a column with a foreign key. It extends DefaultColumn and add the notion of foreign key. For integrity reasons, the AMETYS_* tables haven't the foreign, it's only used to retrieve values from the SRC_* views.
    • Field Detail

      • _foreignKey

        protected Pair<String,​String> _foreignKey
        The foreign key: left is table name and right is column name of the referenced column
      • _needYear

        protected boolean _needYear
        If the foreign key needs to match the year
    • Constructor Detail

      • ForeignKeyColumn

        public ForeignKeyColumn​(String name,
                                String type,
                                boolean isNullable,
                                Pair<String,​String> foreignKey,
                                boolean needYear,
                                String viewName)
        Constructor.
        Parameters:
        name - The name of the column
        type - The SQL type of the column
        isNullable - true if it's nullable
        foreignKey - The foreign key
        needYear - If the foreign key needs to match the year
        viewName - The name of the column in the associated SRC_* view
      • ForeignKeyColumn

        public ForeignKeyColumn​(String name,
                                String type,
                                boolean isNullable,
                                Pair<String,​String> foreignKey,
                                boolean needYear)
        Constructor
        Parameters:
        name - The name of the column (it will also be used for the associated SRC_* view)
        type - The SQL type of the column
        isNullable - true if it's nullable
        foreignKey - The foreign key
        needYear - If the foreign key needs to match the year