Uses of Enum Class
jakarta.persistence.LockModeType
Package
Description
Jakarta Persistence is the API for the management for persistence and object/relational mapping.
-
Uses of LockModeType in jakarta.persistence
Modifier and TypeMethodDescriptionEntityManager.getLockMode
(Object entity) Get the current lock mode held by this persistence context on the given managed entity instance.Query.getLockMode()
Get the current lock mode for the query.static LockModeType
Returns the enum constant of this class with the specified name.static LockModeType[]
LockModeType.values()
Returns an array containing the constants of this enum class, in the order they are declared.Modifier and TypeMethodDescription<T> T
EntityManager.find
(Class<T> entityClass, Object primaryKey, LockModeType lockMode) Find by primary key and obtain the given lock type for the resulting entity.<T> T
EntityManager.find
(Class<T> entityClass, Object primaryKey, LockModeType lockMode, Map<String, Object> properties) Find by primary key and lock the entity, using the specified properties.void
EntityManager.lock
(Object entity, LockModeType lockMode) Lock an entity instance belonging to the persistence context, obtaining the specified lock mode.void
EntityManager.lock
(Object entity, LockModeType lockMode, LockOption... options) void
Lock an entity instance belonging to the persistence context, obtaining the specified lock mode, using the specified properties.void
EntityManager.refresh
(Object entity, LockModeType lockMode) Refresh the state of the given managed entity instance from the database, overwriting unflushed changes made to the entity, if any, and obtain the given lock mode.void
Refresh the state of the given managed entity instance from the database, overwriting unflushed changes made to the entity, if any, and obtain the given lock mode, using the specified properties.Query.setLockMode
(LockModeType lockMode) Set the lock mode type to be used for the query execution.TypedQuery.setLockMode
(LockModeType lockMode) Set the lock mode type to be used for the query execution.