UniqueConstraint

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

public class UniqueConstraint extends Constraint

Represents a restriction on a set of mDataColumns in which all values must be unique.

Constructors

Constructor Description
UniqueConstraint(String constraintName, DataColumn[] columns, boolean isPK) Initializes a new instance of the UniqueConstraint with the specified name, DataColumns and the flag which indicates whether this constraint is the primary key.
UniqueConstraint(DataColumn[] columns, boolean isPK) Initializes a new instance of the UniqueConstraint class with an array of DataColumn objects to constrain, and a value specifying whether the constraint is a primary key.
UniqueConstraint(DataColumn[] columns) Initializes a new instance of the UniqueConstraint class with the given array of DataColumn objects.
UniqueConstraint(DataColumn column) Initializes a new instance of the UniqueConstraint class with the given array of DataColumn objects.

Methods

Method Description
hashCode()
equals(Object key2)
getColumns()
isPrimaryKey() Gets a value indicating whether or not the constraint is on a primary key.
getTable() Gets the table to which this constraint belongs.

UniqueConstraint(String constraintName, DataColumn[] columns, boolean isPK)

public UniqueConstraint(String constraintName, DataColumn[] columns, boolean isPK)

Initializes a new instance of the UniqueConstraint with the specified name, DataColumns and the flag which indicates whether this constraint is the primary key.

Parameters:

Parameter Type Description
constraintName java.lang.String name
columns DataColumn[] an array of DataColumn that this constraint affects.
isPK boolean flag which indicates whether this constraint is the primary key

UniqueConstraint(DataColumn[] columns, boolean isPK)

public UniqueConstraint(DataColumn[] columns, boolean isPK)

Initializes a new instance of the UniqueConstraint class with an array of DataColumn objects to constrain, and a value specifying whether the constraint is a primary key.

Parameters:

Parameter Type Description
columns DataColumn[] an array of DataColumn that this constraint affects.
isPK boolean flag which indicates whether this constraint is the primary key

UniqueConstraint(DataColumn[] columns)

public UniqueConstraint(DataColumn[] columns)

Initializes a new instance of the UniqueConstraint class with the given array of DataColumn objects.

Parameters:

Parameter Type Description
columns DataColumn[] an array of DataColumn that this constraint affects.

UniqueConstraint(DataColumn column)

public UniqueConstraint(DataColumn column)

Initializes a new instance of the UniqueConstraint class with the given array of DataColumn objects.

Parameters:

Parameter Type Description
column DataColumn one DataColumn that this constraint affects.

hashCode()

public int hashCode()

Returns: int

equals(Object key2)

public boolean equals(Object key2)

Parameters:

Parameter Type Description
key2 java.lang.Object

Returns: boolean

getColumns()

public DataColumn[] getColumns()

Returns: com.groupdocs.assembly.system.data.DataColumn[] - the array of mDataColumns that this constraint affects.

isPrimaryKey()

public boolean isPrimaryKey()

Gets a value indicating whether or not the constraint is on a primary key.

Returns: boolean - value indicating whether or not the constraint is on a primary key.

getTable()

public DataTable getTable()

Gets the table to which this constraint belongs.

Returns: DataTable - table to which this constraint belongs