Package org.hibernate.mapping
Class UniqueKey
- java.lang.Object
-
- org.hibernate.mapping.Constraint
-
- org.hibernate.mapping.UniqueKey
-
- All Implemented Interfaces:
Serializable
,Exportable
public class UniqueKey extends Constraint
A mapping model object representing a unique key constraint on a relational database table.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UniqueKey()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addColumn(Column column, String order)
String
generatedConstraintNamePrefix()
Deprecated, for removal: This API element is subject to removal in a future version.Map<Column,String>
getColumnOrderMap()
String
getExportIdentifier()
Get a unique identifier to make sure we are not exporting the same database structure multiple times.boolean
hasNullableColumn()
boolean
isExplicit()
boolean
isNameExplicit()
void
setExplicit(boolean explicit)
void
setNameExplicit(boolean nameExplicit)
String
sqlConstraintString(SqlStringGenerationContext context, String constraintName, String defaultCatalog, String defaultSchema)
Deprecated, for removal: This API element is subject to removal in a future version.-
Methods inherited from class org.hibernate.mapping.Constraint
addColumn, addColumns, containsColumn, generateName, generateName, getColumn, getColumns, getColumnSpan, getName, getTable, hashedName, isGenerated, setName, setTable, toString
-
-
-
-
Method Detail
-
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 classConstraint
-
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 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.
-
isNameExplicit
public boolean isNameExplicit()
-
setNameExplicit
public void setNameExplicit(boolean nameExplicit)
-
isExplicit
public boolean isExplicit()
-
setExplicit
public void setExplicit(boolean explicit)
-
hasNullableColumn
public boolean hasNullableColumn()
-
-