public class PKConstraint extends UniqueConstraint
PKConstraint represents a Primary Key constraint. A Primary Key
 combines a NOT NULL constraint and a unique constraint in a single declaration.
 That is, it prohibits multiple rows from having the same value in the
 same column or combination of columns and prohibits values from being null.
 Constraint.DeferrableStateAbstractDBObject.ChildSupport, AbstractDBObject.ListenerSupport| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
CONSTRAINT_TYPE  | 
TYPE| Constructor and Description | 
|---|
PKConstraint()
Constructs a new PKConstraint. 
 | 
PKConstraint(java.lang.String name,
            Relation relation)
Constructs a new PKConstraint for the specified Relation with the
 specified name. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
addColumnImpl(Column col,
             Relation relForColumn)  | 
java.lang.String | 
getConstraintType()
Retrieves the type of constraint represented by this instance. 
 | 
static PKConstraint | 
getPrimaryKey(Relation table)
Returns a primary key for the given table, if it owns one. 
 | 
getIndexID, isUnique, setIndexIDaddColumn, getColumnIDs, getColumns, isConstrained, removeColumn, setColumnIDs, setColumnsgetConstraints, getConstraintTypes, getDeferrableState, getRelation, getType, isEnabled, setDeferrableState, setEnabled, setRelationsetParentcheckInit, checkInit, copyToImpl, getOwnedObjectsImpl, getProperties, getReferenceIDsImpl, needsInitialization, processPropertyChange, setIDaddObjectListener, addObjectListener, addObjectListener, changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, equalsImpl, findOwnedObject, findOwnedObject, findOwnedObject, findOwnedObject, findParent, fireObjectUpdated, firePropertyChanged, getChildSupport, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getParent, getProperty, getProperty, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeObjectListener, removeObjectListener, removeObjectListener, removeOwnedObject, removeThisAsParent, replaceReferenceIDs, setName, setProperties, setProperty, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetParentaddObjectListener, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getProperties, getProperty, getProperty, getReferenceIDs, hashCode, removeObjectListener, removeOwnedObject, replaceReferenceIDs, setID, setName, setProperties, setPropertypublic static final java.lang.String CONSTRAINT_TYPE
public PKConstraint()
public PKConstraint(java.lang.String name,
                    Relation relation)
Relation.addConstraint(Constraint) when
 the constraint definition is complete.a - string containing the name of the constraintrelation - the relation on which this constraint actspublic java.lang.String getConstraintType()
ConstraintgetConstraintType in class UniqueConstraintpublic static final PKConstraint getPrimaryKey(Relation table)
protected void addColumnImpl(Column col, Relation relForColumn)
addColumnImpl in class ColumnConstraint