org.apache.derby.iapi.sql.dictionary
Class CheckConstraintDescriptor
- java.lang.Object
-
- org.apache.derby.iapi.sql.dictionary.TupleDescriptor
-
- org.apache.derby.iapi.sql.dictionary.UniqueTupleDescriptor
-
- org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor
-
- org.apache.derby.iapi.sql.dictionary.CheckConstraintDescriptor
-
- All Implemented Interfaces:
- Dependable, Dependent, Provider
public class CheckConstraintDescriptor extends ConstraintDescriptor
This class represents a check constraint descriptor.
-
-
Field Summary
-
Fields inherited from class org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor
ALL, DISABLED, ENABLED, SYSCONSTRAINTS_STATE_FIELD
-
Fields inherited from interface org.apache.derby.catalog.Dependable
ACTIVATION, ALIAS, COLUMNS_IN_TABLE, COLUMNS_PERMISSION, CONGLOMERATE, CONSTRAINT, DEFAULT, FILE, HEAP, INDEX, PERM, PREPARED_STATEMENT, ROLE_GRANT, ROUTINE_PERMISSION, SCHEMA, SEQUENCE, STORED_PREPARED_STATEMENT, TABLE, TABLE_PERMISSION, TRIGGER, VIEW
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description UUIDgetConglomerateId()Get the UUID of the backing index, if one exists.java.lang.StringgetConstraintText()Get the text of the constraint.intgetConstraintType()Gets an identifier telling what type of descriptor it is (UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK).int[]getReferencedColumns()Get the referenced columns as an int[] of column ids.ReferencedColumnsgetReferencedColumnsDescriptor()Get the ReferencedColumns.booleanhasBackingIndex()Does this constraint have a backing index?booleanneedsToFire(int stmtType, int[] modifiedCols)Does this constraint need to fire on this type of DML? For a check constraint, all inserts, and appropriate updatesvoidsetReferencedColumnsDescriptor(ReferencedColumns rcd)Set the ReferencedColumns; used in drop columnjava.lang.StringtoString()Convert the CheckConstraintDescriptor to a String.-
Methods inherited from class org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor
areColumnsComparable, columnIntersects, deferrable, drop, enforced, getClassType, getColumnDescriptors, getConstraintName, getDependableFinder, getDescriptorName, getDescriptorType, getKeyColumns, getObjectID, getObjectName, getReferenceCount, getSchemaDescriptor, getTableDescriptor, getTableId, getUUID, initiallyDeferred, isReferenced, isValid, makeInvalid, prepareToInvalidate, setDeferrable, setEnforced, setInitiallyDeferred
-
Methods inherited from class org.apache.derby.iapi.sql.dictionary.TupleDescriptor
isPersistent
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.derby.catalog.Dependable
isPersistent
-
-
-
-
Method Detail
-
hasBackingIndex
public boolean hasBackingIndex()
Does this constraint have a backing index?- Specified by:
hasBackingIndexin classConstraintDescriptor- Returns:
- boolean Whether or not there is a backing index for this constraint.
-
getConstraintType
public int getConstraintType()
Gets an identifier telling what type of descriptor it is (UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK).- Specified by:
getConstraintTypein classConstraintDescriptor- Returns:
- An identifier telling what type of descriptor it is (UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK).
-
getConstraintText
public java.lang.String getConstraintText()
Get the text of the constraint. (Only non-null/meaningful for check constraints.)- Overrides:
getConstraintTextin classConstraintDescriptor- Returns:
- The constraint text.
-
getConglomerateId
public UUID getConglomerateId()
Get the UUID of the backing index, if one exists.- Specified by:
getConglomerateIdin classConstraintDescriptor- Returns:
- The UUID of the backing index, if one exists, else null.
-
getReferencedColumnsDescriptor
public ReferencedColumns getReferencedColumnsDescriptor()
Get the ReferencedColumns.- Returns:
- The ReferencedColumns.
-
setReferencedColumnsDescriptor
public void setReferencedColumnsDescriptor(ReferencedColumns rcd)
Set the ReferencedColumns; used in drop column- Parameters:
rcd- The new ReferencedColumns.
-
getReferencedColumns
public int[] getReferencedColumns()
Get the referenced columns as an int[] of column ids.- Overrides:
getReferencedColumnsin classConstraintDescriptor- Returns:
- The array of referenced column ids.
-
needsToFire
public boolean needsToFire(int stmtType, int[] modifiedCols)Does this constraint need to fire on this type of DML? For a check constraint, all inserts, and appropriate updates- Specified by:
needsToFirein classConstraintDescriptor- Parameters:
stmtType- the type of DML (StatementType.INSERT|StatementType.UPDATE|StatementType.DELETE)modifiedCols- the columns modified, or null for all- Returns:
- true/false
-
toString
public java.lang.String toString()
Convert the CheckConstraintDescriptor to a String.- Overrides:
toStringin classConstraintDescriptor- Returns:
- A String representation of this CheckConstraintDescriptor
-
-
DataMelt 3.0 © DataMelt by jWork.ORG