public class PrimaryKey extends AbstractConstraint implements Constraint, Exportable
NOTE : This need not be a physical primary key; we just mean a column or columns which uniquely identify rows in the table. Of course it is recommended to define proper integrity constraints, including primary keys.
Modifier | Constructor and Description |
---|---|
protected |
PrimaryKey(TableSpecification table) |
Modifier and Type | Method and Description |
---|---|
String |
getExportIdentifier()
Get a unique identifier to make sure we are not exporting the same database structure multiple times.
|
String |
getName()
Obtain the constraint name.
|
void |
setName(String name) |
String |
sqlConstraintStringInAlterTable(Dialect dialect) |
String |
sqlConstraintStringInCreateTable(Dialect dialect) |
addColumn, getColumns, getColumnSpan, getTable, internalAddColumn, internalColumnAccess, isCreationVetoed, sqlCreateStrings, sqlDropStrings
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getColumns, getTable
sqlCreateStrings, sqlDropStrings
protected PrimaryKey(TableSpecification table)
public String getName()
Constraint
getName
in interface Constraint
getName
in class AbstractConstraint
public void setName(String name)
public String getExportIdentifier()
Exportable
getExportIdentifier
in interface Exportable
public String sqlConstraintStringInAlterTable(Dialect dialect)
sqlConstraintStringInAlterTable
in class AbstractConstraint
Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.