public class ForeignKeyConstraint extends Constraint
| Constructor and Description |
|---|
ForeignKeyConstraint(DataColumn parentColumn,
DataColumn childColumn)
Initializes a new instance of the
ForeignKeyConstraint class with the specified parent and child DataColumn objects. |
ForeignKeyConstraint(java.lang.String constraintName,
DataColumn[] parentColumns,
DataColumn[] childColumns)
Initializes a new instance of the
ForeignKeyConstraint class with the specified name, and arrays of parent and child DataColumn objects. |
ForeignKeyConstraint(java.lang.String constraintName,
DataColumn parentColumn,
DataColumn childColumn)
Initializes a new instance of the
ForeignKeyConstraint class with the specified name, parent and child DataColumn objects. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addToConstraintCollectionSetup(ConstraintCollection collection) |
boolean |
equals(java.lang.Object key)
Gets a value indicating whether the current
ForeignKeyConstraint is identical to the specified object. |
DataColumn[] |
getColumns()
Gets the child columns of this constraint.
|
Rule |
getDeleteRule()
Gets the action that occurs across this constraint when a row is deleted.
|
DataColumn[] |
getRelatedColumns()
The parent columns of this constraint.
|
DataTable |
getRelatedTable()
Gets the parent table of this constraint.
|
DataTable |
getTable()
Gets the child table of this constraint.
|
Rule |
getUpdateRule()
Gets the action that occurs across this constraint on when a row is updated.
|
int |
hashCode() |
getConstraintName, setConstraintNamepublic ForeignKeyConstraint(java.lang.String constraintName,
DataColumn[] parentColumns,
DataColumn[] childColumns)
ForeignKeyConstraint class with the specified name, and arrays of parent and child DataColumn objects.constraintName - The name of the ForeignKeyConstraint. If null or empty string, a default name will be given when added to the constraints collection.parentColumns - An array of parent DataColumn in the constraint.childColumns - An array of child DataColumn in the constraint.public ForeignKeyConstraint(DataColumn parentColumn, DataColumn childColumn)
ForeignKeyConstraint class with the specified parent and child DataColumn objects.parentColumn - The parent DataColumn in the constraint.childColumn - The child DataColumn in the constraint.public ForeignKeyConstraint(java.lang.String constraintName,
DataColumn parentColumn,
DataColumn childColumn)
ForeignKeyConstraint class with the specified name, parent and child DataColumn objects.constraintName - The name of the constraint.parentColumn - The parent DataColumn in the constraint.childColumn - The child DataColumn in the constraint.public Rule getDeleteRule()
public Rule getUpdateRule()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object key)
ForeignKeyConstraint is identical to the specified object.equals in class java.lang.Objectkey - The object to which this ForeignKeyConstraint is compared. Two ForeignKeyConstraint are equal if they constrain the same columns.public DataColumn[] getColumns()
DataColumn objects that are the child columns of the constraint.public DataColumn[] getRelatedColumns()
DataColumn objects that are the parent columns of the constraint.public DataTable getTable()
DataTable that is the child table in the constraint.public DataTable getRelatedTable()
DataTable of this constraint.protected void addToConstraintCollectionSetup(ConstraintCollection collection) throws DataException, InvalidConstraintException