| Modifier and Type | Field and Description |
|---|---|
| public static final int | |
| private ColumnDescriptorList | |
| pack-priv final UUID | |
| pack-priv final String | |
| private boolean | |
| public static final int | |
| public static final int | |
| private boolean | |
| private boolean | |
| private final int[] | |
| private final SchemaDescriptor | |
| public static final int | |
| pack-priv TableDescriptor |
| Access | Constructor and Description |
|---|---|
| pack-priv | ConstraintDescriptor(DataDictionary
The data dictionary that this descriptor lives in dataDictionary, TableDescriptor The descriptor of the table the constraint is on table, String The name of the constraint. constraintName, boolean If the constraint can be deferred. deferrable, boolean If the constraint starts life deferred. initiallyDeferred, int[] columns that the constraint references referencedColumns, UUID UUID of constraint constraintId, SchemaDescriptor SchemaDescriptor schemaDesc, boolean Is the constraint enforced? enforced)Constructor for a ConstraintDescriptor |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true/falsethe columns to compare otherColumns)Indicates whether the column descriptor list is type comparable with the constraints columns. |
| public boolean | columnIntersects(int[]
columns to check
Note-- this is not a static method. columnArray)Does a column intersect with our referenced columns |
| public boolean | Returns: TRUE if the constraint is DEFERRABLE, FALSE if it is NOT DEFERRABLE.Returns TRUE if the constraint is deferrable |
| pack-priv static boolean | Returns: true/falsethe columns to compare. If
null, asssumed to mean all columns otherColumns, int[] the columns referenced by the caller referencedColumns)Does a column in the input set intersect with our referenced columns? |
| public ConglomerateDescriptor | Returns: If the backing conglomerate for this constraint was a) dropped and b) shared by other constraints/indexes, then this method will return a ConglomerateDescriptor that describes what a new backing conglomerate must look like to stay "sharable" across the remaining constraints/indexes. It is then up to the caller to create a corresponding conglomerate. We don't create the conglomerate here because depending on who called us, it might not make sense to create it--ex. if we get here because of a DROP TABLE, the DropTable action doesn't need to create a new backing conglomerate since the table (and all of its constraints/indexes) are going to disappear anyway.Drop the constraint. |
| public boolean | |
| public String | Returns: char The provider's type.Implements org. Get the provider's type. |
| public ColumnDescriptorList | Returns: the column descriptor listGet the column descriptors for all the columns referenced by this constraint. |
| public abstract UUID | |
| public String | Returns: A String containing the name of the constraint.Gets the name of the constraint. |
| public String | |
| public abstract int | Returns: An identifier telling what type of descriptor it is (UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK).Gets an identifier telling what type of descriptor it is (UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK). |
| public DependableFinder | Returns: the stored form of this providerImplements org. Get an object which can be written to disk and which, when read from disk, will find or reconstruct this in-memory Dependable. |
| public String | |
| public String | getDescriptorType()
Overrides org. Each descriptor must identify itself with its type; i.e index, check constraint whatever. |
| public int[] | getKeyColumns()
Resolve For now the ConstraintDescriptor code stores the array of key columns in the field 'otherColumns'. |
| public UUID | Returns: The provider's UUIDImplements org. Get the provider's UUID |
| public String | Returns: String The name of this provider.Implements org. Return the name of this Provider. |
| public int | Returns: the number of fksGet the number of enforced fks that reference this key. |
| public int[] | Returns: An array of column ids for those constraints that can be on columns (primary, unique key, referential constraints, and check constraints). For check and unique constraints, it returns an array of columns ids that are referenced in the constraint. For primary key and referential constraints, it returns an array of column ids for the columns in this table (i.e. the primary key columns for a primary key constraint, and the foreign key columns for a foreign key constraint.Returns an array of column ids (i.e. ordinal positions) for the columns referenced in this table for a primary key, unique key, referential, or check constraint. |
| public SchemaDescriptor | Returns: SchemaDescriptor The SchemaDescriptor for this constraint.Get the SchemaDescriptor for the schema that this constraint belongs to. |
| public TableDescriptor | Returns: the table descriptorGet the table descriptor upon which this constraint is declared. |
| public UUID | Returns: The UUID of the table the constraint is on.Gets the UUID of the table the constraint is on. |
| public UUID | Returns: The UUID of the constraint.Implements abstract org. Gets the UUID of the constraint. |
| public abstract boolean | Returns: boolean Whether or not there is a backing index for this constraint.Does this constraint have a backing index? |
| public boolean | Returns: TRUE if the constraint is initially DEFERRED, FALSE if the constraint is initially IMMEDIATEReturns TRUE if the constraint is initially deferred |
| public boolean | |
| public synchronized boolean | Returns: true if the dependent is currently validImplements org. Check that all of the dependent's dependencies are valid. |
| public void | makeInvalid(int
The action causing the invalidation action, LanguageConnectionContext The LanguageConnectionContext lcc)Implements org. Mark the dependent as invalid (due to at least one of its dependencies being invalid). |
| public abstract boolean | Returns: true/falsethe type of DML
(StatementType.INSERT|StatementType.UPDATE|StatementType.DELETE) stmtType, int[] the columns modified, or null for all modifiedCols)Does this constraint need to fire on this type of DML? |
| public void | prepareToInvalidate(Provider
the provider p, int The action causing the invalidation action, LanguageConnectionContext The LanguageConnectionContext lcc)Implements org. Prepare to mark the dependent as invalid (due to at least one of its dependencies being invalid). |
| public void | |
| public void | |
| public void | |
| public String | Returns: A String representation of this ColumnDescriptorOverrides java. Convert the ColumnDescriptor to a String. |
| ALL | back to summary |
|---|---|
| public static final int ALL | |
| colDL | back to summary |
|---|---|
| private ColumnDescriptorList colDL | |
| constraintId | back to summary |
|---|---|
| pack-priv final UUID constraintId | |
| constraintName | back to summary |
|---|---|
| pack-priv final String constraintName | |
| deferrable | back to summary |
|---|---|
| private boolean deferrable | |
| DISABLED | back to summary |
|---|---|
| public static final int DISABLED | |
| ENABLED | back to summary |
|---|---|
| public static final int ENABLED | |
| enforced | back to summary |
|---|---|
| private boolean enforced | |
| initiallyDeferred | back to summary |
|---|---|
| private boolean initiallyDeferred | |
| referencedColumns | back to summary |
|---|---|
| private final int[] referencedColumns | |
| schemaDesc | back to summary |
|---|---|
| private final SchemaDescriptor schemaDesc | |
| SYSCONSTRAINTS_STATE_FIELD | back to summary |
|---|---|
| public static final int SYSCONSTRAINTS_STATE_FIELD | |
| table | back to summary |
|---|---|
| pack-priv TableDescriptor table | |
| ConstraintDescriptor | back to summary |
|---|---|
| pack-priv ConstraintDescriptor(DataDictionary dataDictionary, TableDescriptor table, String constraintName, boolean deferrable, boolean initiallyDeferred, int[] referencedColumns, UUID constraintId, SchemaDescriptor schemaDesc, boolean enforced) Constructor for a ConstraintDescriptor
| |
| areColumnsComparable | back to summary |
|---|---|
| public boolean areColumnsComparable(ColumnDescriptorList otherColumns) throws StandardException Indicates whether the column descriptor list is type comparable with the constraints columns. The types have to be identical AND in the same order to succeed.
| |
| columnIntersects | back to summary |
|---|---|
| public boolean columnIntersects(int[] columnArray) Does a column intersect with our referenced columns
| |
| deferrable | back to summary |
|---|---|
| public boolean deferrable() Returns TRUE if the constraint is deferrable
| |
| doColumnsIntersect | back to summary |
|---|---|
| pack-priv static boolean doColumnsIntersect(int[] otherColumns, int[] referencedColumns) Does a column in the input set intersect with our referenced columns?
| |
| drop | back to summary |
|---|---|
| public ConglomerateDescriptor drop(LanguageConnectionContext lcc, boolean clearDependencies) throws StandardException Drop the constraint. Clears dependencies, drops the backing index and removes the constraint from the list on the table descriptor. Does NOT do an dm.invalidateFor()
| |
| enforced | back to summary |
|---|---|
| public boolean enforced() Is this constraint enforced?
| |
| getClassType | back to summary |
|---|---|
| public String getClassType() Implements org. Get the provider's type.
| |
| getColumnDescriptors | back to summary |
|---|---|
| public ColumnDescriptorList getColumnDescriptors() throws StandardException Get the column descriptors for all the columns referenced by this constraint.
| |
| getConglomerateId | back to summary |
|---|---|
| public abstract UUID getConglomerateId() | |
| getConstraintName | back to summary |
|---|---|
| public String getConstraintName() Gets the name of the constraint.
| |
| getConstraintText | back to summary |
|---|---|
| public String getConstraintText() Get the text of the constraint. (Only non-null/meaningful for check constraints.)
| |
| getConstraintType | back to summary |
|---|---|
| public abstract int getConstraintType() Gets an identifier telling what type of descriptor it is (UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK).
| |
| getDependableFinder | back to summary |
|---|---|
| public DependableFinder getDependableFinder() Implements org. Doc from org. Get an object which can be written to disk and which, when read from disk, will find or reconstruct this in-memory Dependable.
| |
| getDescriptorName | back to summary |
|---|---|
| public String getDescriptorName() Overrides org.
| |
| getDescriptorType | back to summary |
|---|---|
| public String getDescriptorType() Overrides org. Doc from org. Each descriptor must identify itself with its type; i.e index, check constraint whatever.
| |
| getKeyColumns | back to summary |
|---|---|
| public int[] getKeyColumns() Resolve For now the ConstraintDescriptor code stores the array of key columns in the field 'otherColumns'. Jerry plans to re-organize things. For now to minimize his rototill I've implemented this function on the old structures. All new code should use getKeyColumns to get a constraint's key columns. | |
| getObjectID | back to summary |
|---|---|
| public UUID getObjectID() Implements org. Get the provider's UUID
| |
| getObjectName | back to summary |
|---|---|
| public String getObjectName() Implements org. Return the name of this Provider. (Useful for errors.)
| |
| getReferenceCount | back to summary |
|---|---|
| public int getReferenceCount() Get the number of enforced fks that reference this key. Overriden by ReferencedKeyConstraints.
| |
| getReferencedColumns | back to summary |
|---|---|
| public int[] getReferencedColumns() Returns an array of column ids (i.e. ordinal positions) for the columns referenced in this table for a primary key, unique key, referential, or check constraint.
| |
| getSchemaDescriptor | back to summary |
|---|---|
| public SchemaDescriptor getSchemaDescriptor() Get the SchemaDescriptor for the schema that this constraint belongs to.
| |
| getTableDescriptor | back to summary |
|---|---|
| public TableDescriptor getTableDescriptor() Get the table descriptor upon which this constraint is declared.
| |
| getTableId | back to summary |
|---|---|
| public UUID getTableId() Gets the UUID of the table the constraint is on.
| |
| getUUID | back to summary |
|---|---|
| public UUID getUUID() Implements abstract org. Gets the UUID of the constraint.
| |
| hasBackingIndex | back to summary |
|---|---|
| public abstract boolean hasBackingIndex() Does this constraint have a backing index?
| |
| initiallyDeferred | back to summary |
|---|---|
| public boolean initiallyDeferred() Returns TRUE if the constraint is initially deferred
| |
| isReferenced | back to summary |
|---|---|
| public boolean isReferenced() Is this constraint referenced? Return false. Overridden by ReferencedKeyConstraints.
| |
| isValid | back to summary |
|---|---|
| public synchronized boolean isValid() Implements org. Check that all of the dependent's dependencies are valid.
| |
| makeInvalid | back to summary |
|---|---|
| public void makeInvalid(int action, LanguageConnectionContext lcc) throws StandardException Implements org. Mark the dependent as invalid (due to at least one of its dependencies being invalid). Always an error for a constraint -- should never have gotten here.
| |
| needsToFire | back to summary |
|---|---|
| public abstract boolean needsToFire(int stmtType, int[] modifiedCols) Does this constraint need to fire on this type of DML?
| |
| prepareToInvalidate | back to summary |
|---|---|
| public void prepareToInvalidate(Provider p, int action, LanguageConnectionContext lcc) throws StandardException Implements org. Prepare to mark the dependent as invalid (due to at least one of its dependencies being invalid).
| |
| setDeferrable | back to summary |
|---|---|
| public void setDeferrable(boolean b) | |
| setEnforced | back to summary |
|---|---|
| public void setEnforced(boolean b) | |
| setInitiallyDeferred | back to summary |
|---|---|
| public void setInitiallyDeferred(boolean b) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Convert the ColumnDescriptor to a String. | |