org.hibernate.metamodel.relational
Class PrimaryKey
java.lang.Object
org.hibernate.metamodel.relational.AbstractConstraint
org.hibernate.metamodel.relational.PrimaryKey
- All Implemented Interfaces:
- Constraint, Exportable
public class PrimaryKey
- extends AbstractConstraint
- implements Constraint, Exportable
Models a table's primary key.
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PrimaryKey
protected PrimaryKey(TableSpecification table)
getName
public String getName()
- Description copied from interface:
Constraint
- Obtain the constraint name.
- Specified by:
getName
in interface Constraint
- Overrides:
getName
in class AbstractConstraint
- Returns:
- the name.
setName
public void setName(String name)
getExportIdentifier
public String getExportIdentifier()
- Description copied from interface:
Exportable
- Get a unique identifier to make sure we are not exporting the same database structure multiple times.
- Specified by:
getExportIdentifier
in interface Exportable
- Returns:
- The exporting identifier.
sqlConstraintStringInCreateTable
public String sqlConstraintStringInCreateTable(Dialect dialect)
sqlConstraintStringInAlterTable
public String sqlConstraintStringInAlterTable(Dialect dialect)
- Specified by:
sqlConstraintStringInAlterTable
in class AbstractConstraint
Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.