public class SQLUnique extends SQLConstraint
| Modifier and Type | Field and Description |
|---|---|
protected static String |
UNIQUE |
columns, CONSTRAINT, constraintName| Constructor and Description |
|---|
SQLUnique(List columns)
Creates a new
SQLPrimaryKey just indicating the column/s in
where the constraint is applied. |
SQLUnique(String constraintName,
List columns)
Creates a new
SQLUnique indicating the name of the
constraint and the columns in where the constraint is applied. |
| Modifier and Type | Method and Description |
|---|---|
String |
toString()
This method returns the SQL Statement to add a Unique constraint to a
database table.
|
getColumnList, getColumns, getConstraintName, setConstraintNameprotected static final String UNIQUE
public SQLUnique(String constraintName, List columns)
SQLUnique indicating the name of the
constraint and the columns in where the constraint is applied.constraintName - The name of the constraint.columns - The column/s that are going to be included into the
constraint.public SQLUnique(List columns)
SQLPrimaryKey just indicating the column/s in
where the constraint is applied. The name of the constraint is generated
by default.columns - The column/s that are going to be included into the
constraint.Copyright © 2016 Imatia Innovation S.L.. All rights reserved.