org.unitils.dbmaintainer.structure.impl
Class DefaultConstraintsDisabler
java.lang.Object
org.unitils.dbmaintainer.util.BaseDatabaseAccessor
org.unitils.dbmaintainer.structure.impl.DefaultConstraintsDisabler
- All Implemented Interfaces:
- ConstraintsDisabler, DatabaseAccessing
public class DefaultConstraintsDisabler
- extends BaseDatabaseAccessor
- implements ConstraintsDisabler
Default implementation of ConstraintsDisabler
.
This will disable all foreign key, check and not-null constraints on the configured database schemas.
Primary key constraints will not be disabled.
- Author:
- Tim Ducheyne, Filip Neven, Bart Vermeiren
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultConstraintsDisabler
public DefaultConstraintsDisabler()
disableConstraints
public void disableConstraints()
- Disable every foreign key or not-null constraint
- Specified by:
disableConstraints
in interface ConstraintsDisabler
disableReferentialConstraints
protected void disableReferentialConstraints(DbSupport dbSupport)
- Disables all referential constraints (e.g. foreign keys) on all tables in the schema
- Parameters:
dbSupport
- The dbSupport for the database, not null
disableValueConstraints
protected void disableValueConstraints(DbSupport dbSupport)
- Disables all value constraints (e.g. not null) on all tables in the schema
- Parameters:
dbSupport
- The dbSupport for the database, not null
Copyright © 2011. All Rights Reserved.