Package org.hibernate
Enum Class Locking.FollowOn
- All Implemented Interfaces:
FindOption
,LockOption
,RefreshOption
,Serializable
,Comparable<Locking.FollowOn>
,Constable
- Enclosing interface:
Locking
public static enum Locking.FollowOn
extends Enum<Locking.FollowOn>
implements FindOption, LockOption, RefreshOption
In certain circumstances, Hibernate may need to acquire locks
through the use of additional queries. For example, some
databases may not allow locking rows for queries with a join or
with pagination. In such cases, Hibernate will fall back
to issuing additional queries to lock the matching rows.
This option controls whether Hibernate is allowed to use
this approach.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionInterprets the follow-on strategy into the legacy boolean values.static Locking.FollowOn
fromLegacyValue
(Boolean value) Given a legacy boolean value, interpret the follow-on strategy.static Locking.FollowOn
static Locking.FollowOn
Returns the enum constant of this class with the specified name.static Locking.FollowOn[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ALLOW
Allow follow-on locking when necessary. -
DISALLOW
Disallow follow-on locking, throwing an exception instead. -
IGNORE
Disallow follow-on locking, but ignoring the situation rather than throw an exception.- See Also:
- API Note:
- This can lead to rows not being locked when they are expected to be.
-
FORCE
Force the use of follow-on locking.- API Note:
- This may lead to exceptions from the database.
-
-
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
-
interpret
-
asLegacyValue
Interprets the follow-on strategy into the legacy boolean values. -
fromLegacyValue
Given a legacy boolean value, interpret the follow-on strategy.
-