public class DefaultConstraintsDisabler extends BaseDatabaseAccessor implements ConstraintsDisabler
ConstraintsDisabler.
This will disable all foreign key, check and not-null constraints on the configured database schemas.
Primary key constraints will not be disabled.configuration, dbSupports, defaultDbSupport, dialect, sqlHandler| Constructor and Description |
|---|
DefaultConstraintsDisabler() |
| Modifier and Type | Method and Description |
|---|---|
void |
disableConstraints()
Disable every foreign key or not-null constraint
|
protected void |
disableReferentialConstraints(DbSupport dbSupport)
Disables all referential constraints (e.g. foreign keys) on all tables in the schema
|
protected void |
disableValueConstraints(DbSupport dbSupport)
Disables all value constraints (e.g. not null) on all tables in the schema
|
doInit, getDbSupport, initclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitpublic void disableConstraints()
disableConstraints in interface ConstraintsDisablerprotected void disableReferentialConstraints(DbSupport dbSupport)
dbSupport - The dbSupport for the database, not nullprotected void disableValueConstraints(DbSupport dbSupport)
dbSupport - The dbSupport for the database, not nullCopyright © 2016. All Rights Reserved.