Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.iapi.sql.dictionary
Class CheckConstraintDescriptor  view CheckConstraintDescriptor download CheckConstraintDescriptor.java

java.lang.Object
  extended byorg.apache.derby.iapi.sql.dictionary.TupleDescriptor
      extended byorg.apache.derby.iapi.sql.dictionary.ConstraintDescriptor
          extended byorg.apache.derby.iapi.sql.dictionary.CheckConstraintDescriptor
All Implemented Interfaces:
org.apache.derby.catalog.Dependable, org.apache.derby.iapi.sql.depend.Dependent, org.apache.derby.iapi.sql.depend.Provider, UniqueTupleDescriptor

public class CheckConstraintDescriptor
extends ConstraintDescriptor

This class represents a check constraint descriptor.


Field Summary
(package private)  java.lang.String constraintText
           
(package private)  org.apache.derby.catalog.ReferencedColumns referencedColumns
           
 
Fields inherited from class org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor
ALL, colDL, constraintId, constraintName, deferrable, DISABLED, ENABLED, initiallyDeferred, isEnabled, schemaDesc, SYSCONSTRAINTS_STATE_FIELD, table
 
Fields inherited from class org.apache.derby.iapi.sql.dictionary.TupleDescriptor
COLUMN_LIST, CONGLOMERATE_LIST, CONSTRAINT_LIST, TRIGGER_LIST
 
Fields inherited from interface org.apache.derby.catalog.Dependable
ALIAS, COLUMNS_IN_TABLE, CONGLOMERATE, CONSTRAINT, DEFAULT, FILE, HEAP, INDEX, PREPARED_STATEMENT, SCHEMA, STORED_PREPARED_STATEMENT, TABLE, TRIGGER, VIEW
 
Constructor Summary
(package private) CheckConstraintDescriptor(DataDictionary dataDictionary, TableDescriptor table, java.lang.String constraintName, boolean deferrable, boolean initiallyDeferred, org.apache.derby.catalog.UUID constraintId, java.lang.String constraintText, org.apache.derby.catalog.ReferencedColumns referencedColumns, SchemaDescriptor schemaDesc, boolean isEnabled)
           
 
Method Summary
 org.apache.derby.catalog.UUID getConglomerateId()
          Get the UUID of the backing index, if one exists.
 java.lang.String getConstraintText()
          Get the text of the constraint.
 int getConstraintType()
          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.
 org.apache.derby.catalog.ReferencedColumns getReferencedColumnsDescriptor()
          Get the ReferencedColumns.
 boolean hasBackingIndex()
          Does this constraint have a backing index?
 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
 void setReferencedColumnsDescriptor(org.apache.derby.catalog.ReferencedColumns rcd)
          Set the ReferencedColumns; used in drop column
 java.lang.String toString()
          Convert the CheckConstraintDescriptor to a String.
 
Methods inherited from class org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor
areColumnsComparable, columnIntersects, deferrable, doColumnsIntersect, getClassType, getColumnDescriptors, getConstraintName, getDependableFinder, getDescriptorName, getDescriptorType, getKeyColumns, getObjectID, getObjectName, getReferenceCount, getSchemaDescriptor, getTableDescriptor, getTableId, getUUID, initiallyDeferred, isEnabled, isReferenced, isValid, makeInvalid, makeValid, prepareToInvalidate, setConstraintId, 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

referencedColumns

org.apache.derby.catalog.ReferencedColumns referencedColumns

constraintText

java.lang.String constraintText
Constructor Detail

CheckConstraintDescriptor

CheckConstraintDescriptor(DataDictionary dataDictionary,
                          TableDescriptor table,
                          java.lang.String constraintName,
                          boolean deferrable,
                          boolean initiallyDeferred,
                          org.apache.derby.catalog.UUID constraintId,
                          java.lang.String constraintText,
                          org.apache.derby.catalog.ReferencedColumns referencedColumns,
                          SchemaDescriptor schemaDesc,
                          boolean isEnabled)
Method Detail

hasBackingIndex

public boolean hasBackingIndex()
Does this constraint have a backing index?

Specified by:
hasBackingIndex in class ConstraintDescriptor

getConstraintType

public int getConstraintType()
Gets an identifier telling what type of descriptor it is (UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK).

Specified by:
getConstraintType in class ConstraintDescriptor

getConstraintText

public java.lang.String getConstraintText()
Get the text of the constraint. (Only non-null/meaningful for check constraints.)

Overrides:
getConstraintText in class ConstraintDescriptor

getConglomerateId

public org.apache.derby.catalog.UUID getConglomerateId()
Get the UUID of the backing index, if one exists.

Specified by:
getConglomerateId in class ConstraintDescriptor

getReferencedColumnsDescriptor

public org.apache.derby.catalog.ReferencedColumns getReferencedColumnsDescriptor()
Get the ReferencedColumns.


setReferencedColumnsDescriptor

public void setReferencedColumnsDescriptor(org.apache.derby.catalog.ReferencedColumns rcd)
Set the ReferencedColumns; used in drop column


getReferencedColumns

public int[] getReferencedColumns()
Get the referenced columns as an int[] of column ids.

Overrides:
getReferencedColumns in class ConstraintDescriptor

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:
needsToFire in class ConstraintDescriptor

toString

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

Overrides:
toString in class ConstraintDescriptor