public abstract class ColumnConstraint extends Constraint
Constraint.DeferrableStateAbstractDBObject.ChildSupport, AbstractDBObject.ListenerSupportTYPE| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(Column col)
Adds a constrained column.
|
protected void |
addColumnImpl(Column col,
Relation relForColumn) |
DBObjectID[] |
getColumnIDs()
Gets the IDs of the columns referenced by this Constraint.
|
Column[] |
getColumns()
Retrieves the constrained columns.
|
static boolean |
isConstrained(Column col,
java.lang.String... constraintTypes)
Tests whether the given Column appears in any ColumnConstraint on its
owning table of given constraint types.
|
boolean |
removeColumn(Column col)
Removes a column from the list of constrained columns.
|
void |
setColumnIDs(DBObjectID[] ids)
Sets the IDs of the columns referenced by this Constraint.
|
void |
setColumns(Column[] columns)
Sets the constrained columns.
|
getConstraints, getConstraintType, 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 Column[] getColumns() throws java.lang.IllegalStateException
java.lang.IllegalStateException - if the constraint is an orphan, or a column
cannot be found in the contraint's owning relation.public void setColumns(Column[] columns)
columns - the array containing the list of columns being constrainedpublic void addColumn(Column col)
col - the Column to add to the list of constrained columnsjava.lang.IllegalStateException - if the constraint is an orphan, or the column
cannot be found in the contraint's owning relation.public boolean removeColumn(Column col)
col - the Column to remove to the list of constrained columnspublic DBObjectID[] getColumnIDs()
public void setColumnIDs(DBObjectID[] ids)
public static boolean isConstrained(Column col, java.lang.String... constraintTypes)
col - the column to tests (must be parented by a table)constraintTypes - the types of
ColumnConstraint to search for.