Class PrimaryKey

java.lang.Object
org.hibernate.mapping.Constraint
org.hibernate.mapping.PrimaryKey
All Implemented Interfaces:
Serializable, Exportable

public class PrimaryKey extends Constraint
A mapping model object representing a primary key constraint.
See Also:
  • Constructor Details

    • PrimaryKey

      public PrimaryKey(Table table)
  • Method Details

    • addColumn

      public void addColumn(Column column)
      Overrides:
      addColumn in class Constraint
    • getTableNameForLogging

      protected String getTableNameForLogging(Column column)
    • sqlConstraintString

      public String sqlConstraintString(Dialect dialect)
    • sqlConstraintString

      @Deprecated(since="6.2", forRemoval=true) public String sqlConstraintString(SqlStringGenerationContext context, String constraintName, String defaultCatalog, String defaultSchema)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      sqlConstraintString in class Constraint
    • generatedConstraintNamePrefix

      @Deprecated(forRemoval=true) public String generatedConstraintNamePrefix()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      generatedConstraintNamePrefix in class Constraint
      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.
    • getColumnsInOriginalOrder

      public List<Column> getColumnsInOriginalOrder()
    • setOrderingUniqueKey

      public void setOrderingUniqueKey(UniqueKey uniqueKey)
    • getOrderingUniqueKey

      public UniqueKey getOrderingUniqueKey()
    • reorderColumns

      @Internal public void reorderColumns(List<Column> reorderedColumns)
    • getOriginalOrder

      @Internal public int[] getOriginalOrder()