org.apache.derby.impl.sql.execute
Class SetConstraintsConstantAction
java.lang.Object
org.apache.derby.impl.sql.execute.DDLConstantAction
org.apache.derby.impl.sql.execute.SetConstraintsConstantAction
- All Implemented Interfaces:
- ConstantAction
class SetConstraintsConstantAction
- extends DDLConstantAction
This class describes actions that are performed for a
set constraint at Execution time.
Note that the dependency action we send is SET_CONSTRAINTS
rather than ALTER_TABLE. We do this because we want
to distinguish SET_CONSTRAINTS from ALTER_TABLE for
error messages.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
enable
private boolean enable
unconditionallyEnforce
private boolean unconditionallyEnforce
cdl
private ConstraintDescriptorList cdl
cuuids
private UUID[] cuuids
tuuids
private UUID[] tuuids
SetConstraintsConstantAction
SetConstraintsConstantAction(ConstraintDescriptorList cdl,
boolean enable,
boolean unconditionallyEnforce)
- Boilerplate
- Parameters:
cdl
- ConstraintDescriptorListenable
- true == turn them on, false == turn them offunconditionallyEnforce
- Replication sets this to true at
the end of REFRESH. This forces us
to run the included foreign key constraints even
if they're already marked ENABLED.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
executeConstantAction
public void executeConstantAction(Activation activation)
throws StandardException
- This is the guts of the Execution-time logic for DROP CONSTRAINT.
- Parameters:
activation
- The execution environment for this constant action.
- Throws:
StandardException
- Thrown on failure- See Also:
ConstantAction.executeConstantAction(org.apache.derby.iapi.sql.Activation)
validateAllCheckConstraints
private void validateAllCheckConstraints(LanguageConnectionContext lcc,
java.util.Hashtable ht)
throws StandardException
- Throws:
StandardException
validateFKConstraint
private void validateFKConstraint(ForeignKeyConstraintDescriptor fk,
DataDictionary dd,
TransactionController tc,
ContextManager cm)
throws StandardException
- Throws:
StandardException
getRowLocation
private RowLocation getRowLocation(DataDictionary dd,
TableDescriptor td,
TransactionController tc)
throws StandardException
- Throws:
StandardException
getConstraintDescriptorList
private ConstraintDescriptorList getConstraintDescriptorList(DataDictionary dd)
throws StandardException
- Throws:
StandardException
publishToTargets
protected void publishToTargets(Activation activation)
throws StandardException
- Do the work of publishing any this action to any
replication targets. On a non-replicated source,
this is a no-op.
- Parameters:
activation
- the activation
- Throws:
StandardException
- on error
Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.