Class DbFkInfo


  • public final class DbFkInfo
    extends Object
    Information on foreign key taken from the database.
    • Constructor Detail

      • DbFkInfo

        public DbFkInfo​(String name)
    • Method Detail

      • getName

        public String getName()
        Returns foreign key name.
        Returns:
      • getTableName

        public String getTableName()
        Returns table name for which foreign key is defined.
        Returns:
      • setTableName

        public void setTableName​(String tableName)
        Sets table name for which foreign key is defined.
        Parameters:
        tableName - table name
      • getRefTableName

        public String getRefTableName()
        Returns table name that foreign key refers to.
        Returns:
      • setRefTableName

        public void setRefTableName​(String refTableName)
        Sets name of a table that the foreign key refers to.
        Parameters:
        refTableName - referenced table name
      • getColumnNames

        public List<String> getColumnNames()
      • getRefGrainName

        public String getRefGrainName()
        Returns referenced grain name.
        Returns:
      • setRefGrainName

        public void setRefGrainName​(String refGrainName)
        Set referenced grain name.
        Parameters:
        refGrainName - referenced grain name
      • getDeleteRule

        public FKRule getDeleteRule()
        Returns foreign key rule type on deletion.
        Returns:
      • setDeleteRule

        public void setDeleteRule​(FKRule deleteBehaviour)
        Sets foreign key rule type on deletion.
        Parameters:
        deleteBehaviour - deletion rule type
      • getUpdateRule

        public FKRule getUpdateRule()
        Returns foreign key rule type on update.
        Returns:
      • setUpdateRule

        public void setUpdateRule​(FKRule updateBehaviour)
        Sets foreign key rule type on update.
        Parameters:
        updateBehaviour - update rule type
      • reflects

        public boolean reflects​(ForeignKey fk)