Class TransactionScopedSession
- java.lang.Object
-
- io.quarkus.hibernate.orm.runtime.session.TransactionScopedSession
-
- All Implemented Interfaces:
jakarta.persistence.EntityManager
,Closeable
,Serializable
,AutoCloseable
,org.hibernate.query.QueryProducer
,org.hibernate.Session
,org.hibernate.SharedSessionContract
public class TransactionScopedSession extends Object implements org.hibernate.Session
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
TransactionScopedSession.SessionResult
-
Field Summary
Fields Modifier and Type Field Description protected static String
TRANSACTION_IS_NOT_ACTIVE
-
Constructor Summary
Constructors Constructor Description TransactionScopedSession(jakarta.transaction.TransactionManager transactionManager, jakarta.transaction.TransactionSynchronizationRegistry transactionSynchronizationRegistry, org.hibernate.SessionFactory sessionFactory, String unitName, jakarta.enterprise.inject.Instance<RequestScopedSessionHolder> requestScopedSessions)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description (package private) TransactionScopedSession.SessionResult
acquireSession()
void
addEventListeners(org.hibernate.SessionEventListener... listeners)
org.hibernate.Transaction
beginTransaction()
org.hibernate.Session.LockRequest
buildLockRequest(org.hibernate.LockOptions lockOptions)
<T> org.hibernate.IdentifierLoadAccess<T>
byId(Class<T> entityClass)
<T> org.hibernate.IdentifierLoadAccess<T>
byId(String entityName)
<T> org.hibernate.MultiIdentifierLoadAccess<T>
byMultipleIds(Class<T> entityClass)
<T> org.hibernate.MultiIdentifierLoadAccess<T>
byMultipleIds(String entityName)
<T> org.hibernate.NaturalIdMultiLoadAccess<T>
byMultipleNaturalId(Class<T> entityClass)
<T> org.hibernate.NaturalIdMultiLoadAccess<T>
byMultipleNaturalId(String entityName)
<T> org.hibernate.NaturalIdLoadAccess<T>
byNaturalId(Class<T> entityClass)
<T> org.hibernate.NaturalIdLoadAccess<T>
byNaturalId(String entityName)
<T> org.hibernate.SimpleNaturalIdLoadAccess<T>
bySimpleNaturalId(Class<T> entityClass)
<T> org.hibernate.SimpleNaturalIdLoadAccess<T>
bySimpleNaturalId(String entityName)
void
cancelQuery()
void
clear()
void
close()
boolean
contains(Object entity)
boolean
contains(String entityName, Object object)
<T> org.hibernate.graph.RootGraph<T>
createEntityGraph(Class<T> rootType)
org.hibernate.graph.RootGraph<?>
createEntityGraph(String graphName)
org.hibernate.query.MutationQuery
createMutationQuery(jakarta.persistence.criteria.CriteriaDelete deleteQuery)
org.hibernate.query.MutationQuery
createMutationQuery(jakarta.persistence.criteria.CriteriaUpdate updateQuery)
org.hibernate.query.MutationQuery
createMutationQuery(String hqlString)
org.hibernate.query.MutationQuery
createMutationQuery(org.hibernate.query.criteria.JpaCriteriaInsertSelect insertSelect)
org.hibernate.query.MutationQuery
createNamedMutationQuery(String name)
org.hibernate.query.Query
createNamedQuery(String name)
Deprecated.<T> org.hibernate.query.Query<T>
createNamedQuery(String name, Class<T> resultClass)
org.hibernate.query.SelectionQuery<?>
createNamedSelectionQuery(String name)
<R> org.hibernate.query.SelectionQuery<R>
createNamedSelectionQuery(String name, Class<R> resultType)
org.hibernate.procedure.ProcedureCall
createNamedStoredProcedureQuery(String name)
org.hibernate.query.MutationQuery
createNativeMutationQuery(String sqlString)
org.hibernate.query.NativeQuery
createNativeQuery(String sqlString)
Deprecated.org.hibernate.query.NativeQuery
createNativeQuery(String sqlString, Class resultClass)
Deprecated.<R> org.hibernate.query.NativeQuery<R>
createNativeQuery(String sqlString, Class<R> resultClass, String tableAlias)
org.hibernate.query.NativeQuery
createNativeQuery(String sqlString, String resultSetMapping)
Deprecated.<R> org.hibernate.query.NativeQuery<R>
createNativeQuery(String sqlString, String resultSetMappingName, Class<R> resultClass)
org.hibernate.query.Query
createQuery(jakarta.persistence.criteria.CriteriaDelete deleteQuery)
Deprecated.<T> org.hibernate.query.Query<T>
createQuery(jakarta.persistence.criteria.CriteriaQuery<T> criteriaQuery)
org.hibernate.query.Query
createQuery(jakarta.persistence.criteria.CriteriaUpdate updateQuery)
Deprecated.org.hibernate.query.Query
createQuery(String qlString)
Deprecated.<T> org.hibernate.query.Query<T>
createQuery(String qlString, Class<T> resultClass)
<R> org.hibernate.query.SelectionQuery<R>
createSelectionQuery(jakarta.persistence.criteria.CriteriaQuery<R> criteria)
org.hibernate.query.SelectionQuery<?>
createSelectionQuery(String hqlString)
<R> org.hibernate.query.SelectionQuery<R>
createSelectionQuery(String hqlString, Class<R> resultType)
org.hibernate.procedure.ProcedureCall
createStoredProcedureCall(String procedureName)
org.hibernate.procedure.ProcedureCall
createStoredProcedureCall(String procedureName, Class... resultClasses)
org.hibernate.procedure.ProcedureCall
createStoredProcedureCall(String procedureName, String... resultSetMappings)
org.hibernate.procedure.ProcedureCall
createStoredProcedureQuery(String procedureName)
org.hibernate.procedure.ProcedureCall
createStoredProcedureQuery(String procedureName, Class... resultClasses)
org.hibernate.procedure.ProcedureCall
createStoredProcedureQuery(String procedureName, String... resultSetMappings)
void
delete(Object object)
Deprecated.void
delete(String entityName, Object object)
Deprecated.void
detach(Object entity)
void
disableFetchProfile(String name)
void
disableFilter(String filterName)
<T> T
doReturningWork(org.hibernate.jdbc.ReturningWork<T> work)
void
doWork(org.hibernate.jdbc.Work work)
void
enableFetchProfile(String name)
org.hibernate.Filter
enableFilter(String filterName)
void
evict(Object object)
<T> T
find(Class<T> entityClass, Object primaryKey)
<T> T
find(Class<T> entityClass, Object primaryKey, jakarta.persistence.LockModeType lockMode)
<T> T
find(Class<T> entityClass, Object primaryKey, jakarta.persistence.LockModeType lockMode, Map<String,Object> properties)
<T> T
find(Class<T> entityClass, Object primaryKey, Map<String,Object> properties)
void
flush()
<T> T
get(Class<T> entityType, Object id)
<T> T
get(Class<T> entityType, Object id, org.hibernate.LockMode lockMode)
<T> T
get(Class<T> entityType, Object id, org.hibernate.LockOptions lockOptions)
Object
get(String entityName, Object id)
Object
get(String entityName, Object id, org.hibernate.LockMode lockMode)
Object
get(String entityName, Object id, org.hibernate.LockOptions lockOptions)
org.hibernate.CacheMode
getCacheMode()
jakarta.persistence.CacheRetrieveMode
getCacheRetrieveMode()
jakarta.persistence.CacheStoreMode
getCacheStoreMode()
org.hibernate.query.criteria.HibernateCriteriaBuilder
getCriteriaBuilder()
org.hibernate.LockMode
getCurrentLockMode(Object object)
Object
getDelegate()
org.hibernate.Filter
getEnabledFilter(String filterName)
org.hibernate.graph.RootGraph<?>
getEntityGraph(String graphName)
<T> List<jakarta.persistence.EntityGraph<? super T>>
getEntityGraphs(Class<T> entityClass)
jakarta.persistence.EntityManagerFactory
getEntityManagerFactory()
String
getEntityName(Object object)
jakarta.persistence.FlushModeType
getFlushMode()
org.hibernate.FlushMode
getHibernateFlushMode()
Object
getIdentifier(Object object)
Integer
getJdbcBatchSize()
org.hibernate.LobHelper
getLobHelper()
jakarta.persistence.LockModeType
getLockMode(Object entity)
jakarta.persistence.metamodel.Metamodel
getMetamodel()
org.hibernate.query.NativeQuery
getNamedNativeQuery(String name)
Deprecated.org.hibernate.query.NativeQuery
getNamedNativeQuery(String name, String resultSetMapping)
Deprecated.org.hibernate.procedure.ProcedureCall
getNamedProcedureCall(String name)
org.hibernate.query.Query
getNamedQuery(String queryName)
Deprecated.Map<String,Object>
getProperties()
<T> T
getReference(Class<T> entityClass, Object primaryKey)
Object
getReference(String entityName, Object id)
<T> T
getReference(T object)
org.hibernate.SessionFactory
getSessionFactory()
org.hibernate.stat.SessionStatistics
getStatistics()
String
getTenantIdentifier()
org.hibernate.Transaction
getTransaction()
boolean
isConnected()
boolean
isDefaultReadOnly()
boolean
isDirty()
boolean
isFetchProfileEnabled(String name)
boolean
isJoinedToTransaction()
boolean
isOpen()
boolean
isReadOnly(Object entityOrProxy)
void
joinTransaction()
<T> T
load(Class<T> theClass, Object id)
Deprecated.<T> T
load(Class<T> theClass, Object id, org.hibernate.LockMode lockMode)
Deprecated.<T> T
load(Class<T> theClass, Object id, org.hibernate.LockOptions lockOptions)
Deprecated.void
load(Object object, Object id)
Object
load(String entityName, Object id)
Deprecated.Object
load(String entityName, Object id, org.hibernate.LockMode lockMode)
Deprecated.Object
load(String entityName, Object id, org.hibernate.LockOptions lockOptions)
Deprecated.void
lock(Object entity, jakarta.persistence.LockModeType lockMode)
void
lock(Object entity, jakarta.persistence.LockModeType lockMode, Map<String,Object> properties)
void
lock(Object object, org.hibernate.LockMode lockMode)
void
lock(Object object, org.hibernate.LockOptions lockOptions)
void
lock(String entityName, Object object, org.hibernate.LockMode lockMode)
<T> T
merge(String entityName, T object)
<T> T
merge(T entity)
void
persist(Object entity)
void
persist(String entityName, Object object)
void
refresh(Object entity)
void
refresh(Object entity, jakarta.persistence.LockModeType lockMode)
void
refresh(Object entity, jakarta.persistence.LockModeType lockMode, Map<String,Object> properties)
void
refresh(Object entity, Map<String,Object> properties)
void
refresh(Object object, org.hibernate.LockMode lockMode)
void
refresh(Object object, org.hibernate.LockOptions lockOptions)
void
refresh(String entityName, Object object)
Deprecated.void
refresh(String entityName, Object object, org.hibernate.LockOptions lockOptions)
Deprecated.void
remove(Object entity)
void
replicate(Object object, org.hibernate.ReplicationMode replicationMode)
Deprecated.void
replicate(String entityName, Object object, org.hibernate.ReplicationMode replicationMode)
Deprecated.Object
save(Object object)
Deprecated.Object
save(String entityName, Object object)
Deprecated.void
saveOrUpdate(Object object)
Deprecated.void
saveOrUpdate(String entityName, Object object)
Deprecated.org.hibernate.SharedSessionBuilder
sessionWithOptions()
void
setCacheMode(org.hibernate.CacheMode cacheMode)
void
setCacheRetrieveMode(jakarta.persistence.CacheRetrieveMode cacheRetrieveMode)
void
setCacheStoreMode(jakarta.persistence.CacheStoreMode cacheStoreMode)
void
setDefaultReadOnly(boolean readOnly)
void
setFlushMode(jakarta.persistence.FlushModeType flushMode)
void
setHibernateFlushMode(org.hibernate.FlushMode flushMode)
void
setJdbcBatchSize(Integer jdbcBatchSize)
void
setProperty(String propertyName, Object value)
void
setReadOnly(Object entityOrProxy, boolean readOnly)
<T> T
unwrap(Class<T> cls)
void
update(Object object)
Deprecated.void
update(String entityName, Object object)
Deprecated.
-
-
-
Field Detail
-
TRANSACTION_IS_NOT_ACTIVE
protected static final String TRANSACTION_IS_NOT_ACTIVE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TransactionScopedSession
public TransactionScopedSession(jakarta.transaction.TransactionManager transactionManager, jakarta.transaction.TransactionSynchronizationRegistry transactionSynchronizationRegistry, org.hibernate.SessionFactory sessionFactory, String unitName, jakarta.enterprise.inject.Instance<RequestScopedSessionHolder> requestScopedSessions)
-
-
Method Detail
-
acquireSession
TransactionScopedSession.SessionResult acquireSession()
-
persist
public void persist(Object entity)
- Specified by:
persist
in interfacejakarta.persistence.EntityManager
- Specified by:
persist
in interfaceorg.hibernate.Session
-
merge
public <T> T merge(T entity)
- Specified by:
merge
in interfacejakarta.persistence.EntityManager
- Specified by:
merge
in interfaceorg.hibernate.Session
-
remove
public void remove(Object entity)
- Specified by:
remove
in interfacejakarta.persistence.EntityManager
- Specified by:
remove
in interfaceorg.hibernate.Session
-
find
public <T> T find(Class<T> entityClass, Object primaryKey)
- Specified by:
find
in interfacejakarta.persistence.EntityManager
-
find
public <T> T find(Class<T> entityClass, Object primaryKey, Map<String,Object> properties)
- Specified by:
find
in interfacejakarta.persistence.EntityManager
-
find
public <T> T find(Class<T> entityClass, Object primaryKey, jakarta.persistence.LockModeType lockMode)
- Specified by:
find
in interfacejakarta.persistence.EntityManager
-
find
public <T> T find(Class<T> entityClass, Object primaryKey, jakarta.persistence.LockModeType lockMode, Map<String,Object> properties)
- Specified by:
find
in interfacejakarta.persistence.EntityManager
-
getReference
public <T> T getReference(Class<T> entityClass, Object primaryKey)
- Specified by:
getReference
in interfacejakarta.persistence.EntityManager
- Specified by:
getReference
in interfaceorg.hibernate.Session
-
getReference
public Object getReference(String entityName, Object id)
- Specified by:
getReference
in interfaceorg.hibernate.Session
-
getReference
public <T> T getReference(T object)
- Specified by:
getReference
in interfaceorg.hibernate.Session
-
flush
public void flush()
- Specified by:
flush
in interfacejakarta.persistence.EntityManager
- Specified by:
flush
in interfaceorg.hibernate.Session
-
setFlushMode
public void setFlushMode(jakarta.persistence.FlushModeType flushMode)
- Specified by:
setFlushMode
in interfacejakarta.persistence.EntityManager
- Specified by:
setFlushMode
in interfaceorg.hibernate.Session
-
getFlushMode
public jakarta.persistence.FlushModeType getFlushMode()
- Specified by:
getFlushMode
in interfacejakarta.persistence.EntityManager
- Specified by:
getFlushMode
in interfaceorg.hibernate.Session
-
lock
public void lock(Object entity, jakarta.persistence.LockModeType lockMode)
- Specified by:
lock
in interfacejakarta.persistence.EntityManager
-
lock
public void lock(Object entity, jakarta.persistence.LockModeType lockMode, Map<String,Object> properties)
- Specified by:
lock
in interfacejakarta.persistence.EntityManager
-
refresh
public void refresh(Object entity)
- Specified by:
refresh
in interfacejakarta.persistence.EntityManager
- Specified by:
refresh
in interfaceorg.hibernate.Session
-
refresh
public void refresh(Object entity, Map<String,Object> properties)
- Specified by:
refresh
in interfacejakarta.persistence.EntityManager
-
refresh
public void refresh(Object entity, jakarta.persistence.LockModeType lockMode)
- Specified by:
refresh
in interfacejakarta.persistence.EntityManager
-
refresh
public void refresh(Object entity, jakarta.persistence.LockModeType lockMode, Map<String,Object> properties)
- Specified by:
refresh
in interfacejakarta.persistence.EntityManager
-
clear
public void clear()
- Specified by:
clear
in interfacejakarta.persistence.EntityManager
- Specified by:
clear
in interfaceorg.hibernate.Session
-
detach
public void detach(Object entity)
- Specified by:
detach
in interfacejakarta.persistence.EntityManager
- Specified by:
detach
in interfaceorg.hibernate.Session
-
contains
public boolean contains(Object entity)
- Specified by:
contains
in interfacejakarta.persistence.EntityManager
-
getLockMode
public jakarta.persistence.LockModeType getLockMode(Object entity)
- Specified by:
getLockMode
in interfacejakarta.persistence.EntityManager
-
setProperty
public void setProperty(String propertyName, Object value)
- Specified by:
setProperty
in interfacejakarta.persistence.EntityManager
-
getProperties
public Map<String,Object> getProperties()
- Specified by:
getProperties
in interfacejakarta.persistence.EntityManager
-
createQuery
@Deprecated public org.hibernate.query.Query createQuery(String qlString)
Deprecated.- Specified by:
createQuery
in interfacejakarta.persistence.EntityManager
- Specified by:
createQuery
in interfaceorg.hibernate.query.QueryProducer
- Specified by:
createQuery
in interfaceorg.hibernate.Session
-
createQuery
public <T> org.hibernate.query.Query<T> createQuery(jakarta.persistence.criteria.CriteriaQuery<T> criteriaQuery)
- Specified by:
createQuery
in interfacejakarta.persistence.EntityManager
- Specified by:
createQuery
in interfaceorg.hibernate.query.QueryProducer
- Specified by:
createQuery
in interfaceorg.hibernate.Session
-
createQuery
@Deprecated public org.hibernate.query.Query createQuery(jakarta.persistence.criteria.CriteriaUpdate updateQuery)
Deprecated.- Specified by:
createQuery
in interfacejakarta.persistence.EntityManager
- Specified by:
createQuery
in interfaceorg.hibernate.query.QueryProducer
- Specified by:
createQuery
in interfaceorg.hibernate.Session
-
createQuery
@Deprecated public org.hibernate.query.Query createQuery(jakarta.persistence.criteria.CriteriaDelete deleteQuery)
Deprecated.- Specified by:
createQuery
in interfacejakarta.persistence.EntityManager
- Specified by:
createQuery
in interfaceorg.hibernate.query.QueryProducer
- Specified by:
createQuery
in interfaceorg.hibernate.Session
-
createQuery
public <T> org.hibernate.query.Query<T> createQuery(String qlString, Class<T> resultClass)
- Specified by:
createQuery
in interfacejakarta.persistence.EntityManager
- Specified by:
createQuery
in interfaceorg.hibernate.query.QueryProducer
- Specified by:
createQuery
in interfaceorg.hibernate.Session
-
createNamedQuery
@Deprecated public org.hibernate.query.Query createNamedQuery(String name)
Deprecated.- Specified by:
createNamedQuery
in interfacejakarta.persistence.EntityManager
- Specified by:
createNamedQuery
in interfaceorg.hibernate.query.QueryProducer
- Specified by:
createNamedQuery
in interfaceorg.hibernate.Session
-
createNamedQuery
public <T> org.hibernate.query.Query<T> createNamedQuery(String name, Class<T> resultClass)
- Specified by:
createNamedQuery
in interfacejakarta.persistence.EntityManager
- Specified by:
createNamedQuery
in interfaceorg.hibernate.query.QueryProducer
- Specified by:
createNamedQuery
in interfaceorg.hibernate.Session
-
createNativeQuery
@Deprecated public org.hibernate.query.NativeQuery createNativeQuery(String sqlString)
Deprecated.- Specified by:
createNativeQuery
in interfacejakarta.persistence.EntityManager
- Specified by:
createNativeQuery
in interfaceorg.hibernate.query.QueryProducer
-
createNativeQuery
@Deprecated public org.hibernate.query.NativeQuery createNativeQuery(String sqlString, Class resultClass)
Deprecated.- Specified by:
createNativeQuery
in interfacejakarta.persistence.EntityManager
- Specified by:
createNativeQuery
in interfaceorg.hibernate.query.QueryProducer
-
createNativeQuery
@Deprecated public org.hibernate.query.NativeQuery createNativeQuery(String sqlString, String resultSetMapping)
Deprecated.- Specified by:
createNativeQuery
in interfacejakarta.persistence.EntityManager
- Specified by:
createNativeQuery
in interfaceorg.hibernate.query.QueryProducer
-
createNamedStoredProcedureQuery
public org.hibernate.procedure.ProcedureCall createNamedStoredProcedureQuery(String name)
- Specified by:
createNamedStoredProcedureQuery
in interfacejakarta.persistence.EntityManager
- Specified by:
createNamedStoredProcedureQuery
in interfaceorg.hibernate.SharedSessionContract
-
createStoredProcedureQuery
public org.hibernate.procedure.ProcedureCall createStoredProcedureQuery(String procedureName)
- Specified by:
createStoredProcedureQuery
in interfacejakarta.persistence.EntityManager
- Specified by:
createStoredProcedureQuery
in interfaceorg.hibernate.SharedSessionContract
-
createStoredProcedureQuery
public org.hibernate.procedure.ProcedureCall createStoredProcedureQuery(String procedureName, Class... resultClasses)
- Specified by:
createStoredProcedureQuery
in interfacejakarta.persistence.EntityManager
- Specified by:
createStoredProcedureQuery
in interfaceorg.hibernate.SharedSessionContract
-
createStoredProcedureQuery
public org.hibernate.procedure.ProcedureCall createStoredProcedureQuery(String procedureName, String... resultSetMappings)
- Specified by:
createStoredProcedureQuery
in interfacejakarta.persistence.EntityManager
- Specified by:
createStoredProcedureQuery
in interfaceorg.hibernate.SharedSessionContract
-
joinTransaction
public void joinTransaction()
- Specified by:
joinTransaction
in interfacejakarta.persistence.EntityManager
- Specified by:
joinTransaction
in interfaceorg.hibernate.SharedSessionContract
-
isJoinedToTransaction
public boolean isJoinedToTransaction()
- Specified by:
isJoinedToTransaction
in interfacejakarta.persistence.EntityManager
- Specified by:
isJoinedToTransaction
in interfaceorg.hibernate.SharedSessionContract
-
unwrap
public <T> T unwrap(Class<T> cls)
- Specified by:
unwrap
in interfacejakarta.persistence.EntityManager
-
getDelegate
public Object getDelegate()
- Specified by:
getDelegate
in interfacejakarta.persistence.EntityManager
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfacejakarta.persistence.EntityManager
- Specified by:
close
in interfaceorg.hibernate.SharedSessionContract
-
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interfacejakarta.persistence.EntityManager
- Specified by:
isOpen
in interfaceorg.hibernate.SharedSessionContract
-
getTransaction
public org.hibernate.Transaction getTransaction()
- Specified by:
getTransaction
in interfacejakarta.persistence.EntityManager
- Specified by:
getTransaction
in interfaceorg.hibernate.SharedSessionContract
-
getEntityManagerFactory
public jakarta.persistence.EntityManagerFactory getEntityManagerFactory()
- Specified by:
getEntityManagerFactory
in interfacejakarta.persistence.EntityManager
-
getCriteriaBuilder
public org.hibernate.query.criteria.HibernateCriteriaBuilder getCriteriaBuilder()
- Specified by:
getCriteriaBuilder
in interfacejakarta.persistence.EntityManager
- Specified by:
getCriteriaBuilder
in interfaceorg.hibernate.SharedSessionContract
-
getMetamodel
public jakarta.persistence.metamodel.Metamodel getMetamodel()
- Specified by:
getMetamodel
in interfacejakarta.persistence.EntityManager
-
createEntityGraph
public <T> org.hibernate.graph.RootGraph<T> createEntityGraph(Class<T> rootType)
- Specified by:
createEntityGraph
in interfacejakarta.persistence.EntityManager
- Specified by:
createEntityGraph
in interfaceorg.hibernate.Session
-
createEntityGraph
public org.hibernate.graph.RootGraph<?> createEntityGraph(String graphName)
- Specified by:
createEntityGraph
in interfacejakarta.persistence.EntityManager
- Specified by:
createEntityGraph
in interfaceorg.hibernate.Session
-
getEntityGraph
public org.hibernate.graph.RootGraph<?> getEntityGraph(String graphName)
- Specified by:
getEntityGraph
in interfacejakarta.persistence.EntityManager
- Specified by:
getEntityGraph
in interfaceorg.hibernate.Session
-
getEntityGraphs
public <T> List<jakarta.persistence.EntityGraph<? super T>> getEntityGraphs(Class<T> entityClass)
- Specified by:
getEntityGraphs
in interfacejakarta.persistence.EntityManager
- Specified by:
getEntityGraphs
in interfaceorg.hibernate.Session
-
sessionWithOptions
public org.hibernate.SharedSessionBuilder sessionWithOptions()
- Specified by:
sessionWithOptions
in interfaceorg.hibernate.Session
-
setHibernateFlushMode
public void setHibernateFlushMode(org.hibernate.FlushMode flushMode)
- Specified by:
setHibernateFlushMode
in interfaceorg.hibernate.Session
-
getHibernateFlushMode
public org.hibernate.FlushMode getHibernateFlushMode()
- Specified by:
getHibernateFlushMode
in interfaceorg.hibernate.Session
-
setCacheMode
public void setCacheMode(org.hibernate.CacheMode cacheMode)
- Specified by:
setCacheMode
in interfaceorg.hibernate.Session
-
getCacheMode
public org.hibernate.CacheMode getCacheMode()
- Specified by:
getCacheMode
in interfaceorg.hibernate.Session
-
getCacheStoreMode
public jakarta.persistence.CacheStoreMode getCacheStoreMode()
- Specified by:
getCacheStoreMode
in interfaceorg.hibernate.Session
-
getCacheRetrieveMode
public jakarta.persistence.CacheRetrieveMode getCacheRetrieveMode()
- Specified by:
getCacheRetrieveMode
in interfaceorg.hibernate.Session
-
setCacheStoreMode
public void setCacheStoreMode(jakarta.persistence.CacheStoreMode cacheStoreMode)
- Specified by:
setCacheStoreMode
in interfaceorg.hibernate.Session
-
setCacheRetrieveMode
public void setCacheRetrieveMode(jakarta.persistence.CacheRetrieveMode cacheRetrieveMode)
- Specified by:
setCacheRetrieveMode
in interfaceorg.hibernate.Session
-
getSessionFactory
public org.hibernate.SessionFactory getSessionFactory()
- Specified by:
getSessionFactory
in interfaceorg.hibernate.Session
-
cancelQuery
public void cancelQuery() throws org.hibernate.HibernateException
- Specified by:
cancelQuery
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
isDirty
public boolean isDirty() throws org.hibernate.HibernateException
- Specified by:
isDirty
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
isDefaultReadOnly
public boolean isDefaultReadOnly()
- Specified by:
isDefaultReadOnly
in interfaceorg.hibernate.Session
-
setDefaultReadOnly
public void setDefaultReadOnly(boolean readOnly)
- Specified by:
setDefaultReadOnly
in interfaceorg.hibernate.Session
-
getIdentifier
public Object getIdentifier(Object object)
- Specified by:
getIdentifier
in interfaceorg.hibernate.Session
-
contains
public boolean contains(String entityName, Object object)
- Specified by:
contains
in interfaceorg.hibernate.Session
-
evict
public void evict(Object object)
- Specified by:
evict
in interfaceorg.hibernate.Session
-
load
@Deprecated public <T> T load(Class<T> theClass, Object id, org.hibernate.LockMode lockMode)
Deprecated.- Specified by:
load
in interfaceorg.hibernate.Session
-
load
@Deprecated public <T> T load(Class<T> theClass, Object id, org.hibernate.LockOptions lockOptions)
Deprecated.- Specified by:
load
in interfaceorg.hibernate.Session
-
load
@Deprecated public Object load(String entityName, Object id, org.hibernate.LockMode lockMode)
Deprecated.- Specified by:
load
in interfaceorg.hibernate.Session
-
load
@Deprecated public Object load(String entityName, Object id, org.hibernate.LockOptions lockOptions)
Deprecated.- Specified by:
load
in interfaceorg.hibernate.Session
-
load
@Deprecated public <T> T load(Class<T> theClass, Object id)
Deprecated.- Specified by:
load
in interfaceorg.hibernate.Session
-
load
@Deprecated public Object load(String entityName, Object id)
Deprecated.- Specified by:
load
in interfaceorg.hibernate.Session
-
load
public void load(Object object, Object id)
- Specified by:
load
in interfaceorg.hibernate.Session
-
replicate
@Deprecated public void replicate(Object object, org.hibernate.ReplicationMode replicationMode)
Deprecated.- Specified by:
replicate
in interfaceorg.hibernate.Session
-
replicate
@Deprecated public void replicate(String entityName, Object object, org.hibernate.ReplicationMode replicationMode)
Deprecated.- Specified by:
replicate
in interfaceorg.hibernate.Session
-
save
@Deprecated public Object save(Object object)
Deprecated.- Specified by:
save
in interfaceorg.hibernate.Session
-
save
@Deprecated public Object save(String entityName, Object object)
Deprecated.- Specified by:
save
in interfaceorg.hibernate.Session
-
saveOrUpdate
@Deprecated public void saveOrUpdate(Object object)
Deprecated.- Specified by:
saveOrUpdate
in interfaceorg.hibernate.Session
-
saveOrUpdate
@Deprecated public void saveOrUpdate(String entityName, Object object)
Deprecated.- Specified by:
saveOrUpdate
in interfaceorg.hibernate.Session
-
update
@Deprecated public void update(Object object)
Deprecated.- Specified by:
update
in interfaceorg.hibernate.Session
-
update
@Deprecated public void update(String entityName, Object object)
Deprecated.- Specified by:
update
in interfaceorg.hibernate.Session
-
merge
public <T> T merge(String entityName, T object)
- Specified by:
merge
in interfaceorg.hibernate.Session
-
persist
public void persist(String entityName, Object object)
- Specified by:
persist
in interfaceorg.hibernate.Session
-
delete
@Deprecated public void delete(Object object)
Deprecated.- Specified by:
delete
in interfaceorg.hibernate.Session
-
delete
@Deprecated public void delete(String entityName, Object object)
Deprecated.- Specified by:
delete
in interfaceorg.hibernate.Session
-
lock
public void lock(Object object, org.hibernate.LockMode lockMode)
- Specified by:
lock
in interfaceorg.hibernate.Session
-
lock
public void lock(Object object, org.hibernate.LockOptions lockOptions)
- Specified by:
lock
in interfaceorg.hibernate.Session
-
lock
public void lock(String entityName, Object object, org.hibernate.LockMode lockMode)
- Specified by:
lock
in interfaceorg.hibernate.Session
-
buildLockRequest
public org.hibernate.Session.LockRequest buildLockRequest(org.hibernate.LockOptions lockOptions)
- Specified by:
buildLockRequest
in interfaceorg.hibernate.Session
-
refresh
@Deprecated public void refresh(String entityName, Object object)
Deprecated.- Specified by:
refresh
in interfaceorg.hibernate.Session
-
refresh
public void refresh(Object object, org.hibernate.LockMode lockMode)
- Specified by:
refresh
in interfaceorg.hibernate.Session
-
refresh
public void refresh(Object object, org.hibernate.LockOptions lockOptions)
- Specified by:
refresh
in interfaceorg.hibernate.Session
-
refresh
@Deprecated public void refresh(String entityName, Object object, org.hibernate.LockOptions lockOptions)
Deprecated.- Specified by:
refresh
in interfaceorg.hibernate.Session
-
getCurrentLockMode
public org.hibernate.LockMode getCurrentLockMode(Object object)
- Specified by:
getCurrentLockMode
in interfaceorg.hibernate.Session
-
get
public <T> T get(Class<T> entityType, Object id)
- Specified by:
get
in interfaceorg.hibernate.Session
-
get
public <T> T get(Class<T> entityType, Object id, org.hibernate.LockMode lockMode)
- Specified by:
get
in interfaceorg.hibernate.Session
-
get
public <T> T get(Class<T> entityType, Object id, org.hibernate.LockOptions lockOptions)
- Specified by:
get
in interfaceorg.hibernate.Session
-
get
public Object get(String entityName, Object id)
- Specified by:
get
in interfaceorg.hibernate.Session
-
get
public Object get(String entityName, Object id, org.hibernate.LockMode lockMode)
- Specified by:
get
in interfaceorg.hibernate.Session
-
get
public Object get(String entityName, Object id, org.hibernate.LockOptions lockOptions)
- Specified by:
get
in interfaceorg.hibernate.Session
-
getEntityName
public String getEntityName(Object object)
- Specified by:
getEntityName
in interfaceorg.hibernate.Session
-
byId
public <T> org.hibernate.IdentifierLoadAccess<T> byId(String entityName)
- Specified by:
byId
in interfaceorg.hibernate.Session
-
byMultipleIds
public <T> org.hibernate.MultiIdentifierLoadAccess<T> byMultipleIds(Class<T> entityClass)
- Specified by:
byMultipleIds
in interfaceorg.hibernate.Session
-
byMultipleIds
public <T> org.hibernate.MultiIdentifierLoadAccess<T> byMultipleIds(String entityName)
- Specified by:
byMultipleIds
in interfaceorg.hibernate.Session
-
byId
public <T> org.hibernate.IdentifierLoadAccess<T> byId(Class<T> entityClass)
- Specified by:
byId
in interfaceorg.hibernate.Session
-
byNaturalId
public <T> org.hibernate.NaturalIdLoadAccess<T> byNaturalId(String entityName)
- Specified by:
byNaturalId
in interfaceorg.hibernate.Session
-
byNaturalId
public <T> org.hibernate.NaturalIdLoadAccess<T> byNaturalId(Class<T> entityClass)
- Specified by:
byNaturalId
in interfaceorg.hibernate.Session
-
bySimpleNaturalId
public <T> org.hibernate.SimpleNaturalIdLoadAccess<T> bySimpleNaturalId(String entityName)
- Specified by:
bySimpleNaturalId
in interfaceorg.hibernate.Session
-
bySimpleNaturalId
public <T> org.hibernate.SimpleNaturalIdLoadAccess<T> bySimpleNaturalId(Class<T> entityClass)
- Specified by:
bySimpleNaturalId
in interfaceorg.hibernate.Session
-
enableFilter
public org.hibernate.Filter enableFilter(String filterName)
- Specified by:
enableFilter
in interfaceorg.hibernate.Session
-
getEnabledFilter
public org.hibernate.Filter getEnabledFilter(String filterName)
- Specified by:
getEnabledFilter
in interfaceorg.hibernate.Session
-
disableFilter
public void disableFilter(String filterName)
- Specified by:
disableFilter
in interfaceorg.hibernate.Session
-
getStatistics
public org.hibernate.stat.SessionStatistics getStatistics()
- Specified by:
getStatistics
in interfaceorg.hibernate.Session
-
isReadOnly
public boolean isReadOnly(Object entityOrProxy)
- Specified by:
isReadOnly
in interfaceorg.hibernate.Session
-
setReadOnly
public void setReadOnly(Object entityOrProxy, boolean readOnly)
- Specified by:
setReadOnly
in interfaceorg.hibernate.Session
-
isFetchProfileEnabled
public boolean isFetchProfileEnabled(String name) throws org.hibernate.UnknownProfileException
- Specified by:
isFetchProfileEnabled
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.UnknownProfileException
-
enableFetchProfile
public void enableFetchProfile(String name) throws org.hibernate.UnknownProfileException
- Specified by:
enableFetchProfile
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.UnknownProfileException
-
disableFetchProfile
public void disableFetchProfile(String name) throws org.hibernate.UnknownProfileException
- Specified by:
disableFetchProfile
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.UnknownProfileException
-
getLobHelper
public org.hibernate.LobHelper getLobHelper()
- Specified by:
getLobHelper
in interfaceorg.hibernate.Session
-
addEventListeners
public void addEventListeners(org.hibernate.SessionEventListener... listeners)
- Specified by:
addEventListeners
in interfaceorg.hibernate.Session
-
getTenantIdentifier
public String getTenantIdentifier()
- Specified by:
getTenantIdentifier
in interfaceorg.hibernate.SharedSessionContract
-
isConnected
public boolean isConnected()
- Specified by:
isConnected
in interfaceorg.hibernate.SharedSessionContract
-
beginTransaction
public org.hibernate.Transaction beginTransaction()
- Specified by:
beginTransaction
in interfaceorg.hibernate.SharedSessionContract
-
getNamedQuery
@Deprecated public org.hibernate.query.Query getNamedQuery(String queryName)
Deprecated.- Specified by:
getNamedQuery
in interfaceorg.hibernate.query.QueryProducer
-
getNamedProcedureCall
public org.hibernate.procedure.ProcedureCall getNamedProcedureCall(String name)
- Specified by:
getNamedProcedureCall
in interfaceorg.hibernate.SharedSessionContract
-
createStoredProcedureCall
public org.hibernate.procedure.ProcedureCall createStoredProcedureCall(String procedureName)
- Specified by:
createStoredProcedureCall
in interfaceorg.hibernate.SharedSessionContract
-
createStoredProcedureCall
public org.hibernate.procedure.ProcedureCall createStoredProcedureCall(String procedureName, Class... resultClasses)
- Specified by:
createStoredProcedureCall
in interfaceorg.hibernate.SharedSessionContract
-
createStoredProcedureCall
public org.hibernate.procedure.ProcedureCall createStoredProcedureCall(String procedureName, String... resultSetMappings)
- Specified by:
createStoredProcedureCall
in interfaceorg.hibernate.SharedSessionContract
-
getJdbcBatchSize
public Integer getJdbcBatchSize()
- Specified by:
getJdbcBatchSize
in interfaceorg.hibernate.SharedSessionContract
-
setJdbcBatchSize
public void setJdbcBatchSize(Integer jdbcBatchSize)
- Specified by:
setJdbcBatchSize
in interfaceorg.hibernate.SharedSessionContract
-
doWork
public void doWork(org.hibernate.jdbc.Work work) throws org.hibernate.HibernateException
- Specified by:
doWork
in interfaceorg.hibernate.SharedSessionContract
- Throws:
org.hibernate.HibernateException
-
doReturningWork
public <T> T doReturningWork(org.hibernate.jdbc.ReturningWork<T> work) throws org.hibernate.HibernateException
- Specified by:
doReturningWork
in interfaceorg.hibernate.SharedSessionContract
- Throws:
org.hibernate.HibernateException
-
getNamedNativeQuery
@Deprecated public org.hibernate.query.NativeQuery getNamedNativeQuery(String name)
Deprecated.- Specified by:
getNamedNativeQuery
in interfaceorg.hibernate.query.QueryProducer
-
createNativeQuery
public <R> org.hibernate.query.NativeQuery<R> createNativeQuery(String sqlString, Class<R> resultClass, String tableAlias)
- Specified by:
createNativeQuery
in interfaceorg.hibernate.query.QueryProducer
-
createNativeQuery
public <R> org.hibernate.query.NativeQuery<R> createNativeQuery(String sqlString, String resultSetMappingName, Class<R> resultClass)
- Specified by:
createNativeQuery
in interfaceorg.hibernate.query.QueryProducer
-
createSelectionQuery
public org.hibernate.query.SelectionQuery<?> createSelectionQuery(String hqlString)
- Specified by:
createSelectionQuery
in interfaceorg.hibernate.query.QueryProducer
-
createSelectionQuery
public <R> org.hibernate.query.SelectionQuery<R> createSelectionQuery(String hqlString, Class<R> resultType)
- Specified by:
createSelectionQuery
in interfaceorg.hibernate.query.QueryProducer
-
createSelectionQuery
public <R> org.hibernate.query.SelectionQuery<R> createSelectionQuery(jakarta.persistence.criteria.CriteriaQuery<R> criteria)
- Specified by:
createSelectionQuery
in interfaceorg.hibernate.query.QueryProducer
-
createMutationQuery
public org.hibernate.query.MutationQuery createMutationQuery(String hqlString)
- Specified by:
createMutationQuery
in interfaceorg.hibernate.query.QueryProducer
-
createMutationQuery
public org.hibernate.query.MutationQuery createMutationQuery(jakarta.persistence.criteria.CriteriaUpdate updateQuery)
- Specified by:
createMutationQuery
in interfaceorg.hibernate.query.QueryProducer
-
createMutationQuery
public org.hibernate.query.MutationQuery createMutationQuery(jakarta.persistence.criteria.CriteriaDelete deleteQuery)
- Specified by:
createMutationQuery
in interfaceorg.hibernate.query.QueryProducer
-
createMutationQuery
public org.hibernate.query.MutationQuery createMutationQuery(org.hibernate.query.criteria.JpaCriteriaInsertSelect insertSelect)
- Specified by:
createMutationQuery
in interfaceorg.hibernate.query.QueryProducer
-
createNativeMutationQuery
public org.hibernate.query.MutationQuery createNativeMutationQuery(String sqlString)
- Specified by:
createNativeMutationQuery
in interfaceorg.hibernate.query.QueryProducer
-
createNamedSelectionQuery
public org.hibernate.query.SelectionQuery<?> createNamedSelectionQuery(String name)
- Specified by:
createNamedSelectionQuery
in interfaceorg.hibernate.query.QueryProducer
-
createNamedSelectionQuery
public <R> org.hibernate.query.SelectionQuery<R> createNamedSelectionQuery(String name, Class<R> resultType)
- Specified by:
createNamedSelectionQuery
in interfaceorg.hibernate.query.QueryProducer
-
createNamedMutationQuery
public org.hibernate.query.MutationQuery createNamedMutationQuery(String name)
- Specified by:
createNamedMutationQuery
in interfaceorg.hibernate.query.QueryProducer
-
getNamedNativeQuery
@Deprecated public org.hibernate.query.NativeQuery getNamedNativeQuery(String name, String resultSetMapping)
Deprecated.- Specified by:
getNamedNativeQuery
in interfaceorg.hibernate.query.QueryProducer
-
byMultipleNaturalId
public <T> org.hibernate.NaturalIdMultiLoadAccess<T> byMultipleNaturalId(Class<T> entityClass)
- Specified by:
byMultipleNaturalId
in interfaceorg.hibernate.Session
-
byMultipleNaturalId
public <T> org.hibernate.NaturalIdMultiLoadAccess<T> byMultipleNaturalId(String entityName)
- Specified by:
byMultipleNaturalId
in interfaceorg.hibernate.Session
-
-