About LockMode

manual

Locking in JPA

Explains how to use optimistic locking and pessimistic locking in JPA.... be locked explicitly by the lock lock(entity, lockMode) EntityManager's method Lock an entity instance that is ... method: em. lock lock(entity, lockMode) EntityManager's method Lock an entity instance that is ...

 
api-jpa

lock(entity, lockMode)

Lock an entity instance that is contained in the persistence context with the specified lock mode type.(Method of javax.persistence.EntityManager)

 
api-jpa

NamedQuery.lockMode

(Optional) The lock mode type to use in query execution.(Annotation Element of javax.persistence.NamedQuery)

 
api-jpa

refresh(entity, lockMode)

Refresh the state of the instance from the database, overwriting changes made to the entity, if any, and lock it with respect to given lock mode type.(Method of javax.persistence.EntityManager)

 
api-jpa

setLockMode(lockMode)

Set the lock mode type to be used for the query execution.(Method of javax.persistence.TypedQuery)

 
api-jpa

find(entityClass, primaryKey, lockMode)

Find by primary key and lock.(Method of javax.persistence.EntityManager)

 
api-jpa

setLockMode(lockMode)

Set the lock mode type to be used for the query execution.(Method of javax.persistence.Query)

 
api-jpa

lock(entity, lockMode, properties)

Lock an entity instance that is contained in the persistence context with the specified lock mode type and with specified properties.(Method of javax.persistence.EntityManager)

 
api-jpa

find(entityClass, primaryKey, lockMode, properties)

Find by primary key and lock, using the specified properties.(Method of javax.persistence.EntityManager)

 
api-jpa

find(entityClass, primaryKey, lockMode, properties)

Find by primary key and lock, using the specified properties.(Method of javax.persistence.EntityManager)