UniqueConstraint
Leave feedback
On this page
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.
| 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. |
| 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. |
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 |
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 |
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. |
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. |
public int hashCode()
Returns: int
public boolean equals(Object key2)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| key2 | java.lang.Object |
Returns: boolean
public DataColumn[] getColumns()
Returns: com.groupdocs.assembly.system.data.DataColumn[] - the array of mDataColumns that this constraint affects.
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.
public DataTable getTable()
Gets the table to which this constraint belongs.
Returns: DataTable - table to which this constraint belongs
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.