Package org.hibernate.mapping
Class UniqueKey
- java.lang.Object
-
- org.hibernate.mapping.Constraint
-
- org.hibernate.mapping.UniqueKey
-
- All Implemented Interfaces:
Serializable
,Exportable
,RelationalModel
public class UniqueKey extends Constraint
A relational unique key constraint- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UniqueKey()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addColumn(Column column, String order)
String
generatedConstraintNamePrefix()
Map<Column,String>
getColumnOrderMap()
String
getExportIdentifier()
Get a unique identifier to make sure we are not exporting the same database structure multiple times.String
sqlConstraintString(SqlStringGenerationContext context, String constraintName, String defaultCatalog, String defaultSchema)
String
sqlCreateString(Mapping p, SqlStringGenerationContext context, String defaultCatalog, String defaultSchema)
String
sqlDropString(SqlStringGenerationContext context, String defaultCatalog, String defaultSchema)
-
Methods inherited from class org.hibernate.mapping.Constraint
addColumn, addColumns, columnIterator, containsColumn, generateName, generateName, getColumn, getColumnIterator, getColumns, getColumnSpan, getName, getTable, hashedName, isGenerated, setName, setTable, 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
-
-
-
-
Method Detail
-
sqlConstraintString
public String sqlConstraintString(SqlStringGenerationContext context, String constraintName, String defaultCatalog, String defaultSchema)
- Specified by:
sqlConstraintString
in classConstraint
-
sqlCreateString
public String sqlCreateString(Mapping p, SqlStringGenerationContext context, String defaultCatalog, String defaultSchema)
- Specified by:
sqlCreateString
in interfaceRelationalModel
- Overrides:
sqlCreateString
in classConstraint
-
sqlDropString
public String sqlDropString(SqlStringGenerationContext context, String defaultCatalog, String defaultSchema)
- Specified by:
sqlDropString
in interfaceRelationalModel
- Overrides:
sqlDropString
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.
-
-