org.apache.derby.iapi.sql.dictionary
Class KeyConstraintDescriptor

java.lang.Object
  extended by org.apache.derby.iapi.sql.dictionary.TupleDescriptor
      extended by org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor
          extended by org.apache.derby.iapi.sql.dictionary.KeyConstraintDescriptor
All Implemented Interfaces:
Dependable, Dependent, Provider, UniqueTupleDescriptor
Direct Known Subclasses:
ForeignKeyConstraintDescriptor, ReferencedKeyConstraintDescriptor

public abstract class KeyConstraintDescriptor
extends ConstraintDescriptor

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
private  ConglomerateDescriptor indexConglom
           
(package private)  UUID indexId
          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, isEnabled, 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
KeyConstraintDescriptor(DataDictionary dataDictionary, TableDescriptor table, java.lang.String constraintName, boolean deferrable, boolean initiallyDeferred, int[] referencedColumns, UUID constraintId, UUID indexId, SchemaDescriptor schemaDesc, boolean isEnabled)
          Constructor for a KeyConstraintDescriptor
 
Method Summary
 UUID getConglomerateId()
          Get the UUID of the backing index, if one exists.
 ConglomerateDescriptor getIndexConglomerateDescriptor(DataDictionary dd)
          Gets the index conglomerate descriptor
 UUID getIndexId()
          Gets the UUID of the backing index for the constraint.
 java.lang.String getIndexUUIDString()
          Gets the UUID String of the backing index for the constraint.
 boolean hasBackingIndex()
          Does this constraint have a backing index?
 java.lang.String toString()
          Convert the SubConstraintDescriptor to a String.
 
Methods inherited from class org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor
areColumnsComparable, columnIntersects, deferrable, doColumnsIntersect, drop, getClassType, getColumnDescriptors, getConstraintName, getConstraintText, getConstraintType, getDependableFinder, getDescriptorName, getDescriptorType, getKeyColumns, getObjectID, getObjectName, getReferenceCount, getReferencedColumns, getSchemaDescriptor, getTableDescriptor, getTableId, getUUID, initiallyDeferred, isEnabled, isReferenced, isValid, makeInvalid, needsToFire, prepareToInvalidate, setDisabled, setEnabled
 
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 Detail

indexId

UUID indexId
interface to this class:
  1. public UUID getIndexId();
  2. public ConglomerateDescriptor getIndexConglomerateDescriptor(DataDictionary dd)
  3. throws StandardException;
  4. public String getIndexUUIDString();
  5. public int[] getKeyColumns();


indexConglom

private ConglomerateDescriptor indexConglom
Constructor Detail

KeyConstraintDescriptor

KeyConstraintDescriptor(DataDictionary dataDictionary,
                        TableDescriptor table,
                        java.lang.String constraintName,
                        boolean deferrable,
                        boolean initiallyDeferred,
                        int[] referencedColumns,
                        UUID constraintId,
                        UUID indexId,
                        SchemaDescriptor schemaDesc,
                        boolean isEnabled)
Constructor for a KeyConstraintDescriptor

Parameters:
dataDictionary - The data dictionary that this descriptor lives in
table - The descriptor of the table the constraint is on
constraintName - The name of the constraint.
deferrable - If the constraint can be deferred.
initiallyDeferred - If the constraint starts life deferred.
referencedColumns - columns that the constraint references
constraintId - UUID of constraint
indexId - The UUID for the backing index
schemaDesc - The SchemaDescriptor for the constraint
isEnabled - is this constraint enabled
Method Detail

getIndexId

public UUID 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

public java.lang.String 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 class ConstraintDescriptor
Returns:
boolean Whether or not there is a backing index for this constraint.

getConglomerateId

public UUID getConglomerateId()
Get the UUID of the backing index, if one exists.

Specified by:
getConglomerateId in class ConstraintDescriptor
Returns:
The UUID of the backing index, if one exists, else null.

toString

public java.lang.String toString()
Convert the SubConstraintDescriptor to a String.

Overrides:
toString in class ConstraintDescriptor
Returns:
A String representation of this SubConstraintDescriptor

Built on Thu 2011-03-10 11:54:14+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.