Home » Search

About LockModeType

1-10 of 42Refresh
JPA Doc
103

javax.persistence.LockModeType

javax.persistence Enum LockModeType java.lang.Object java.lang.EnumLockModeType> javax.persistence.LockModeType Implemented Interfaces: Serializable, Comparable<LockModeType> Lock modes can be specified by means of passing a LockModeType argument to one of the javax
Manual
90

Locking in JPA

explicitly by the lock method: em.lock(employee, LockModeType.PESSIMISTIC_WRITE); The first ... so:   em.lock(employee, LockModeType.NONE); Other Explicit Lock Modes In addition to the two main ... employee = em.find( Employee.class, 1, LockModeType.PESSIMISTIC_WRITE); Similarly, the refresh
JPA Doc
77

values()

Static Method javax.persistence.LockModeType LockModeType[] values() Returns an array containing the constants of this enum type. This method may be used to iterate over the constants as follows: for (LockModeType c : LockModeType.values()) System.out.println(c) Returns: an array containing
JPA Doc
74

valueOf(name)

Static Method javax.persistence.LockModeType LockModeType valueOf(   String name ) Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. Parameters: name - the name of the enum constant
JPA Doc
71

LockModeType.NONE

Enum Constant javax.persistence.LockModeType NONE No lock. Since: JPA 2.0
JPA Doc
71

LockModeType.OPTIMISTIC

Enum Constant javax.persistence.LockModeType OPTIMISTIC Optimistic lock. Since: JPA 2.0
JPA Doc
71

LockModeType.OPTIMISTIC_FORCE_INCREMENT

Enum Constant javax.persistence.LockModeType OPTIMISTIC_FORCE_INCREMENT Optimistic lock, with version update. Since: JPA 2.0
JPA Doc
71

LockModeType.PESSIMISTIC_FORCE_INCREMENT

Enum Constant javax.persistence.LockModeType PESSIMISTIC_FORCE_INCREMENT Pessimistic write lock, with version update. Since: JPA 2.0
JPA Doc
71

LockModeType.PESSIMISTIC_READ

Enum Constant javax.persistence.LockModeType PESSIMISTIC_READ Pessimistic read lock. Since: JPA 2.0
JPA Doc
71

LockModeType.PESSIMISTIC_WRITE

Enum Constant javax.persistence.LockModeType PESSIMISTIC_WRITE Pessimistic write lock. Since: JPA 2.0