Top Description Fields Constructors Methods
org.hibernate.id

public final Enum SequenceMismatchStrategy

extends Enum<SequenceMismatchStrategy>
Class Inheritance
Imports
org.hibernate.HibernateException

Describes the strategy for handling the mismatch between a database sequence configuration and the one defined by the entity mapping.
Author
Vlad Mihalcea

Field Summary

Modifier and TypeField and Description
public static final SequenceMismatchStrategy
EXCEPTION

When detecting a mismatch, Hibernate throws a org.hibernate.MappingException indicating the sequence whose entity mapping configuration conflict with the one found in the database.

public static final SequenceMismatchStrategy
FIX

When detecting a mismatch, Hibernate tries to fix it by overriding the entity sequence mapping using the one found in the database.

public static final SequenceMismatchStrategy
LOG

When detecting a mismatch, Hibernate simply logs the sequence whose entity mapping configuration conflicts with the one found in the database.

public static final SequenceMismatchStrategy
NONE

Don't perform any check.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static SequenceMismatchStrategy

Returns:

associated SequenceMismatchStrategy object
interpret
(Object
configured SequenceMismatchStrategy representation
sequenceMismatchStrategy
)

Interpret the configured SequenceMismatchStrategy value.

public static SequenceMismatchStrategy
public static SequenceMismatchStrategy[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

EXCEPTIONback to summary
public static final SequenceMismatchStrategy EXCEPTION

When detecting a mismatch, Hibernate throws a org.hibernate.MappingException indicating the sequence whose entity mapping configuration conflict with the one found in the database.

FIXback to summary
public static final SequenceMismatchStrategy FIX

When detecting a mismatch, Hibernate tries to fix it by overriding the entity sequence mapping using the one found in the database.

LOGback to summary
public static final SequenceMismatchStrategy LOG

When detecting a mismatch, Hibernate simply logs the sequence whose entity mapping configuration conflicts with the one found in the database.

NONEback to summary
public static final SequenceMismatchStrategy NONE

Don't perform any check. This is useful to speedup bootstrap as it won't query the sequences on the DB, at cost of not validating the sequences.

Constructor Detail

SequenceMismatchStrategyback to summary
private SequenceMismatchStrategy()

Method Detail

interpretback to summary
public static SequenceMismatchStrategy interpret(Object sequenceMismatchStrategy)

Interpret the configured SequenceMismatchStrategy value.

Valid values are either a SequenceMismatchStrategy object or its String representation.

For string values, the matching is case insensitive, so you can use either FIX or fix.

Parameters
sequenceMismatchStrategy:Object

configured SequenceMismatchStrategy representation

Returns:SequenceMismatchStrategy

associated SequenceMismatchStrategy object

valueOfback to summary
public static SequenceMismatchStrategy valueOf(String name)
valuesback to summary
public static SequenceMismatchStrategy[] values()