Top Description Fields Constructors Methods
org.apache.derby.iapi.sql.dictionary

public abstract Class KeyConstraintDescriptor

extends ConstraintDescriptor
Class Inheritance
Known Direct Subclasses
org.apache.derby.iapi.sql.dictionary.ReferencedKeyConstraintDescriptor, org.apache.derby.iapi.sql.dictionary.ForeignKeyConstraintDescriptor
Imports
org.apache.derby.shared.common.error.StandardException, org.apache.derby.catalog.UUID, org.apache.derby.shared.common.sanity.SanityManager

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

Modifier and TypeField and Description
private ConglomerateDescriptor
pack-priv UUID
indexId

interface to this class:

  1. public UUID getIndexId();
  2. public ConglomerateDescriptor getIndexConglomerateDescriptor(DataDictionary dd) throws StandardException;
  3. public String getIndexUUIDString();
  4. public int[] getKeyColumns();
Inherited from org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor:
ALLconstraintIdconstraintNameDISABLEDENABLEDSYSCONSTRAINTS_STATE_FIELDtable

Constructor Summary

AccessConstructor and Description
pack-priv
KeyConstraintDescriptor(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
,
UUID
The UUID for the backing index
indexId
,
SchemaDescriptor
The SchemaDescriptor for the constraint
schemaDesc
,
boolean
true if this constraint is enforced
enforced
)

Constructor for a KeyConstraintDescriptor

Method Summary

Modifier and TypeMethod and Description
public UUID

Returns:

The UUID of the backing index, if one exists, else null.
getConglomerateId
()

Implements abstract org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor.getConglomerateId.

Get the UUID of the backing index, if one exists.

public ConglomerateDescriptor

Returns:

the index conglomerate descriptor
getIndexConglomerateDescriptor
(DataDictionary dd)

Gets the index conglomerate descriptor

public UUID

Returns:

The UUID of the backing index for the constraint.
getIndexId
()

Gets the UUID of the backing index for the constraint.

public String

Returns:

The UUID String of the backing index for the constraint.
getIndexUUIDString
()

Gets the UUID String of the backing index for the constraint.

public boolean

Returns:

boolean Whether or not there is a backing index for this constraint.
hasBackingIndex
()

Implements abstract org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor.hasBackingIndex.

Does this constraint have a backing index?

public String

Returns:

A String representation of this SubConstraintDescriptor
toString
()

Overrides org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor.toString.

Convert the SubConstraintDescriptor to a String.

Inherited from org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor:
areColumnsComparablecolumnIntersectsdeferrabledoColumnsIntersectdropenforcedgetClassTypegetColumnDescriptorsgetConstraintNamegetConstraintTextgetConstraintTypegetDependableFindergetDescriptorNamegetDescriptorTypegetKeyColumnsgetObjectIDgetObjectNamegetReferenceCountgetReferencedColumnsgetSchemaDescriptorgetTableDescriptorgetTableIdgetUUIDinitiallyDeferredisReferencedisValidmakeInvalidneedsToFireprepareToInvalidatesetDeferrablesetEnforcedsetInitiallyDeferred

Field Detail

indexConglomback to summary
private ConglomerateDescriptor indexConglom
indexIdback to summary
pack-priv 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();

Constructor Detail

KeyConstraintDescriptorback to summary
pack-priv 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:DataDictionary

The data dictionary that this descriptor lives in

table:TableDescriptor

The descriptor of the table the constraint is on

constraintName:String

The name of the constraint.

deferrable:boolean

If the constraint can be deferred.

initiallyDeferred:boolean

If the constraint starts life deferred.

referencedColumns:int[]

columns that the constraint references

constraintId:UUID

UUID of constraint

indexId:UUID

The UUID for the backing index

schemaDesc:SchemaDescriptor

The SchemaDescriptor for the constraint

enforced:boolean

true if this constraint is enforced

Method Detail

getConglomerateIdback to summary
public UUID getConglomerateId()

Implements abstract org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor.getConglomerateId.

Get the UUID of the backing index, if one exists.

Returns:UUID

The UUID of the backing index, if one exists, else null.

getIndexConglomerateDescriptorback to summary
public ConglomerateDescriptor getIndexConglomerateDescriptor(DataDictionary dd) throws StandardException

Gets the index conglomerate descriptor

Returns:ConglomerateDescriptor

the index conglomerate descriptor

Exceptions
StandardException:
on error
getIndexIdback to summary
public UUID getIndexId()

Gets the UUID of the backing index for the constraint.

Returns:UUID

The UUID of the backing index for the constraint.

getIndexUUIDStringback to summary
public String getIndexUUIDString()

Gets the UUID String of the backing index for the constraint.

Returns:String

The UUID String of the backing index for the constraint.

hasBackingIndexback to summary
public boolean hasBackingIndex()

Implements abstract org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor.hasBackingIndex.

Does this constraint have a backing index?

Returns:boolean

boolean Whether or not there is a backing index for this constraint.

toStringback to summary
public String toString()

Overrides org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor.toString.

Convert the SubConstraintDescriptor to a String.

Returns:String

A String representation of this SubConstraintDescriptor