org.hibernate.mapping
Class UniqueKey

java.lang.Object
  extended by org.hibernate.mapping.Constraint
      extended by org.hibernate.mapping.UniqueKey
All Implemented Interfaces:
Serializable, RelationalModel

public class UniqueKey
extends Constraint

A relational unique key constraint

See Also:
Serialized Form

Constructor Summary
UniqueKey()
           
 
Method Summary
 String generatedConstraintNamePrefix()
           
 String sqlConstraintString(Dialect dialect, String constraintName, String defaultCatalog, String defaultSchema)
           
 String sqlCreateString(Dialect dialect, Mapping p, String defaultCatalog, String defaultSchema)
           
 String sqlDropString(Dialect dialect, 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
 

Constructor Detail

UniqueKey

public UniqueKey()
Method Detail

sqlConstraintString

public String sqlConstraintString(Dialect dialect,
                                  String constraintName,
                                  String defaultCatalog,
                                  String defaultSchema)
Specified by:
sqlConstraintString in class Constraint

sqlCreateString

public String sqlCreateString(Dialect dialect,
                              Mapping p,
                              String defaultCatalog,
                              String defaultSchema)
Specified by:
sqlCreateString in interface RelationalModel
Overrides:
sqlCreateString in class Constraint

sqlDropString

public String sqlDropString(Dialect dialect,
                            String defaultCatalog,
                            String defaultSchema)
Specified by:
sqlDropString in interface RelationalModel
Overrides:
sqlDropString in class Constraint

generatedConstraintNamePrefix

public String generatedConstraintNamePrefix()
Specified by:
generatedConstraintNamePrefix in class Constraint
Returns:
String The prefix to use in generated constraint names. Examples: "UK_", "FK_", and "PK_".


Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.