public class SQLPrimaryKey extends SQLConstraint
| Modifier and Type | Field and Description |
|---|---|
protected static String |
PRIMARY_KEY |
columns, CONSTRAINT, constraintName| Constructor and Description |
|---|
SQLPrimaryKey(List columns)
Creates a new
SQLPrimaryKey just indicating the column/s in
where the constraint is applied. |
SQLPrimaryKey(String constraintName)
Creates a new
SQLPrimaryKey indicating the name of the
constraint.Only use to drop constraints. |
SQLPrimaryKey(String constraintName,
List columns)
Creates a new
SQLPrimaryKey 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 Primary Key constraint to
a database table.
|
getColumnList, getColumns, getConstraintName, setConstraintNameprotected static final String PRIMARY_KEY
public SQLPrimaryKey(String constraintName, List columns)
SQLPrimaryKey indicating the name of the
constraint and the columns in where the constraint is applied.constraintName - Name of the constraintcolumns - The list of columns in where the constraint is applied.public SQLPrimaryKey(String constraintName)
SQLPrimaryKey indicating the name of the
constraint.Only use to drop constraints.constraintName - Name of the constraintpublic SQLPrimaryKey(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 list of columns in where the constraint is applied.Copyright © 2016 Imatia Innovation S.L.. All rights reserved.