Class AddForeignKeyConstraintStatement

All Implemented Interfaces:

public class AddForeignKeyConstraintStatement extends AbstractSqlStatement
  • Constructor Details

    • AddForeignKeyConstraintStatement

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

    • getBaseColumnNames

      public String getBaseColumnNames()
    • getReferencedColumnNames

      public String getReferencedColumnNames()
    • setDeferrable

      public AddForeignKeyConstraintStatement setDeferrable(boolean deferrable)
    • setInitiallyDeferred

      public AddForeignKeyConstraintStatement setInitiallyDeferred(boolean initiallyDeferred)
    • setOnUpdate

      public AddForeignKeyConstraintStatement setOnUpdate(String updateRule)
    • setOnDelete

      public AddForeignKeyConstraintStatement setOnDelete(String deleteRule)
    • 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.
      true if ENABLE VALIDATE (this is the default), or false if ENABLE NOVALIDATE.
    • setShouldValidate

      public AddForeignKeyConstraintStatement setShouldValidate(boolean shouldValidate)
      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.