About LockModeType

11-20 of 41Refresh
JPA Doc
71

LockModeType.WRITE

Enum Constant javax.persistence.LockModeType WRITE Synonymous with OPTIMISTIC_FORCE_INCREMENT. OPTIMISTIC_FORCE_IMCREMENT is to be preferred for new applications. Since: JPA 1.0
Manual
48

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
Manual
19

Setting and Tuning of JPA Queries

.setLockMode(LockModeType.PESSIMISTIC_WRITE) .getResultList(); Notice that when a query
JPA Doc
15

javax.persistence.EntityManager

 primaryKey, LockModeType lockMode) Find by primary key and lock. Find by primary key and lock ... , LockModeType lockMode, Map properties) Find by primary key and lock, using ... : flushMode Since: JPA 1.0 LockModeType getLockMode(Object entity) Get the current lock mode
JPA Doc
11

javax.persistence.EntityNotFoundException

(Class,Object) EntityManager.refresh(Object) EntityManager.refresh(Object, LockModeType) EntityManager.refresh(Object, java.util.Map) EntityManager.refresh(Object, LockModeType, java.util.Map) EntityManager.lock(Object, LockModeType) EntityManager.lock(Object, LockModeType, java.util.Map
JPA Doc
11

javax.persistence.OptimisticLockException

, Object, LockModeType) EntityManager.find(Class, Object, LockModeType, java.util.Map) EntityManager.lock(Object, LockModeType) EntityManager.lock(Object, LockModeType, java.util.Map
JPA Doc
10

javax.persistence.NamedQuery

value: {} Since: JPA 1.0 LockModeType lockMode (Optional) The lock mode type to use in query execution. (Optional) The lock mode type to use in query execution. If a lockMode other than LockModeType ... .LockModeType.NONE Since: JPA 2.0 String name (Required) The name used to refer to the query
JPA Doc
10

javax.persistence.TypedQuery

for the query instance. Returns: query properties and hints Since: JPA 2.0 LockModeType getLockMode ... argument is not valid for the implementation Since: JPA 2.0 Query setLockMode( LockModeType lockMode ... a Criteria API query Since: JPA 2.0 TypedQuery setLockMode( LockModeType lockMode) Set the lock
JPA Doc
10

NamedQuery.lockMode

Annotation Element javax.persistence.NamedQuery LockModeType lockMode (Optional) The lock mode type to use in query execution. If a lockMode other than LockModeType.NONE is specified, the query must be executed in a transaction. Default value: javax.persistence.LockModeType.NONE Since: JPA 2.0
JPA Doc
8

javax.persistence.Query

instance. Returns: query properties and hints Since: JPA 2.0 LockModeType getLockMode() Get the current ... Query setLockMode( LockModeType lockMode) Set the lock mode type to be used for the query execution