Top Fields Constructors Methods
liquibase.statement.core

public Class AddForeignKeyConstraintStatement

extends AbstractSqlStatement
Class Inheritance
Imports
liquibase.change.ColumnConfig, liquibase.statement.AbstractSqlStatement, liquibase.util.StringUtil

Field Summary

Modifier and TypeField and Description
private final ColumnConfig[]
private final String
private final String
private final String
private final String
private boolean
private boolean
private String
private String
private final ColumnConfig[]
private final String
private final String
private final String
private boolean

Constructor Summary

AccessConstructor and Description
public
AddForeignKeyConstraintStatement(String constraintName, String baseTableCatalogName, String baseTableSchemaName, String baseTableName, ColumnConfig[] baseColumns, String referencedTableCatalogName, String referencedTableSchemaName, String referencedTableName, ColumnConfig[] referencedColumns)

Method Summary

Modifier and TypeMethod and Description
public String
public ColumnConfig[]
public String
public String
public String
public String
public String
public String
public String
public ColumnConfig[]
public String
public String
public String
public boolean
public boolean
public AddForeignKeyConstraintStatement
setDeferrable(boolean deferrable)

public AddForeignKeyConstraintStatement
setInitiallyDeferred(boolean initiallyDeferred)

public AddForeignKeyConstraintStatement
setOnDelete(String deleteRule)

public AddForeignKeyConstraintStatement
setOnUpdate(String updateRule)

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

public boolean

Returns:

true if ENABLE VALIDATE (this is the default), or false if ENABLE NOVALIDATE.
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.

Inherited from liquibase.statement.AbstractSqlStatement:
continueOnErrorsetContinueOnErrorskipOnUnsupported

Field Detail

baseColumnsback to summary
private final ColumnConfig[] baseColumns
baseTableCatalogNameback to summary
private final String baseTableCatalogName
baseTableNameback to summary
private final String baseTableName
baseTableSchemaNameback to summary
private final String baseTableSchemaName
constraintNameback to summary
private final String constraintName
deferrableback to summary
private boolean deferrable
initiallyDeferredback to summary
private boolean initiallyDeferred
onDeleteback to summary
private String onDelete
onUpdateback to summary
private String onUpdate
referencedColumnsback to summary
private final ColumnConfig[] referencedColumns
referencedTableCatalogNameback to summary
private final String referencedTableCatalogName
referencedTableNameback to summary
private final String referencedTableName
referencedTableSchemaNameback to summary
private final String referencedTableSchemaName
shouldValidateback to summary
private boolean shouldValidate

Constructor Detail

AddForeignKeyConstraintStatementback to summary
public AddForeignKeyConstraintStatement(String constraintName, String baseTableCatalogName, String baseTableSchemaName, String baseTableName, ColumnConfig[] baseColumns, String referencedTableCatalogName, String referencedTableSchemaName, String referencedTableName, ColumnConfig[] referencedColumns)

Method Detail

getBaseColumnNamesback to summary
public String getBaseColumnNames()
getBaseColumnsback to summary
public ColumnConfig[] getBaseColumns()
getBaseTableCatalogNameback to summary
public String getBaseTableCatalogName()
getBaseTableNameback to summary
public String getBaseTableName()
getBaseTableSchemaNameback to summary
public String getBaseTableSchemaName()
getConstraintNameback to summary
public String getConstraintName()
getOnDeleteback to summary
public String getOnDelete()
getOnUpdateback to summary
public String getOnUpdate()
getReferencedColumnNamesback to summary
public String getReferencedColumnNames()
getReferencedColumnsback to summary
public ColumnConfig[] getReferencedColumns()
getReferencedTableCatalogNameback to summary
public String getReferencedTableCatalogName()
getReferencedTableNameback to summary
public String getReferencedTableName()
getReferencedTableSchemaNameback to summary
public String getReferencedTableSchemaName()
isDeferrableback to summary
public boolean isDeferrable()
isInitiallyDeferredback to summary
public boolean isInitiallyDeferred()
setDeferrableback to summary
public AddForeignKeyConstraintStatement setDeferrable(boolean deferrable)
setInitiallyDeferredback to summary
public AddForeignKeyConstraintStatement setInitiallyDeferred(boolean initiallyDeferred)
setOnDeleteback to summary
public AddForeignKeyConstraintStatement setOnDelete(String deleteRule)
setOnUpdateback to summary
public AddForeignKeyConstraintStatement setOnUpdate(String updateRule)
setShouldValidateback to summary
public AddForeignKeyConstraintStatement setShouldValidate(boolean shouldValidate)
Parameters
shouldValidate:boolean

- 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.

shouldValidateback to summary
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:boolean

true if ENABLE VALIDATE (this is the default), or false if ENABLE NOVALIDATE.