Uses of Class
org.hibernate.LockOptions
Packages that use LockOptions
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.Support for handling named queries during the bootstrap process.
A range of SPIs allowing integration with—and customization of—the process of building metadata.
This package abstracts over the multifarious dialects of SQL
understood by the databases supported by Hibernate.
Support for
Dialect
-specific pagination strategies.This package defines some central internal SPI abstractions
used throughout the implementation of Hibernate.
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.
SPIs for HQL support.
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
This package contains helper classes for rendering SQL fragments and SQL statements.
Package defining support for creating and consuming a SQL AST.
-
Uses of LockOptions in org.hibernate
Fields in org.hibernate declared as LockOptionsModifier and TypeFieldDescriptionstatic final LockOptions
LockOptions.NONE
RepresentsLockMode.NONE
, to which timeout and scope are not applicable.static final LockOptions
LockOptions.READ
RepresentsLockMode.READ
, to which timeout and scope are not applicable.static final LockOptions
LockOptions.UPGRADE
RepresentsLockMode.PESSIMISTIC_WRITE
with no timeout, and no extension of the lock to owned collections.Methods in org.hibernate that return LockOptionsModifier and TypeMethodDescriptionstatic LockOptions
LockOptions.copy
(LockOptions source, LockOptions destination) Copy the options in the first given instance ofLockOptions
to the second given instance.LockOptions.makeCopy()
Make a copy.LockOptions.makeDefensiveCopy()
Make a copy, unless this is an immutable instance.LockOptions.setAliasSpecificLockMode
(String alias, LockMode lockMode) Specify theLockMode
to be used for the given query alias.LockOptions.setFollowOnLocking
(Boolean followOnLocking) Force enable or disable the use of follow-on locking, overriding the default behavior of the SQL dialect.LockOptions.setLockMode
(LockMode lockMode) Set the overall lock mode.LockOptions.setLockScope
(PessimisticLockScope scope) Set the lock scope:PessimisticLockScope.EXTENDED
means the lock extends to rows of owned collections, butPessimisticLockScope.NORMAL
means only the entity table and secondary tables are locked.LockOptions.setScope
(boolean scope) Deprecated.LockOptions.setTimeOut
(int timeout) Set the timeout, that is, the maximum amount of time in milliseconds that the database should wait to obtain a pessimistic lock before returning an error to the client.LockMode.toLockOptions()
Methods in org.hibernate with parameters of type LockOptionsModifier and TypeMethodDescriptionSession.buildLockRequest
(LockOptions lockOptions) Deprecated.static LockOptions
LockOptions.copy
(LockOptions source, LockOptions destination) Copy the options in the first given instance ofLockOptions
to the second given instance.<T> T
Session.get
(Class<T> entityType, Object id, LockOptions lockOptions) Return the persistent instance of the given entity class with the given identifier, or null if there is no such persistent instance.Session.get
(String entityName, Object id, LockOptions lockOptions) Return the persistent instance of the given entity class with the given identifier, or null if there is no such persistent instance.<T> T
Session.load
(Class<T> theClass, Object id, LockOptions lockOptions) Deprecated.Session.load
(String entityName, Object id, LockOptions lockOptions) Deprecated.void
Session.lock
(Object object, LockOptions lockOptions) Obtain a lock on the given managed instance associated with this session, using the givenlock options
.void
LockOptions.overlay
(LockOptions lockOptions) Copy the given lock options into this instance, merging the alias-specific lock modes.void
Session.refresh
(Object object, LockOptions lockOptions) Reread the state of the given managed instance from the underlying database, obtaining the givenLockMode
.void
Session.refresh
(String entityName, Object object, LockOptions lockOptions) Deprecated.IdentifierLoadAccess.with
(LockOptions lockOptions) Specify the lock options to use when querying the database.MultiIdentifierLoadAccess.with
(LockOptions lockOptions) Specify the lock options to use when querying the database.NaturalIdLoadAccess.with
(LockOptions lockOptions) Specify the lock options to use when querying the database.NaturalIdMultiLoadAccess.with
(LockOptions lockOptions) Specify the lock options to use when querying the database.SimpleNaturalIdLoadAccess.with
(LockOptions lockOptions) Specify the lock options to use when querying the database. -
Uses of LockOptions in org.hibernate.boot.query
Methods in org.hibernate.boot.query that return LockOptionsMethods in org.hibernate.boot.query with parameters of type LockOptionsModifier and TypeMethodDescriptionAbstractNamedQueryBuilder.setLockOptions
(LockOptions lockOptions) -
Uses of LockOptions in org.hibernate.boot.spi
Methods in org.hibernate.boot.spi that return LockOptionsConstructors in org.hibernate.boot.spi with parameters of type LockOptions -
Uses of LockOptions in org.hibernate.dialect
Methods in org.hibernate.dialect with parameters of type LockOptionsModifier and TypeMethodDescriptionAbstractTransactSQLDialect.appendLockHint
(LockOptions lockOptions, String tableName) Dialect.appendLockHint
(LockOptions lockOptions, String tableName) Some dialects support an alternative means toSELECT FOR UPDATE
, whereby a "lock hint" is appended to the table name in thefrom
clause.DialectDelegateWrapper.appendLockHint
(LockOptions lockOptions, String tableName) SQLServerDialect.appendLockHint
(LockOptions lockOptions, String tableName) SybaseASEDialect.appendLockHint
(LockOptions mode, String tableName) AbstractTransactSQLDialect.applyLocksToSql
(String sql, LockOptions aliasedLockOptions, Map<String, String[]> keyColumnNames) Dialect.applyLocksToSql
(String sql, LockOptions aliasedLockOptions, Map<String, String[]> keyColumnNames) Modifies the given SQL, applying the appropriate updates for the specified lock modes and key columns.DialectDelegateWrapper.applyLocksToSql
(String sql, LockOptions aliasedLockOptions, Map<String, String[]> keyColumnNames) SpannerDialect.applyLocksToSql
(String sql, LockOptions aliasedLockOptions, Map<String, String[]> keyColumnNames) AbstractHANADialect.getForUpdateString
(String aliases, LockOptions lockOptions) Deprecated, for removal: This API element is subject to removal in a future version.CockroachDialect.getForUpdateString
(String aliases, LockOptions lockOptions) CockroachDialect.getForUpdateString
(LockOptions lockOptions) Dialect.getForUpdateString
(String aliases, LockOptions lockOptions) Get theFOR UPDATE OF
orFOR SHARE OF
fragment appropriate for this dialect, given the aliases of the columns to be locked.Dialect.getForUpdateString
(LockOptions lockOptions) Given a set ofLockOptions
(lock level, timeout), determine the appropriatefor update
fragment to use to obtain the lock.DialectDelegateWrapper.getForUpdateString
(String aliases, LockOptions lockOptions) DialectDelegateWrapper.getForUpdateString
(LockOptions lockOptions) PostgreSQLDialect.getForUpdateString
(String aliases, LockOptions lockOptions) SpannerDialect.getForUpdateString
(String aliases, LockOptions lockOptions) SpannerDialect.getForUpdateString
(LockOptions lockOptions) -
Uses of LockOptions in org.hibernate.dialect.pagination
Methods in org.hibernate.dialect.pagination with parameters of type LockOptionsModifier and TypeMethodDescriptionprotected String
Oracle12LimitHandler.processSql
(String sql, boolean hasFirstRow, boolean hasMaxRows, LockOptions lockOptions) protected String
Oracle12LimitHandler.processSql
(String sql, boolean hasFirstRow, LockOptions lockOptions) Deprecated, for removal: This API element is subject to removal in a future version. -
Uses of LockOptions in org.hibernate.engine.spi
Fields in org.hibernate.engine.spi with type parameters of type LockOptionsMethods in org.hibernate.engine.spi with parameters of type LockOptionsModifier and TypeMethodDescriptionSessionDelegatorBaseImpl.buildLockRequest
(LockOptions lockOptions) Deprecated.SessionLazyDelegator.buildLockRequest
(LockOptions lockOptions) Deprecated.ExceptionConverter.convert
(RuntimeException e, LockOptions lockOptions) ExceptionConverter.convert
(HibernateException e, LockOptions lockOptions) Converts a Hibernate-specific exception into a JPA-specified exception; note that the JPA specification makes use of exceptions outside its exception hierarchy, though they are all runtime exceptions.<T> T
SessionDelegatorBaseImpl.get
(Class<T> theClass, Object id, LockOptions lockOptions) SessionDelegatorBaseImpl.get
(String entityName, Object id, LockOptions lockOptions) <T> T
SessionLazyDelegator.get
(Class<T> entityType, Object id, LockOptions lockOptions) SessionLazyDelegator.get
(String entityName, Object id, LockOptions lockOptions) <T> T
SessionDelegatorBaseImpl.load
(Class<T> theClass, Object id, LockOptions lockOptions) SessionDelegatorBaseImpl.load
(String entityName, Object id, LockOptions lockOptions) <T> T
SessionLazyDelegator.load
(Class<T> theClass, Object id, LockOptions lockOptions) Deprecated.SessionLazyDelegator.load
(String entityName, Object id, LockOptions lockOptions) Deprecated.void
SessionDelegatorBaseImpl.lock
(Object object, LockOptions lockOptions) void
SessionDelegatorBaseImpl.lock
(String entityName, Object object, LockOptions lockOptions) void
SessionImplementor.lock
(String entityName, Object child, LockOptions lockOptions) Cascade the lock operation to the given child entity.void
SessionLazyDelegator.lock
(Object object, LockOptions lockOptions) void
SessionDelegatorBaseImpl.refresh
(Object object, LockOptions lockOptions) void
SessionDelegatorBaseImpl.refresh
(String entityName, Object object, LockOptions lockOptions) void
SessionLazyDelegator.refresh
(Object object, LockOptions lockOptions) void
SessionLazyDelegator.refresh
(String entityName, Object object, LockOptions lockOptions) Deprecated. -
Uses of LockOptions in org.hibernate.event.spi
Methods in org.hibernate.event.spi that return LockOptionsModifier and TypeMethodDescriptionLoadEvent.getLockOptions()
LockEvent.getLockOptions()
RefreshEvent.getLockOptions()
ResolveNaturalIdEvent.getLockOptions()
Constructors in org.hibernate.event.spi with parameters of type LockOptionsModifierConstructorDescriptionLoadEvent
(Object entityId, String entityClassName, LockOptions lockOptions, EventSource source, Boolean readOnly) LockEvent
(Object object, LockOptions lockOptions, EventSource source) LockEvent
(String entityName, Object original, LockOptions lockOptions, EventSource source) RefreshEvent
(Object object, LockOptions lockOptions, EventSource source) RefreshEvent
(String entityName, Object object, LockOptions lockOptions, EventSource source) ResolveNaturalIdEvent
(Map<String, Object> naturalIdValues, EntityPersister entityPersister, LockOptions lockOptions, EventSource source) -
Uses of LockOptions in org.hibernate.loader.ast.spi
Methods in org.hibernate.loader.ast.spi that return LockOptionsModifier and TypeMethodDescriptionMultiLoadOptions.getLockOptions()
Specify the lock options applied during loading.NaturalIdLoadOptions.getLockOptions()
The locking options for the loaded entityMethods in org.hibernate.loader.ast.spi with parameters of type LockOptionsModifier and TypeMethodDescriptionSingleEntityLoader.load
(Object key, LockOptions lockOptions, Boolean readOnly, SharedSessionContractImplementor session) Load an entity by a primary or unique key value.SingleIdEntityLoader.load
(Object pkValue, Object entityInstance, LockOptions lockOptions, Boolean readOnly, SharedSessionContractImplementor session) default T
SingleIdEntityLoader.load
(Object pkValue, Object entityInstance, LockOptions lockOptions, SharedSessionContractImplementor session) Load by primary key value, populating the passed entity instance.SingleIdEntityLoader.load
(Object pkValue, LockOptions lockOptions, Boolean readOnly, SharedSessionContractImplementor session) Load by primary key valueSingleUniqueKeyEntityLoader.load
(Object ukValue, LockOptions lockOptions, Boolean readOnly, SharedSessionContractImplementor session) Load by unique key value -
Uses of LockOptions in org.hibernate.persister.entity
Methods in org.hibernate.persister.entity with parameters of type LockOptionsModifier and TypeMethodDescriptionAbstractEntityPersister.load
(Object id, Object optionalObject, LockOptions lockOptions, SharedSessionContractImplementor session) Load an instance using either theforUpdateLoader
or the outer joiningloader
, depending upon the value of thelock
parameterAbstractEntityPersister.load
(Object id, Object optionalObject, LockOptions lockOptions, SharedSessionContractImplementor session, Boolean readOnly) EntityPersister.load
(Object id, Object optionalObject, LockOptions lockOptions, SharedSessionContractImplementor session) Load an instance of the persistent class.default Object
EntityPersister.load
(Object id, Object optionalObject, LockOptions lockOptions, SharedSessionContractImplementor session, Boolean readOnly) AbstractEntityPersister.loadEntityIdByNaturalId
(Object[] naturalIdValues, LockOptions lockOptions, SharedSessionContractImplementor session) EntityPersister.loadEntityIdByNaturalId
(Object[] naturalIdValues, LockOptions lockOptions, SharedSessionContractImplementor session) Load the id for the entity based on the natural id.void
AbstractEntityPersister.lock
(Object id, Object version, Object object, LockOptions lockOptions, EventSource session) void
EntityPersister.lock
(Object id, Object version, Object object, LockOptions lockOptions, EventSource session) Do a version check (optional operation) -
Uses of LockOptions in org.hibernate.query
Methods in org.hibernate.query that return LockOptionsModifier and TypeMethodDescriptionNativeQuery.getLockOptions()
Query.getLockOptions()
Obtains theLockOptions
in effect for this query.SelectionQuery.getLockOptions()
TheLockOptions
currently in effect for the queryMethods in org.hibernate.query with parameters of type LockOptionsModifier and TypeMethodDescriptionNativeQuery.setLockOptions
(LockOptions lockOptions) Query.setLockOptions
(LockOptions lockOptions) Apply the given lock options to this query. -
Uses of LockOptions in org.hibernate.query.hql.spi
Methods in org.hibernate.query.hql.spi with parameters of type LockOptions -
Uses of LockOptions in org.hibernate.query.spi
Methods in org.hibernate.query.spi that return LockOptionsModifier and TypeMethodDescriptionAbstractQuery.getLockOptions()
AbstractSelectionQuery.getLockOptions()
DelegatingQueryOptions.getLockOptions()
QueryOptions.getLockOptions()
Describes the locking to apply to the query resultsQueryOptionsAdapter.getLockOptions()
SqlOmittingQueryOptions.getLockOptions()
Methods in org.hibernate.query.spi with parameters of type LockOptions -
Uses of LockOptions in org.hibernate.query.sql.spi
Methods in org.hibernate.query.sql.spi with parameters of type LockOptions -
Uses of LockOptions in org.hibernate.query.sqm.spi
Methods in org.hibernate.query.sqm.spi that return LockOptionsModifier and TypeMethodDescriptionDelegatingSqmSelectionQueryImplementor.getLockOptions()
NamedSqmQueryMemento.getLockOptions()
-
Uses of LockOptions in org.hibernate.sql
Fields in org.hibernate.sql declared as LockOptionsMethods in org.hibernate.sql with parameters of type LockOptionsConstructors in org.hibernate.sql with parameters of type LockOptionsModifierConstructorDescriptionForUpdateFragment
(Dialect dialect, LockOptions lockOptions, Map<String, String[]> keyColumnNames) -
Uses of LockOptions in org.hibernate.sql.ast.spi
Methods in org.hibernate.sql.ast.spi that return LockOptionsModifier and TypeMethodDescriptionprotected LockOptions
AbstractSqlAstTranslator.getLockOptions()
Methods in org.hibernate.sql.ast.spi with parameters of type LockOptionsModifier and TypeMethodDescriptionvoid
AbstractSqlAstTranslator.ForUpdateClause.merge
(LockOptions lockOptions)
setLockScope(PessimisticLockScope)