Class KeyConstraintDescriptor
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.KeyConstraintDescriptor
- All Implemented Interfaces:
Dependable
,Dependent
,Provider
- Direct Known Subclasses:
ForeignKeyConstraintDescriptor
,ReferencedKeyConstraintDescriptor
This interface is used to get information from a KeyConstraintDescriptor.
A KeyConstraintDescriptor can represent a primary/unique/foreign key
constraint.
- Version:
- 0.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ConglomerateDescriptor
(package private) UUID
interface to this class: public UUID getIndexId(); public ConglomerateDescriptor getIndexConglomerateDescriptor(DataDictionary dd) throws StandardException; public String getIndexUUIDString(); public int[] getKeyColumns();Fields inherited from class org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor
ALL, constraintId, constraintName, DISABLED, ENABLED, SYSCONSTRAINTS_STATE_FIELD, table
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
-
Constructor Summary
ConstructorsConstructorDescriptionKeyConstraintDescriptor
(DataDictionary dataDictionary, TableDescriptor table, String constraintName, boolean deferrable, boolean initiallyDeferred, int[] referencedColumns, UUID constraintId, UUID indexId, SchemaDescriptor schemaDesc, boolean enforced) Constructor for a KeyConstraintDescriptor -
Method Summary
Modifier and TypeMethodDescriptionGet the UUID of the backing index, if one exists.Gets the index conglomerate descriptorGets the UUID of the backing index for the constraint.Gets the UUID String of the backing index for the constraint.boolean
Does this constraint have a backing index?toString()
Convert the SubConstraintDescriptor to a String.Methods inherited from class org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor
areColumnsComparable, columnIntersects, deferrable, doColumnsIntersect, drop, enforced, getClassType, getColumnDescriptors, getConstraintName, getConstraintText, getConstraintType, getDependableFinder, getDescriptorName, getDescriptorType, getKeyColumns, getObjectID, getObjectName, getReferenceCount, getReferencedColumns, getSchemaDescriptor, getTableDescriptor, getTableId, getUUID, initiallyDeferred, isReferenced, isValid, makeInvalid, needsToFire, prepareToInvalidate, setDeferrable, setEnforced, setInitiallyDeferred
Methods inherited from class org.apache.derby.iapi.sql.dictionary.TupleDescriptor
getColumnDependableFinder, getDataDictionary, getDependableFinder, isPersistent, setDataDictionary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.derby.catalog.Dependable
isPersistent
-
Field Details
-
indexId
UUID indexIdinterface to this class:- public UUID getIndexId();
- public ConglomerateDescriptor getIndexConglomerateDescriptor(DataDictionary dd) throws StandardException;
- public String getIndexUUIDString();
- public int[] getKeyColumns();
-
indexConglom
-
-
Constructor Details
-
KeyConstraintDescriptor
KeyConstraintDescriptor(DataDictionary dataDictionary, TableDescriptor table, String constraintName, boolean deferrable, boolean initiallyDeferred, int[] referencedColumns, UUID constraintId, UUID indexId, SchemaDescriptor schemaDesc, boolean enforced) Constructor for a KeyConstraintDescriptor- Parameters:
dataDictionary
- The data dictionary that this descriptor lives intable
- The descriptor of the table the constraint is onconstraintName
- The name of the constraint.deferrable
- If the constraint can be deferred.initiallyDeferred
- If the constraint starts life deferred.referencedColumns
- columns that the constraint referencesconstraintId
- UUID of constraintindexId
- The UUID for the backing indexschemaDesc
- The SchemaDescriptor for the constraintenforced
-true
if this constraint is enforced
-
-
Method Details
-
getIndexId
Gets the UUID of the backing index for the constraint.- Returns:
- The UUID of the backing index for the constraint.
-
getIndexConglomerateDescriptor
public ConglomerateDescriptor getIndexConglomerateDescriptor(DataDictionary dd) throws StandardException Gets the index conglomerate descriptor- Returns:
- the index conglomerate descriptor
- Throws:
StandardException
- on error
-
getIndexUUIDString
Gets the UUID String of the backing index for the constraint.- Returns:
- The UUID String of the backing index for the constraint.
-
hasBackingIndex
public boolean hasBackingIndex()Does this constraint have a backing index?- Specified by:
hasBackingIndex
in classConstraintDescriptor
- Returns:
- boolean Whether or not there is a backing index for this constraint.
-
getConglomerateId
Get the UUID of the backing index, if one exists.- Specified by:
getConglomerateId
in classConstraintDescriptor
- Returns:
- The UUID of the backing index, if one exists, else null.
-
toString
Convert the SubConstraintDescriptor to a String.- Overrides:
toString
in classConstraintDescriptor
- Returns:
- A String representation of this SubConstraintDescriptor
-