Class AddForeignKeyConstraintStatement

    • Constructor Detail

      • AddForeignKeyConstraintStatement

        public AddForeignKeyConstraintStatement​(String constraintName,
                                                String baseTableCatalogName,
                                                String baseTableSchemaName,
                                                String baseTableName,
                                                ColumnConfig[] baseColumns,
                                                String referencedTableCatalogName,
                                                String referencedTableSchemaName,
                                                String referencedTableName,
                                                ColumnConfig[] referencedColumns)
    • Method Detail

      • getBaseTableCatalogName

        public String getBaseTableCatalogName()
      • getBaseTableSchemaName

        public String getBaseTableSchemaName()
      • getBaseTableName

        public String getBaseTableName()
      • getBaseColumnNames

        public String getBaseColumnNames()
      • getReferencedTableCatalogName

        public String getReferencedTableCatalogName()
      • getReferencedTableSchemaName

        public String getReferencedTableSchemaName()
      • getReferencedTableName

        public String getReferencedTableName()
      • getReferencedColumns

        public ColumnConfig[] getReferencedColumns()
      • getReferencedColumnNames

        public String getReferencedColumnNames()
      • getConstraintName

        public String getConstraintName()
      • isDeferrable

        public boolean isDeferrable()
      • getOnDelete

        public String getOnDelete()
      • getOnUpdate

        public String getOnUpdate()
      • isInitiallyDeferred

        public boolean isInitiallyDeferred()
      • shouldValidate

        public boolean shouldValidate()
        In Oracle PL/SQL, the VALIDATE keyword defines whether a foreign key constraint on a column in a table should be checked if it refers to a valid row or not.
        Returns:
        true if ENABLE VALIDATE (this is the default), or false if ENABLE NOVALIDATE.
      • setShouldValidate

        public AddForeignKeyConstraintStatement setShouldValidate​(boolean shouldValidate)
        Parameters:
        shouldValidate - - if shouldValidate is set to FALSE then the constraint will be created with the 'ENABLE NOVALIDATE' mode. This means the constraint would be created, but that no check will be done to ensure old data has valid foreign keys - only new data would be checked to see if it complies with the constraint logic. The default state for foreign keys is to have 'ENABLE VALIDATE' set.