public class CreateConstraintConstantAction extends ConstraintConstantAction
| Modifier and Type | Field and Description |
|---|---|
private ClassFactory |
cf |
private java.lang.String[] |
columnNames |
private java.lang.String |
constraintText |
private boolean |
enabled |
private boolean |
forCreateTable |
private ConstraintInfo |
otherConstraintInfo |
private ProviderInfo[] |
providerInfo |
constraintName, constraintType, indexAction, schemaId, schemaName, tableNametableId| Constructor and Description |
|---|
CreateConstraintConstantAction(java.lang.String constraintName,
int constraintType,
boolean forCreateTable,
java.lang.String tableName,
UUID tableId,
java.lang.String schemaName,
java.lang.String[] columnNames,
IndexConstantAction indexAction,
java.lang.String constraintText,
boolean enabled,
ConstraintInfo otherConstraint,
ProviderInfo[] providerInfo)
Make one of these puppies.
|
| Modifier and Type | Method and Description |
|---|---|
void |
executeConstantAction(Activation activation)
This is the guts of the Execution-time logic for CREATE CONSTRAINT.
|
private int[] |
genColumnPositions(TableDescriptor td,
boolean columnsMustBeOrderable)
Generate an array of column positions for the column list in
the constraint.
|
(package private) java.lang.String |
getConstraintText()
Get the text defining this constraint.
|
(package private) boolean |
isForeignKeyConstraint()
Is the constant action for a foreign key
|
java.lang.String |
toString() |
getConstraintName, getConstraintType, getIndexAction, validateConstraint, validateFKConstraintdropConglomerate, dropConglomerate, dropConstraint, dropConstraint, dropConstraint, executeConglomReplacement, getConglomReplacementAction, recreateUniqueConstraintBackingIndexAsUniqueWhenNotNulladdColumnDependencies, adjustUDTDependencies, adjustUDTDependencies, constructToString, getAndCheckSchemaDescriptor, getSchemaDescriptorForCreate, lockTableForDDL, storeConstraintDependenciesOnPrivileges, storeViewTriggerDependenciesOnPrivilegesprivate final boolean forCreateTable
private java.lang.String[] columnNames
private java.lang.String constraintText
private ConstraintInfo otherConstraintInfo
private ClassFactory cf
private boolean enabled
private ProviderInfo[] providerInfo
CreateConstraintConstantAction(java.lang.String constraintName,
int constraintType,
boolean forCreateTable,
java.lang.String tableName,
UUID tableId,
java.lang.String schemaName,
java.lang.String[] columnNames,
IndexConstantAction indexAction,
java.lang.String constraintText,
boolean enabled,
ConstraintInfo otherConstraint,
ProviderInfo[] providerInfo)
constraintName - Constraint name.constraintType - Constraint type.forCreateTable - Constraint is being added for a CREATE TABLEtableName - Table name.tableId - UUID of table.schemaName - the schema that table and constraint lives in.columnNames - String[] for column namesindexAction - IndexConstantAction for constraint (if necessary)constraintText - Text for check constraint
RESOLVE - the next parameter should go away once we use UUIDs
(Generated constraint names will be based off of uuids)enabled - Should the constraint be created as enabled
(enabled == true), or disabled (enabled == false).otherConstraint - information about the constraint that this referencesproviderInfo - Information on all the Providerspublic void executeConstantAction(Activation activation) throws StandardException
A constraint is represented as:
activation - The execution environment for this constant action.StandardException - Thrown on failureConstraintDescriptor,
CreateIndexConstantAction,
ConstantAction.executeConstantAction(org.apache.derby.iapi.sql.Activation)boolean isForeignKeyConstraint()
private int[] genColumnPositions(TableDescriptor td, boolean columnsMustBeOrderable) throws StandardException
td - The TableDescriptor for the table in questioncolumnsMustBeOrderable - true for primaryKey and unique constraintsStandardExceptionjava.lang.String getConstraintText()
public java.lang.String toString()
toString in class java.lang.ObjectApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.