Uses of Enum Class
org.hibernate.LockMode
Packages that use LockMode
Package
Description
This package defines the central Hibernate APIs, beginning with
SessionFactory, which represents an instance of
Hibernate at runtime and is the source of new instances of
Session and StatelessSession,
the most important APIs exposing persistence-related operations for
entities.This package defines the SPI of a framework for lazy-initializing
and state-tracking collection wrappers.
This package abstracts over the multifarious dialects of SQL
understood by the databases supported by Hibernate.
Support for
Dialect-specific locking strategies.Internal package containing dialect-specific extensions of
AbstractSqlAstTranslator.This package defines some central internal SPI abstractions
used throughout the implementation of Hibernate.
An SPI for services which collect, report, or monitor diagnostic events.
Defines the event types and event listener interfaces for
events produced by the stateful
Session.This package abstracts persistence mechanisms for entities.
Everything related to HQL/JPQL, native SQL, and criteria queries.
Contains a range of internal abstractions for dealing with query execution,
query plans, query options, and query parameters.
SPIs for native SQL query support.
SPI-level SQM contracts
Package for the translation of SQM into SQL AST
This package contains helper classes for rendering SQL fragments and SQL statements.
Package defining support for creating and consuming a SQL AST.
-
Uses of LockMode in org.hibernate
Methods in org.hibernate that return LockModeModifier and TypeMethodDescriptionLockOptions.findGreatestLockMode()Deprecated, for removal: This API element is subject to removal in a future version.Alias-specific locks are no longer supported, roughly replaced with locking scope.static LockModeLockMode.fromExternalForm(String externalForm) static LockModeLockMode.fromJpaLockMode(LockModeType lockMode) LockOptions.getAliasSpecificLockMode(String alias) Deprecated, for removal: This API element is subject to removal in a future version.Alias-specific locks are no longer supported, roughly replaced with locking scope.Session.getCurrentLockMode(Object object) Determine the current lock mode held on the given managed instance associated with this session.LockOptions.getEffectiveLockMode(String alias) Deprecated, for removal: This API element is subject to removal in a future version.Alias-specific locks are no longer supported, roughly replaced with locking scope.LockOptions.getLockMode()Deprecated, for removal: This API element is subject to removal in a future version.Retrieve the overall lock mode in effect for this set of options.static LockModeReturns the enum constant of this class with the specified name.static LockMode[]LockMode.values()Returns an array containing the constants of this enum class, in the order they are declared.Methods in org.hibernate that return types with arguments of type LockModeModifier and TypeMethodDescriptionLockOptions.getAliasLockIterator()Deprecated, for removal: This API element is subject to removal in a future version.Alias-specific locks are no longer supported, roughly replaced with locking scope.LockOptions.getAliasSpecificLocks()Deprecated, for removal: This API element is subject to removal in a future version.Alias-specific locks are no longer supported, roughly replaced with locking scope.Methods in org.hibernate with parameters of type LockModeModifier and TypeMethodDescription<T> TDeprecated, for removal: This API element is subject to removal in a future version.UseEntityManager.find(Class, Object, FindOption...)instead.Deprecated, for removal: This API element is subject to removal in a future version.The semantics of this method may change in a future release.<T> TStatelessSession.get(EntityGraph<T> graph, Object id, LockMode lockMode) Retrieve a record, fetching associations specified by the givenEntityGraph, which is interpreted as a load graph, and obtaining the specified lock mode.<T> TStatelessSession.get(EntityGraph<T> graph, GraphSemantic graphSemantic, Object id, LockMode lockMode) Retrieve a record, fetching associations specified by the givenEntityGraph, and obtaining the specified lock mode.<T> TRetrieve a record, obtaining the specified lock mode.Retrieve a record, obtaining the specified lock mode.<T> List<T> StatelessSession.getMultiple(Class<T> entityClass, List<?> ids, LockMode lockMode) Retrieve multiple rows, obtaining the specified lock mode, and returning entity instances in a list where the position of an instance in the list matches the position of its identifier in the given array, and the list contains a null value if there is no persistent instance matching a given identifier.booleanLockMode.greaterThan(LockMode mode) Check if this lock mode is more restrictive than the given lock mode.booleanCheck if this lock mode is less restrictive than the given lock mode.voidObtain the specified lock level on the given managed instance associated with this session.voidSession.lock(Object object, LockMode lockMode, LockOption... lockOptions) Obtain the specified lock level on the given managed instance associated with this session, applying any other specified options.voidRefresh the entity instance state from the database.voidRefresh the entity instance state from the database.LockOptions.setAliasSpecificLockMode(String alias, LockMode lockMode) Deprecated, for removal: This API element is subject to removal in a future version.Alias-specific locks are no longer supported, roughly replaced with locking scope.LockOptions.setLockMode(LockMode lockMode) Deprecated, for removal: This API element is subject to removal in a future version.Set the overall lock mode.static LockModeTypeLockMode.toJpaLockMode(LockMode lockMode) default IdentifierLoadAccess<T> Specify the lock mode to use when querying the database.IdentifierLoadAccess.with(LockMode lockMode, PessimisticLockScope lockScope) Specify the lock mode to use when querying the database.default MultiIdentifierLoadAccess<T> Specify the lock mode to use when querying the database.MultiIdentifierLoadAccess.with(LockMode lockMode, PessimisticLockScope lockScope) Specify the lock mode to use when querying the database.default NaturalIdLoadAccess<T> Specify the lock mode to use when querying the database.NaturalIdLoadAccess.with(LockMode lockMode, PessimisticLockScope lockScope) Specify the lock mode to use when querying the database.default NaturalIdMultiLoadAccess<T> Specify the lock mode to use when querying the database.NaturalIdMultiLoadAccess.with(LockMode lockMode, PessimisticLockScope lockScope) Specify the lock mode to use when querying the database.default SimpleNaturalIdLoadAccess<T> Specify the lock mode to use when querying the database.SimpleNaturalIdLoadAccess.with(LockMode lockMode, PessimisticLockScope lockScope) Specify the lock mode to use when querying the database.Constructors in org.hibernate with parameters of type LockModeModifierConstructorDescriptionprotectedLockOptions(boolean immutable, LockMode lockMode) Deprecated, for removal: This API element is subject to removal in a future version.Internal operation used to create immutable global instances.LockOptions(LockMode lockMode) Deprecated, for removal: This API element is subject to removal in a future version.Construct an instance with the given mode and no timeout.LockOptions(LockMode lockMode, int timeout) Deprecated.Use LockOptions(LockMode, Timeout) insteadLockOptions(LockMode lockMode, int timeout, PessimisticLockScope scope) Deprecated.LockOptions(LockMode lockMode, int timeout, Locking.Scope scope, Locking.FollowOn followOnStrategy) Deprecated, for removal: This API element is subject to removal in a future version.LockOptions(LockMode lockMode, Timeout timeout) Deprecated, for removal: This API element is subject to removal in a future version.Construct an instance with the given mode and timeout.LockOptions(LockMode lockMode, Timeout timeout, PessimisticLockScope jpaScope) -
Uses of LockMode in org.hibernate.collection.spi
Methods in org.hibernate.collection.spi with parameters of type LockModeModifier and TypeMethodDescriptionCollectionInitializerProducer.produceInitializer(NavigablePath navigablePath, PluralAttributeMapping attribute, InitializerParent<?> parent, LockMode lockMode, DomainResult<?> collectionKeyResult, DomainResult<?> collectionValueKeyResult, boolean isResultInitializer, AssemblerCreationState creationState) Create an initializer for the given attribute relative to the given navigable path. -
Uses of LockMode in org.hibernate.dialect
Methods in org.hibernate.dialect with parameters of type LockModeModifier and TypeMethodDescriptionprotected LockingStrategyDialect.buildOptimisticForceIncrementStrategy(EntityPersister lockable, LockMode lockMode) protected LockingStrategyDialect.buildOptimisticStrategy(EntityPersister lockable, LockMode lockMode) protected LockingStrategyDialect.buildPessimisticForceIncrementStrategy(EntityPersister lockable, LockMode lockMode, Locking.Scope lockScope) protected LockingStrategyDialect.buildPessimisticReadStrategy(EntityPersister lockable, LockMode lockMode, Locking.Scope lockScope) protected LockingStrategyDialect.buildPessimisticWriteStrategy(EntityPersister lockable, LockMode lockMode, Locking.Scope lockScope) protected LockingStrategyDialect.buildReadStrategy(EntityPersister lockable, LockMode lockMode, Locking.Scope lockScope) Dialect.getForUpdateString(LockMode lockMode) Given aLockMode, determine the appropriatefor updatefragment to use to obtain the lock.Dialect.getForUpdateString(LockMode lockMode, int timeout) Deprecated.Use Dialect.getForUpdateString(LockMode,Timeout) insteadDialect.getForUpdateString(LockMode lockMode, Timeout timeout) Given a lock level and timeout, determine the appropriatefor updatefragment to use to obtain the lock.HANADialect.getForUpdateString(LockMode lockMode) Dialect.getLockingStrategy(EntityPersister lockable, LockMode lockMode) Deprecated, for removal: This API element is subject to removal in a future version.Dialect.getLockingStrategy(EntityPersister lockable, LockMode lockMode, Locking.Scope lockScope) ALockingStrategywhich is able to acquire a database-level lock with the specified level.SpannerDialect.getLockingStrategy(EntityPersister lockable, LockMode lockMode) Dialect.getLockRowIdentifier(LockMode lockMode) Obtain aRowLockStrategyfor the givenLockMode. -
Uses of LockMode in org.hibernate.dialect.lock
Methods in org.hibernate.dialect.lock that return LockModeModifier and TypeMethodDescriptionprotected LockModeAbstractSelectLockingStrategy.getLockMode()protected LockModeOptimisticForceIncrementLockingStrategy.getLockMode()protected LockModeOptimisticLockingStrategy.getLockMode()protected LockModePessimisticForceIncrementLockingStrategy.getLockMode()Retrieve the specific lock mode defined.protected LockModePessimisticReadUpdateLockingStrategy.getLockMode()protected LockModePessimisticWriteUpdateLockingStrategy.getLockMode()protected LockModeUpdateLockingStrategy.getLockMode()Constructors in org.hibernate.dialect.lock with parameters of type LockModeModifierConstructorDescriptionprotectedAbstractSelectLockingStrategy(EntityPersister lockable, LockMode lockMode) OptimisticForceIncrementLockingStrategy(EntityPersister lockable, LockMode lockMode) Construct locking strategy.OptimisticLockingStrategy(EntityPersister lockable, LockMode lockMode) Construct locking strategy.PessimisticForceIncrementLockingStrategy(EntityPersister lockable, LockMode lockMode) Construct locking strategy.PessimisticReadSelectLockingStrategy(EntityPersister lockable, LockMode lockMode) Construct a locking strategy based on SQL SELECT statements.PessimisticReadUpdateLockingStrategy(EntityPersister lockable, LockMode lockMode) Construct a locking strategy based on SQL UPDATE statements.PessimisticWriteSelectLockingStrategy(EntityPersister lockable, LockMode lockMode) Construct a locking strategy based on SQL SELECT statements.PessimisticWriteUpdateLockingStrategy(EntityPersister lockable, LockMode lockMode) Construct a locking strategy based on SQL UPDATE statements.SelectLockingStrategy(EntityPersister lockable, LockMode lockMode) Construct a locking strategy based on SQL SELECT statements.UpdateLockingStrategy(EntityPersister lockable, LockMode lockMode) Construct a locking strategy based on SQL UPDATE statements. -
Uses of LockMode in org.hibernate.dialect.sql.ast
Methods in org.hibernate.dialect.sql.ast with parameters of type LockModeModifier and TypeMethodDescriptionstatic StringSQLServerSqlAstTranslator.determineLockHint(LockMode lockMode, int effectiveLockTimeout) static StringSybaseASESqlAstTranslator.determineLockHint(LockMode lockMode, int effectiveLockTimeout) static StringSybaseSqlAstTranslator.determineLockHint(LockMode lockMode) protected booleanSQLServerSqlAstTranslator.renderNamedTableReference(NamedTableReference tableReference, LockMode lockMode) protected booleanSybaseASESqlAstTranslator.renderNamedTableReference(NamedTableReference tableReference, LockMode lockMode) protected booleanSybaseSqlAstTranslator.renderNamedTableReference(NamedTableReference tableReference, LockMode lockMode) protected booleanH2SqlAstTranslator.renderPrimaryTableReference(TableGroup tableGroup, LockMode lockMode) protected voidDB2SqlAstTranslator.renderTableReferenceJoins(TableGroup tableGroup, LockMode lockMode, int swappedJoinIndex, boolean forceLeftJoin) -
Uses of LockMode in org.hibernate.engine.spi
Methods in org.hibernate.engine.spi that return LockModeModifier and TypeMethodDescriptionSessionDelegatorBaseImpl.getCurrentLockMode(Object object) SessionLazyDelegator.getCurrentLockMode(Object object) EntityEntry.getLockMode()Methods in org.hibernate.engine.spi with parameters of type LockModeModifier and TypeMethodDescriptionPersistenceContext.addEntity(Object entity, Status status, Object[] loadedState, EntityKey entityKey, Object version, LockMode lockMode, boolean existsInDatabase, EntityPersister persister, boolean disableVersionIncrement) Adds an entity to the internal caches.PersistenceContext.addEntry(Object entity, Status status, Object[] loadedState, Object rowId, Object id, Object version, LockMode lockMode, boolean existsInDatabase, EntityPersister persister, boolean disableVersionIncrement) Generates an appropriate EntityEntry instance and adds it to the event source's internal caches.EntityEntryFactory.createEntityEntry(Status status, Object[] loadedState, Object rowId, Object id, Object version, LockMode lockMode, boolean existsInDatabase, EntityPersister persister, boolean disableVersionIncrement, PersistenceContext persistenceContext) Deprecated, for removal: This API element is subject to removal in a future version.CreatesEntityEntry.<T> T<T> TSessionDelegatorBaseImpl.loadFromSecondLevelCache(EntityPersister persister, EntityKey entityKey, Object instanceToLoad, LockMode lockMode) SharedSessionContractImplementor.loadFromSecondLevelCache(EntityPersister persister, EntityKey entityKey, Object instanceToLoad, LockMode lockMode) Attempts to load the entity from the second-level cache.SharedSessionDelegatorBaseImpl.loadFromSecondLevelCache(EntityPersister persister, EntityKey entityKey, Object instanceToLoad, LockMode lockMode) voidvoidSessionDelegatorBaseImpl.lock(Object object, LockMode lockMode, LockOption... lockOptions) voidvoidSessionLazyDelegator.lock(Object object, LockMode lockMode, LockOption... lockOptions) voidEntityEntry.setLockMode(LockMode lockMode) -
Uses of LockMode in org.hibernate.event.monitor.spi
Methods in org.hibernate.event.monitor.spi with parameters of type LockModeModifier and TypeMethodDescriptionvoidEventMonitor.completeEntityLockEvent(DiagnosticEvent event, Object id, String entityName, LockMode lockMode, boolean success, SharedSessionContractImplementor session) -
Uses of LockMode in org.hibernate.event.spi
Methods in org.hibernate.event.spi that return LockModeModifier and TypeMethodDescriptionLoadEvent.getLockMode()Deprecated.Use LoadEvent.getLockOptions() instead.LockEvent.getLockMode()Deprecated.Use LockEvent.getLockOptions() instead.RefreshEvent.getLockMode()Deprecated.Use RefreshEvent.getLockOptions() instead.Constructors in org.hibernate.event.spi with parameters of type LockModeModifierConstructorDescriptionLoadEvent(Object entityId, String entityClassName, LockMode lockMode, EventSource source, Boolean readOnly) LockEvent(Object object, LockMode lockMode, EventSource source) Deprecated, for removal: This API element is subject to removal in a future version.Use LockEvent(Object, LockOptions, EventSource) instead.LockEvent(String entityName, Object object, LockMode lockMode, EventSource source) Deprecated, for removal: This API element is subject to removal in a future version.Use LockEvent(String, Object, LockOptions, EventSource) instead.RefreshEvent(Object object, LockMode lockMode, EventSource source) -
Uses of LockMode in org.hibernate.persister.entity
Methods in org.hibernate.persister.entity with parameters of type LockModeModifier and TypeMethodDescriptionprotected LockingStrategyAbstractEntityPersister.generateLocker(LockMode lockMode, Locking.Scope lockScope) AbstractEntityPersister.load(Object id, Object optionalObject, LockMode lockMode, SharedSessionContractImplementor session) Load an instance using either theforUpdateLoaderor the outer joiningloader, depending upon the value of thelockparameterEntityPersister.load(Object id, Object optionalObject, LockMode lockMode, SharedSessionContractImplementor session) Load an instance of the persistent class.default ObjectEntityPersister.load(Object id, Object optionalObject, LockMode lockMode, SharedSessionContractImplementor session, Boolean readOnly) voidAbstractEntityPersister.lock(Object id, Object version, Object object, LockMode lockMode, SharedSessionContractImplementor session) voidAbstractEntityPersister.lock(Object id, Object version, Object object, LockMode lockMode, EventSource session) voidEntityPersister.lock(Object id, Object version, Object object, LockMode lockMode, SharedSessionContractImplementor session) Do a version check (optional operation)default void -
Uses of LockMode in org.hibernate.query
Methods in org.hibernate.query that return LockModeModifier and TypeMethodDescriptionNativeQuery.getHibernateLockMode()SelectionQuery.getHibernateLockMode()Get the rootLockModefor the queryNativeQuery.RootReturn.getLockMode()Methods in org.hibernate.query with parameters of type LockModeModifier and TypeMethodDescriptionDeclare a "root" entity, specifying a lock mode.Declare a "root" entity, specifying a lock mode.Declare a join fetch result, specifying a lock mode.NativeQuery.setHibernateLockMode(LockMode lockMode) SelectionQuery.setHibernateLockMode(LockMode lockMode) Specify the rootLockModefor the queryNativeQuery.FetchReturn.setLockMode(LockMode lockMode) Set the lock mode for this return.NativeQuery.RootReturn.setLockMode(LockMode lockMode) Set the lock mode for this return.SelectionQuery.setLockMode(String alias, LockMode lockMode) Deprecated.Use SelectionQuery.setLockScope(Locking.Scope) instead. -
Uses of LockMode in org.hibernate.query.spi
Methods in org.hibernate.query.spi that return LockModeModifier and TypeMethodDescriptionAbstractSelectionQuery.getHibernateLockMode()Get the root LockMode for the queryMethods in org.hibernate.query.spi with parameters of type LockModeModifier and TypeMethodDescriptionprotected voidAbstractCommonQueryContract.applyHibernateLockMode(LockMode value) protected booleanAbstractSelectionQuery.requiresTxn(LockMode lockMode) AbstractSelectionQuery.setHibernateLockMode(LockMode lockMode) Specify the root LockMode for the queryAbstractSelectionQuery.setLockMode(String alias, LockMode lockMode) -
Uses of LockMode in org.hibernate.query.sql.spi
Methods in org.hibernate.query.sql.spi with parameters of type LockMode -
Uses of LockMode in org.hibernate.query.sqm.spi
Methods in org.hibernate.query.sqm.spi that return LockModeMethods in org.hibernate.query.sqm.spi with parameters of type LockModeModifier and TypeMethodDescriptionDelegatingSqmSelectionQueryImplementor.setHibernateLockMode(LockMode lockMode) DelegatingSqmSelectionQueryImplementor.setLockMode(String alias, LockMode lockMode) -
Uses of LockMode in org.hibernate.query.sqm.sql
Methods in org.hibernate.query.sqm.sql with parameters of type LockModeModifier and TypeMethodDescriptionvoidBaseSqmToSqlAstConverter.registerLockMode(String identificationVariable, LockMode explicitLockMode) voidFakeSqmToSqlAstConverter.registerLockMode(String identificationVariable, LockMode explicitLockMode) -
Uses of LockMode in org.hibernate.sql
Methods in org.hibernate.sql with parameters of type LockMode -
Uses of LockMode in org.hibernate.sql.ast.spi
Methods in org.hibernate.sql.ast.spi that return LockModeModifier and TypeMethodDescriptionprotected LockModeAbstractSqlAstTranslator.getEffectiveLockMode()protected LockModeAbstractSqlAstTranslator.getEffectiveLockMode(String alias) protected LockModeAbstractSqlAstTranslator.getEffectiveLockMode(String alias, boolean isRoot) Methods in org.hibernate.sql.ast.spi with parameters of type LockModeModifier and TypeMethodDescriptionprotected intAbstractSqlAstTranslator.getEffectiveLockTimeout(LockMode lockMode) protected voidAbstractSqlAstTranslator.inlineCteTableGroup(TableGroup tableGroup, LockMode lockMode) voidSqlAstCreationState.registerLockMode(String identificationVariable, LockMode explicitLockMode) protected booleanAbstractSqlAstTranslator.renderNamedTableReference(NamedTableReference tableReference, LockMode lockMode) protected booleanAbstractSqlAstTranslator.renderPrimaryTableReference(TableGroup tableGroup, LockMode lockMode) protected voidAbstractSqlAstTranslator.renderTableReferenceJoins(TableGroup tableGroup, LockMode lockMode) protected voidAbstractSqlAstTranslator.renderTableReferenceJoins(TableGroup tableGroup, LockMode lockMode, int swappedJoinIndex, boolean forceLeftJoin) -
Uses of LockMode in org.hibernate.sql.results.jdbc.spi
Methods in org.hibernate.sql.results.jdbc.spi that return LockModeModifier and TypeMethodDescriptionJdbcValuesMapping.determineDefaultLockMode(String alias, LockMode defaultLockMode) RowProcessingState.determineEffectiveLockMode(String alias) Methods in org.hibernate.sql.results.jdbc.spi with parameters of type LockModeModifier and TypeMethodDescriptionJdbcValuesMapping.determineDefaultLockMode(String alias, LockMode defaultLockMode)