Package org.hibernate.mapping
Class PrimaryKey
- java.lang.Object
-
- org.hibernate.mapping.Constraint
-
- org.hibernate.mapping.PrimaryKey
-
- All Implemented Interfaces:
Serializable
,Exportable
,RelationalModel
public class PrimaryKey extends Constraint
A primary key constraint- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PrimaryKey(Table table)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addColumn(Column column)
String
generatedConstraintNamePrefix()
String
getExportIdentifier()
Get a unique identifier to make sure we are not exporting the same database structure multiple times.protected String
getTableNameForLogging(Column column)
String
sqlConstraintString(SqlStringGenerationContext context, String constraintName, String defaultCatalog, String defaultSchema)
String
sqlConstraintString(Dialect dialect)
-
Methods inherited from class org.hibernate.mapping.Constraint
addColumns, columnIterator, containsColumn, generateName, generateName, getColumn, getColumnIterator, getColumns, getColumnSpan, getName, getTable, hashedName, isGenerated, setName, setTable, sqlCreateString, sqlDropString, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.mapping.RelationalModel
sqlCreateString, sqlDropString
-
-
-
-
Constructor Detail
-
PrimaryKey
public PrimaryKey(Table table)
-
-
Method Detail
-
addColumn
public void addColumn(Column column)
- Overrides:
addColumn
in classConstraint
-
sqlConstraintString
public String sqlConstraintString(SqlStringGenerationContext context, String constraintName, String defaultCatalog, String defaultSchema)
- Specified by:
sqlConstraintString
in classConstraint
-
generatedConstraintNamePrefix
public String generatedConstraintNamePrefix()
- Specified by:
generatedConstraintNamePrefix
in classConstraint
- Returns:
- String The prefix to use in generated constraint names. Examples: "UK_", "FK_", and "PK_".
-
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.- Returns:
- The exporting identifier.
-
-