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 voidaddColumn(Column column)StringgeneratedConstraintNamePrefix()StringgetExportIdentifier()Get a unique identifier to make sure we are not exporting the same database structure multiple times.protected StringgetTableNameForLogging(Column column)StringsqlConstraintString(SqlStringGenerationContext context, String constraintName, String defaultCatalog, String defaultSchema)StringsqlConstraintString(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:
addColumnin classConstraint
-
sqlConstraintString
public String sqlConstraintString(SqlStringGenerationContext context, String constraintName, String defaultCatalog, String defaultSchema)
- Specified by:
sqlConstraintStringin classConstraint
-
generatedConstraintNamePrefix
public String generatedConstraintNamePrefix()
- Specified by:
generatedConstraintNamePrefixin classConstraint- Returns:
- String The prefix to use in generated constraint names. Examples: "UK_", "FK_", and "PK_".
-
getExportIdentifier
public String getExportIdentifier()
Description copied from interface:ExportableGet a unique identifier to make sure we are not exporting the same database structure multiple times.- Returns:
- The exporting identifier.
-
-