Package org.hibernate.tool.schema
Enum Class UniqueConstraintSchemaUpdateStrategy
java.lang.Object
java.lang.Enum<UniqueConstraintSchemaUpdateStrategy>
org.hibernate.tool.schema.UniqueConstraintSchemaUpdateStrategy
- All Implemented Interfaces:
Serializable
,Comparable<UniqueConstraintSchemaUpdateStrategy>
,Constable
Unique columns and unique keys both use unique constraints in most dialects.
SchemaUpdate needs to create these constraints, but DB's
support for finding existing constraints is extremely inconsistent. Further,
non-explicitly-named unique constraints use randomly generated characters.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAttempt to drop, then (re-)create each unique constraint.Attempt to (re-)create unique constraints, ignoring exceptions thrown (e.g., if the constraint already existed)Do not attempt to create unique constraints on a schema update -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static UniqueConstraintSchemaUpdateStrategy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DROP_RECREATE_QUIETLY
Attempt to drop, then (re-)create each unique constraint. Ignore any exceptions thrown. Note that this will require unique keys/constraints to be explicitly named. If Hibernate generates the names (randomly), the drop will not work. DEFAULT -
RECREATE_QUIETLY
Attempt to (re-)create unique constraints, ignoring exceptions thrown (e.g., if the constraint already existed) -
SKIP
Do not attempt to create unique constraints on a schema update
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
byName
-
interpret
-