ForeignKeyConstraint

Inheritance: java.lang.Object, com.groupdocs.assembly.system.data.Constraint

public class ForeignKeyConstraint extends Constraint

Represents an action restriction enforced on a set of columns in a primary key/foreign key relationship when a value or row is either deleted or updated.

Constructors

Constructor Description
ForeignKeyConstraint(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(DataColumn parentColumn, DataColumn childColumn) Initializes a new instance of the ForeignKeyConstraint class, and arrays of parent and child DataColumn objects.
ForeignKeyConstraint(String constraintName, DataColumn parentColumn, DataColumn childColumn) Initializes a new instance of the ForeignKeyConstraint class with the specified name, parent and child DataColumn objects.

Methods

ForeignKeyConstraint(String constraintName, DataColumn[] parentColumns, DataColumn[] childColumns)

public ForeignKeyConstraint(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.

Parameters:

Parameter Type Description
constraintName java.lang.String the specified constraint name
parentColumns DataColumn[] an array of parent DataColumn
childColumns DataColumn[] an array of child DataColumn

ForeignKeyConstraint(DataColumn parentColumn, DataColumn childColumn)

public ForeignKeyConstraint(DataColumn parentColumn, DataColumn childColumn)

Initializes a new instance of the ForeignKeyConstraint class, and arrays of parent and child DataColumn objects.

Parameters:

Parameter Type Description
parentColumn DataColumn an array of parent DataColumn
childColumn DataColumn an array of child DataColumn

ForeignKeyConstraint(String constraintName, DataColumn parentColumn, DataColumn childColumn)

public ForeignKeyConstraint(String constraintName, DataColumn parentColumn, DataColumn childColumn)

Initializes a new instance of the ForeignKeyConstraint class with the specified name, parent and child DataColumn objects.

Parameters:

Parameter Type Description
constraintName java.lang.String the specified constraint name
parentColumn DataColumn parent DataColumn
childColumn DataColumn child DataColumn

getDeleteRule()

public Rule getDeleteRule()

Returns: Rule - the action Rule that occurs across this constraint when a row is deleted.

getUpdateRule()

public Rule getUpdateRule()

Returns: Rule - the action Rule that occurs across this constraint on when a row is updated.

hashCode()

public int hashCode()

Returns: int

equals(Object key)

public boolean equals(Object key)

Parameters:

Parameter Type Description
key java.lang.Object

Returns: boolean

getColumns()

public DataColumn[] getColumns()

Returns: com.groupdocs.assembly.system.data.DataColumn[] - the child columns of this constraint.

getRelatedColumns()

public DataColumn[] getRelatedColumns()

The parent columns of this constraint.

Returns: com.groupdocs.assembly.system.data.DataColumn[] - parent columns of this constraint

getTable()

public DataTable getTable()

Returns: DataTable - the child table of this constraint

getRelatedTable()

public DataTable getRelatedTable()

Returns: DataTable - The parent columns of this constraint.

getAcceptRejectRule()

public AcceptRejectRule getAcceptRejectRule()

Returns: com.groupdocs.assembly.system.data.AcceptRejectRule - AcceptRejectRule but it is not implemented yet.