Uses of Enum Class
jakarta.persistence.LockModeType
Packages that use LockModeType
Package
Description
Defines the core APIs for the management for persistence and
object/relational mapping.
Defines an API for the programmatic definition of SQL result set
mappings to Java classes.
-
Uses of LockModeType in jakarta.persistence
Subclasses with type arguments of type LockModeType in jakarta.persistenceModifier and TypeClassDescriptionenumEnumerates the kinds of optimistic or pessimistic lock which may be obtained on an entity instance.Methods in jakarta.persistence that return LockModeTypeModifier and TypeMethodDescriptionEntityManager.getLockMode(Object entity) Get the current lock mode held by this persistence context on the given managed entity instance.Query.getLockMode()Deprecated, for removal: This API element is subject to removal in a future version.TypedQuery.getLockMode()The current lock mode for the query ornullif a lock mode has not been set.static LockModeTypeReturns 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.Methods in jakarta.persistence with parameters of type LockModeTypeModifier and TypeMethodDescription<T> TEntityManager.find(Class<T> entityClass, Object primaryKey, LockModeType lockMode, Map<String, Object> properties) Find by primary key and lock the entity, using the specified properties.voidEntityManager.lock(Object entity, LockModeType lockMode) Lock an entity instance belonging to the persistence context, obtaining the specified lock mode.voidEntityManager.lock(Object entity, LockModeType lockMode, LockOption... options) voidLock an entity instance belonging to the persistence context, obtaining the specified lock mode, using the specified properties.voidEntityAgent.refresh(Object entity, LockModeType lockMode) Refresh the entity instance state from the database.voidRefresh 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) Deprecated, for removal: This API element is subject to removal in a future version.TypedQuery.setLockMode(LockModeType lockMode) Set the lock mode type to use when the query is executed. -
Uses of LockModeType in jakarta.persistence.sql
Methods in jakarta.persistence.sql that return LockModeTypeModifier and TypeMethodDescriptionEntityMapping.lockMode()Returns the value of thelockModerecord component.Methods in jakarta.persistence.sql with parameters of type LockModeTypeModifier and TypeMethodDescriptionEntityMapping.withLockMode(LockModeType lockMode) Specify the lock mode obtained on this entity.Constructors in jakarta.persistence.sql with parameters of type LockModeTypeModifierConstructorDescriptionEntityMapping(Class<T> entityClass, LockModeType lockMode, String discriminatorColumn, MemberMapping<? extends T>[] fields, String alias) Creates an instance of aEntityMappingrecord class.
TypedQuery.getLockMode()