Package net.sf.basedb.core.hibernate
Class SessionWrapper
- java.lang.Object
-
- net.sf.basedb.core.hibernate.AbstractQueryCache
-
- net.sf.basedb.core.hibernate.SessionWrapper
-
- All Implemented Interfaces:
Closeable
,Serializable
,AutoCloseable
,javax.persistence.EntityManager
,org.hibernate.jpa.HibernateEntityManager
,org.hibernate.query.QueryProducer
,org.hibernate.Session
,org.hibernate.SharedSessionContract
public class SessionWrapper extends AbstractQueryCache implements org.hibernate.Session
Wrapper around Hibernate sessions that includes a query cache. This wrapper forwards all calls to the underlying real Hibernate session.- Since:
- 2.16
- Author:
- Nicklas
- See Also:
- Serialized Form
- Last modified
- $Date: 2018-11-06 15:50:29 +0100 (ti, 06 nov 2018) $
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
private org.hibernate.Session
session
-
Constructor Summary
Constructors Constructor Description SessionWrapper(org.hibernate.Session session)
Creates a new session wrapper
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addEventListeners(org.hibernate.SessionEventListener... paramArrayOfSessionEventListener)
org.hibernate.Transaction
beginTransaction()
org.hibernate.Session.LockRequest
buildLockRequest(org.hibernate.LockOptions options)
<T> org.hibernate.IdentifierLoadAccess<T>
byId(Class<T> paramClass)
org.hibernate.IdentifierLoadAccess
byId(String paramString)
<T> org.hibernate.MultiIdentifierLoadAccess<T>
byMultipleIds(Class<T> entityClass)
org.hibernate.MultiIdentifierLoadAccess<?>
byMultipleIds(String entityName)
<T> org.hibernate.NaturalIdLoadAccess<T>
byNaturalId(Class<T> paramClass)
org.hibernate.NaturalIdLoadAccess
byNaturalId(String paramString)
<T> org.hibernate.SimpleNaturalIdLoadAccess<T>
bySimpleNaturalId(Class<T> paramClass)
org.hibernate.SimpleNaturalIdLoadAccess
bySimpleNaturalId(String paramString)
void
cancelQuery()
void
clear()
void
close()
boolean
contains(Object object)
boolean
contains(String entityName, Object entity)
org.hibernate.Criteria
createCriteria(Class persistentClass)
Deprecated.org.hibernate.Criteria
createCriteria(Class persistentClass, String alias)
Deprecated.org.hibernate.Criteria
createCriteria(String entityName)
Deprecated.org.hibernate.Criteria
createCriteria(String entityName, String alias)
Deprecated.<T> javax.persistence.EntityGraph<T>
createEntityGraph(Class<T> rootType)
javax.persistence.EntityGraph<?>
createEntityGraph(String graphName)
org.hibernate.Query<?>
createFilter(Object collection, String queryString)
org.hibernate.query.Query<?>
createNamedQuery(String queryName)
<T> org.hibernate.query.Query<T>
createNamedQuery(String name, Class<T> resultType)
javax.persistence.StoredProcedureQuery
createNamedStoredProcedureQuery(String name)
org.hibernate.query.NativeQuery<?>
createNativeQuery(String sql)
org.hibernate.query.NativeQuery
createNativeQuery(String sql, Class resultClass)
org.hibernate.query.NativeQuery<?>
createNativeQuery(String sql, String resultSetMapping)
org.hibernate.query.Query<?>
createQuery(String queryString)
If the same query has been executed before, return the cached instance, otherwise create a new query from the parent session and cache it.<T> org.hibernate.query.Query<T>
createQuery(String queryString, Class<T> resultType)
org.hibernate.query.Query<?>
createQuery(javax.persistence.criteria.CriteriaDelete criteria)
<T> org.hibernate.query.Query<T>
createQuery(javax.persistence.criteria.CriteriaQuery<T> criteria)
org.hibernate.query.Query<?>
createQuery(javax.persistence.criteria.CriteriaUpdate criteria)
org.hibernate.query.NativeQuery<?>
createSQLQuery(String queryString)
Deprecated.org.hibernate.procedure.ProcedureCall
createStoredProcedureCall(String name)
org.hibernate.procedure.ProcedureCall
createStoredProcedureCall(String paramString, Class... paramArrayOfClass)
org.hibernate.procedure.ProcedureCall
createStoredProcedureCall(String paramString, String... paramArrayOfString)
javax.persistence.StoredProcedureQuery
createStoredProcedureQuery(String procedureName)
javax.persistence.StoredProcedureQuery
createStoredProcedureQuery(String procedureName, Class... resultClasses)
javax.persistence.StoredProcedureQuery
createStoredProcedureQuery(String procedureName, String... resultSetMappings)
void
delete(Object object)
void
delete(String entityName, Object object)
void
detach(Object object)
void
disableFetchProfile(String name)
void
disableFilter(String filterName)
Connection
disconnect()
<T> T
doReturningWork(org.hibernate.jdbc.ReturningWork<T> paramReturningWork)
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, Map<String,Object> properties)
<T> T
find(Class<T> entityClass, Object primaryKey, javax.persistence.LockModeType lockMode)
<T> T
find(Class<T> entityClass, Object primaryKey, javax.persistence.LockModeType lockMode, Map<String,Object> properties)
void
flush()
<T> T
get(Class<T> clazz, Serializable id)
<T> T
get(Class<T> clazz, Serializable id, org.hibernate.LockMode lockMode)
<T> T
get(Class<T> clazz, Serializable id, org.hibernate.LockOptions lockOptions)
Object
get(String entityName, Serializable id)
Object
get(String entityName, Serializable id, org.hibernate.LockMode lockMode)
Deprecated.Object
get(String entityName, Serializable id, org.hibernate.LockOptions lockOptions)
org.hibernate.CacheMode
getCacheMode()
javax.persistence.criteria.CriteriaBuilder
getCriteriaBuilder()
org.hibernate.LockMode
getCurrentLockMode(Object object)
Object
getDelegate()
org.hibernate.Filter
getEnabledFilter(String filterName)
javax.persistence.EntityGraph<?>
getEntityGraph(String graphName)
<T> List<javax.persistence.EntityGraph<? super T>>
getEntityGraphs(Class<T> entityClass)
javax.persistence.EntityManagerFactory
getEntityManagerFactory()
String
getEntityName(Object object)
javax.persistence.FlushModeType
getFlushMode()
org.hibernate.FlushMode
getHibernateFlushMode()
Serializable
getIdentifier(Object object)
Integer
getJdbcBatchSize()
org.hibernate.LobHelper
getLobHelper()
javax.persistence.LockModeType
getLockMode(Object entity)
javax.persistence.metamodel.Metamodel
getMetamodel()
org.hibernate.query.NativeQuery<?>
getNamedNativeQuery(String queryName)
org.hibernate.procedure.ProcedureCall
getNamedProcedureCall(String name)
org.hibernate.query.Query<?>
getNamedQuery(String queryName)
If the same query has been executed before, return the cached instance, otherwise create a new query from the parent session and cache it.org.hibernate.Session
getParentSession()
Get the underlying parent session from Hibernate.Map<String,Object>
getProperties()
<T> T
getReference(Class<T> entityClass, Object primaryKey)
org.hibernate.Session
getSession()
Deprecated.org.hibernate.SessionFactory
getSessionFactory()
org.hibernate.stat.SessionStatistics
getStatistics()
String
getTenantIdentifier()
org.hibernate.Transaction
getTransaction()
org.hibernate.TypeHelper
getTypeHelper()
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, Serializable id)
<T> T
load(Class<T> theClass, Serializable id, org.hibernate.LockMode lockMode)
<T> T
load(Class<T> theClass, Serializable id, org.hibernate.LockOptions lockOptions)
void
load(Object object, Serializable id)
Object
load(String entityName, Serializable id)
Object
load(String entityName, Serializable id, org.hibernate.LockMode lockMode)
Object
load(String entityName, Serializable id, org.hibernate.LockOptions lockOptions)
void
lock(Object entity, javax.persistence.LockModeType lockMode)
void
lock(Object entity, javax.persistence.LockModeType lockMode, Map<String,Object> properties)
void
lock(Object object, org.hibernate.LockMode lockMode)
Deprecated.void
lock(String entityName, Object object, org.hibernate.LockMode lockMode)
Deprecated.Object
merge(Object object)
Object
merge(String entityName, Object object)
void
persist(Object object)
void
persist(String entityName, Object object)
void
reconnect(Connection connection)
void
refresh(Object object)
void
refresh(Object entity, Map<String,Object> properties)
void
refresh(Object entity, javax.persistence.LockModeType lockMode)
void
refresh(Object entity, javax.persistence.LockModeType lockMode, Map<String,Object> properties)
void
refresh(Object object, org.hibernate.LockMode lockMode)
Deprecated.void
refresh(Object object, org.hibernate.LockOptions lockOptions)
void
refresh(String paramString, Object paramObject)
void
refresh(String paramString, Object paramObject, org.hibernate.LockOptions paramLockOptions)
void
remove(Object entity)
void
replicate(Object object, org.hibernate.ReplicationMode replicationMode)
void
replicate(String entityName, Object object, org.hibernate.ReplicationMode replicationMode)
Serializable
save(Object object)
Serializable
save(String entityName, Object object)
void
saveOrUpdate(Object object)
void
saveOrUpdate(String entityName, Object object)
org.hibernate.SharedSessionBuilder<?>
sessionWithOptions()
void
setCacheMode(org.hibernate.CacheMode cacheMode)
void
setDefaultReadOnly(boolean readOnly)
void
setFlushMode(javax.persistence.FlushModeType flushMode)
void
setFlushMode(org.hibernate.FlushMode flushMode)
Deprecated.void
setHibernateFlushMode(org.hibernate.FlushMode flushMode)
void
setJdbcBatchSize(Integer size)
void
setProperty(String propertyName, Object value)
void
setReadOnly(Object entityOrProxy, boolean readOnly)
<T> T
unwrap(Class<T> cls)
void
update(Object object)
void
update(String entityName, Object object)
-
Methods inherited from class net.sf.basedb.core.hibernate.AbstractQueryCache
cacheQuery, getCachedQuery, getCachedQuery
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
session
private final org.hibernate.Session session
-
-
Method Detail
-
getParentSession
public org.hibernate.Session getParentSession()
Get the underlying parent session from Hibernate.
-
beginTransaction
public org.hibernate.Transaction beginTransaction() throws org.hibernate.HibernateException
- Specified by:
beginTransaction
in interfaceorg.hibernate.SharedSessionContract
- Throws:
org.hibernate.HibernateException
-
buildLockRequest
public org.hibernate.Session.LockRequest buildLockRequest(org.hibernate.LockOptions options)
- Specified by:
buildLockRequest
in interfaceorg.hibernate.Session
-
cancelQuery
public void cancelQuery() throws org.hibernate.HibernateException
- Specified by:
cancelQuery
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
clear
public void clear()
- Specified by:
clear
in interfacejavax.persistence.EntityManager
- Specified by:
clear
in interfaceorg.hibernate.Session
-
close
public void close() throws org.hibernate.HibernateException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfacejavax.persistence.EntityManager
- Specified by:
close
in interfaceorg.hibernate.SharedSessionContract
- Throws:
org.hibernate.HibernateException
-
contains
public boolean contains(Object object)
- Specified by:
contains
in interfacejavax.persistence.EntityManager
-
createCriteria
@Deprecated public org.hibernate.Criteria createCriteria(Class persistentClass, String alias)
Deprecated.- Specified by:
createCriteria
in interfaceorg.hibernate.SharedSessionContract
-
createCriteria
@Deprecated public org.hibernate.Criteria createCriteria(Class persistentClass)
Deprecated.- Specified by:
createCriteria
in interfaceorg.hibernate.SharedSessionContract
-
createCriteria
@Deprecated public org.hibernate.Criteria createCriteria(String entityName, String alias)
Deprecated.- Specified by:
createCriteria
in interfaceorg.hibernate.SharedSessionContract
-
createCriteria
@Deprecated public org.hibernate.Criteria createCriteria(String entityName)
Deprecated.- Specified by:
createCriteria
in interfaceorg.hibernate.SharedSessionContract
-
createFilter
public org.hibernate.Query<?> createFilter(Object collection, String queryString) throws org.hibernate.HibernateException
- Specified by:
createFilter
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
createQuery
public org.hibernate.query.Query<?> createQuery(String queryString) throws org.hibernate.HibernateException
If the same query has been executed before, return the cached instance, otherwise create a new query from the parent session and cache it.- Specified by:
createQuery
in interfacejavax.persistence.EntityManager
- Specified by:
createQuery
in interfaceorg.hibernate.query.QueryProducer
- Specified by:
createQuery
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
createSQLQuery
@Deprecated public org.hibernate.query.NativeQuery<?> createSQLQuery(String queryString) throws org.hibernate.HibernateException
Deprecated.If the same query has been executed before, return the cached instance, otherwise create a new query from the parent session and cache it.- Specified by:
createSQLQuery
in interfaceorg.hibernate.query.QueryProducer
- Specified by:
createSQLQuery
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
delete
public void delete(Object object) throws org.hibernate.HibernateException
- Specified by:
delete
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
delete
public void delete(String entityName, Object object) throws org.hibernate.HibernateException
- Specified by:
delete
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
disableFetchProfile
public void disableFetchProfile(String name) throws org.hibernate.UnknownProfileException
- Specified by:
disableFetchProfile
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.UnknownProfileException
-
disableFilter
public void disableFilter(String filterName)
- Specified by:
disableFilter
in interfaceorg.hibernate.Session
-
disconnect
public Connection disconnect() throws org.hibernate.HibernateException
- Specified by:
disconnect
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
doWork
public void doWork(org.hibernate.jdbc.Work work) throws org.hibernate.HibernateException
- Specified by:
doWork
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
enableFetchProfile
public void enableFetchProfile(String name) throws org.hibernate.UnknownProfileException
- Specified by:
enableFetchProfile
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.UnknownProfileException
-
enableFilter
public org.hibernate.Filter enableFilter(String filterName)
- Specified by:
enableFilter
in interfaceorg.hibernate.Session
-
evict
public void evict(Object object) throws org.hibernate.HibernateException
- Specified by:
evict
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
flush
public void flush() throws org.hibernate.HibernateException
- Specified by:
flush
in interfacejavax.persistence.EntityManager
- Specified by:
flush
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
get
public <T> T get(Class<T> clazz, Serializable id, org.hibernate.LockMode lockMode) throws org.hibernate.HibernateException
- Specified by:
get
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
get
public <T> T get(Class<T> clazz, Serializable id, org.hibernate.LockOptions lockOptions) throws org.hibernate.HibernateException
- Specified by:
get
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
get
public <T> T get(Class<T> clazz, Serializable id) throws org.hibernate.HibernateException
- Specified by:
get
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
get
@Deprecated public Object get(String entityName, Serializable id, org.hibernate.LockMode lockMode) throws org.hibernate.HibernateException
Deprecated.- Specified by:
get
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
get
public Object get(String entityName, Serializable id, org.hibernate.LockOptions lockOptions) throws org.hibernate.HibernateException
- Specified by:
get
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
get
public Object get(String entityName, Serializable id) throws org.hibernate.HibernateException
- Specified by:
get
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
getCacheMode
public org.hibernate.CacheMode getCacheMode()
- Specified by:
getCacheMode
in interfaceorg.hibernate.Session
-
getCurrentLockMode
public org.hibernate.LockMode getCurrentLockMode(Object object) throws org.hibernate.HibernateException
- Specified by:
getCurrentLockMode
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
getEnabledFilter
public org.hibernate.Filter getEnabledFilter(String filterName)
- Specified by:
getEnabledFilter
in interfaceorg.hibernate.Session
-
getEntityName
public String getEntityName(Object object) throws org.hibernate.HibernateException
- Specified by:
getEntityName
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
getFlushMode
public javax.persistence.FlushModeType getFlushMode()
- Specified by:
getFlushMode
in interfacejavax.persistence.EntityManager
- Specified by:
getFlushMode
in interfaceorg.hibernate.Session
-
getIdentifier
public Serializable getIdentifier(Object object) throws org.hibernate.HibernateException
- Specified by:
getIdentifier
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
getLobHelper
public org.hibernate.LobHelper getLobHelper()
- Specified by:
getLobHelper
in interfaceorg.hibernate.Session
-
getNamedQuery
public org.hibernate.query.Query<?> getNamedQuery(String queryName) throws org.hibernate.HibernateException
If the same query has been executed before, return the cached instance, otherwise create a new query from the parent session and cache it.- Specified by:
getNamedQuery
in interfaceorg.hibernate.query.QueryProducer
- Specified by:
getNamedQuery
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
getSessionFactory
public org.hibernate.SessionFactory getSessionFactory()
- Specified by:
getSessionFactory
in interfaceorg.hibernate.Session
-
getStatistics
public org.hibernate.stat.SessionStatistics getStatistics()
- Specified by:
getStatistics
in interfaceorg.hibernate.Session
-
getTransaction
public org.hibernate.Transaction getTransaction()
- Specified by:
getTransaction
in interfacejavax.persistence.EntityManager
- Specified by:
getTransaction
in interfaceorg.hibernate.SharedSessionContract
-
getTypeHelper
public org.hibernate.TypeHelper getTypeHelper()
- Specified by:
getTypeHelper
in interfaceorg.hibernate.Session
-
isConnected
public boolean isConnected()
- Specified by:
isConnected
in interfaceorg.hibernate.SharedSessionContract
-
isDefaultReadOnly
public boolean isDefaultReadOnly()
- Specified by:
isDefaultReadOnly
in interfaceorg.hibernate.Session
-
isDirty
public boolean isDirty() throws org.hibernate.HibernateException
- Specified by:
isDirty
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
isFetchProfileEnabled
public boolean isFetchProfileEnabled(String name) throws org.hibernate.UnknownProfileException
- Specified by:
isFetchProfileEnabled
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.UnknownProfileException
-
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interfacejavax.persistence.EntityManager
- Specified by:
isOpen
in interfaceorg.hibernate.SharedSessionContract
-
isReadOnly
public boolean isReadOnly(Object entityOrProxy)
- Specified by:
isReadOnly
in interfaceorg.hibernate.Session
-
load
public <T> T load(Class<T> theClass, Serializable id, org.hibernate.LockMode lockMode) throws org.hibernate.HibernateException
- Specified by:
load
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
load
public <T> T load(Class<T> theClass, Serializable id, org.hibernate.LockOptions lockOptions) throws org.hibernate.HibernateException
- Specified by:
load
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
load
public <T> T load(Class<T> theClass, Serializable id) throws org.hibernate.HibernateException
- Specified by:
load
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
load
public void load(Object object, Serializable id) throws org.hibernate.HibernateException
- Specified by:
load
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
load
public Object load(String entityName, Serializable id, org.hibernate.LockMode lockMode) throws org.hibernate.HibernateException
- Specified by:
load
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
load
public Object load(String entityName, Serializable id, org.hibernate.LockOptions lockOptions) throws org.hibernate.HibernateException
- Specified by:
load
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
load
public Object load(String entityName, Serializable id) throws org.hibernate.HibernateException
- Specified by:
load
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
lock
@Deprecated public void lock(Object object, org.hibernate.LockMode lockMode) throws org.hibernate.HibernateException
Deprecated.- Specified by:
lock
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
lock
@Deprecated public void lock(String entityName, Object object, org.hibernate.LockMode lockMode) throws org.hibernate.HibernateException
Deprecated.- Specified by:
lock
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
merge
public Object merge(Object object) throws org.hibernate.HibernateException
- Specified by:
merge
in interfacejavax.persistence.EntityManager
- Specified by:
merge
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
merge
public Object merge(String entityName, Object object) throws org.hibernate.HibernateException
- Specified by:
merge
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
persist
public void persist(Object object) throws org.hibernate.HibernateException
- Specified by:
persist
in interfacejavax.persistence.EntityManager
- Specified by:
persist
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
persist
public void persist(String entityName, Object object) throws org.hibernate.HibernateException
- Specified by:
persist
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
reconnect
public void reconnect(Connection connection) throws org.hibernate.HibernateException
- Specified by:
reconnect
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
refresh
@Deprecated public void refresh(Object object, org.hibernate.LockMode lockMode) throws org.hibernate.HibernateException
Deprecated.- Specified by:
refresh
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
refresh
public void refresh(Object object, org.hibernate.LockOptions lockOptions) throws org.hibernate.HibernateException
- Specified by:
refresh
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
refresh
public void refresh(Object object) throws org.hibernate.HibernateException
- Specified by:
refresh
in interfacejavax.persistence.EntityManager
- Specified by:
refresh
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
replicate
public void replicate(Object object, org.hibernate.ReplicationMode replicationMode) throws org.hibernate.HibernateException
- Specified by:
replicate
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
replicate
public void replicate(String entityName, Object object, org.hibernate.ReplicationMode replicationMode) throws org.hibernate.HibernateException
- Specified by:
replicate
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
save
public Serializable save(Object object) throws org.hibernate.HibernateException
- Specified by:
save
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
save
public Serializable save(String entityName, Object object) throws org.hibernate.HibernateException
- Specified by:
save
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
saveOrUpdate
public void saveOrUpdate(Object object) throws org.hibernate.HibernateException
- Specified by:
saveOrUpdate
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
saveOrUpdate
public void saveOrUpdate(String entityName, Object object) throws org.hibernate.HibernateException
- Specified by:
saveOrUpdate
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
setCacheMode
public void setCacheMode(org.hibernate.CacheMode cacheMode)
- Specified by:
setCacheMode
in interfaceorg.hibernate.Session
-
setDefaultReadOnly
public void setDefaultReadOnly(boolean readOnly)
- Specified by:
setDefaultReadOnly
in interfaceorg.hibernate.Session
-
setFlushMode
@Deprecated public void setFlushMode(org.hibernate.FlushMode flushMode)
Deprecated.- Specified by:
setFlushMode
in interfaceorg.hibernate.Session
-
setReadOnly
public void setReadOnly(Object entityOrProxy, boolean readOnly)
- Specified by:
setReadOnly
in interfaceorg.hibernate.Session
-
update
public void update(Object object) throws org.hibernate.HibernateException
- Specified by:
update
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
update
public void update(String entityName, Object object) throws org.hibernate.HibernateException
- Specified by:
update
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
getTenantIdentifier
public String getTenantIdentifier()
- Specified by:
getTenantIdentifier
in interfaceorg.hibernate.SharedSessionContract
-
getNamedProcedureCall
public org.hibernate.procedure.ProcedureCall getNamedProcedureCall(String name)
- Specified by:
getNamedProcedureCall
in interfaceorg.hibernate.SharedSessionContract
-
createStoredProcedureCall
public org.hibernate.procedure.ProcedureCall createStoredProcedureCall(String name)
- Specified by:
createStoredProcedureCall
in interfaceorg.hibernate.SharedSessionContract
-
createStoredProcedureCall
public org.hibernate.procedure.ProcedureCall createStoredProcedureCall(String paramString, Class... paramArrayOfClass)
- Specified by:
createStoredProcedureCall
in interfaceorg.hibernate.SharedSessionContract
-
createStoredProcedureCall
public org.hibernate.procedure.ProcedureCall createStoredProcedureCall(String paramString, String... paramArrayOfString)
- Specified by:
createStoredProcedureCall
in interfaceorg.hibernate.SharedSessionContract
-
sessionWithOptions
public org.hibernate.SharedSessionBuilder<?> sessionWithOptions()
- Specified by:
sessionWithOptions
in interfaceorg.hibernate.Session
-
refresh
public void refresh(String paramString, Object paramObject)
- Specified by:
refresh
in interfaceorg.hibernate.Session
-
refresh
public void refresh(String paramString, Object paramObject, org.hibernate.LockOptions paramLockOptions)
- Specified by:
refresh
in interfaceorg.hibernate.Session
-
byId
public org.hibernate.IdentifierLoadAccess byId(String paramString)
- Specified by:
byId
in interfaceorg.hibernate.Session
-
byId
public <T> org.hibernate.IdentifierLoadAccess<T> byId(Class<T> paramClass)
- Specified by:
byId
in interfaceorg.hibernate.Session
-
byNaturalId
public org.hibernate.NaturalIdLoadAccess byNaturalId(String paramString)
- Specified by:
byNaturalId
in interfaceorg.hibernate.Session
-
byNaturalId
public <T> org.hibernate.NaturalIdLoadAccess<T> byNaturalId(Class<T> paramClass)
- Specified by:
byNaturalId
in interfaceorg.hibernate.Session
-
bySimpleNaturalId
public org.hibernate.SimpleNaturalIdLoadAccess bySimpleNaturalId(String paramString)
- Specified by:
bySimpleNaturalId
in interfaceorg.hibernate.Session
-
bySimpleNaturalId
public <T> org.hibernate.SimpleNaturalIdLoadAccess<T> bySimpleNaturalId(Class<T> paramClass)
- Specified by:
bySimpleNaturalId
in interfaceorg.hibernate.Session
-
doReturningWork
public <T> T doReturningWork(org.hibernate.jdbc.ReturningWork<T> paramReturningWork) throws org.hibernate.HibernateException
- Specified by:
doReturningWork
in interfaceorg.hibernate.Session
- Throws:
org.hibernate.HibernateException
-
addEventListeners
public void addEventListeners(org.hibernate.SessionEventListener... paramArrayOfSessionEventListener)
- Specified by:
addEventListeners
in interfaceorg.hibernate.Session
-
getJdbcBatchSize
public Integer getJdbcBatchSize()
- Specified by:
getJdbcBatchSize
in interfaceorg.hibernate.SharedSessionContract
-
setJdbcBatchSize
public void setJdbcBatchSize(Integer size)
- Specified by:
setJdbcBatchSize
in interfaceorg.hibernate.SharedSessionContract
-
byMultipleIds
public <T> org.hibernate.MultiIdentifierLoadAccess<T> byMultipleIds(Class<T> entityClass)
- Specified by:
byMultipleIds
in interfaceorg.hibernate.Session
-
byMultipleIds
public org.hibernate.MultiIdentifierLoadAccess<?> byMultipleIds(String entityName)
- Specified by:
byMultipleIds
in interfaceorg.hibernate.Session
-
contains
public boolean contains(String entityName, Object entity)
- Specified by:
contains
in interfaceorg.hibernate.Session
-
createNamedQuery
public <T> org.hibernate.query.Query<T> createNamedQuery(String name, Class<T> resultType)
- Specified by:
createNamedQuery
in interfacejavax.persistence.EntityManager
- Specified by:
createNamedQuery
in interfaceorg.hibernate.query.QueryProducer
- Specified by:
createNamedQuery
in interfaceorg.hibernate.Session
-
createQuery
public org.hibernate.query.Query<?> createQuery(javax.persistence.criteria.CriteriaDelete criteria)
- Specified by:
createQuery
in interfacejavax.persistence.EntityManager
- Specified by:
createQuery
in interfaceorg.hibernate.Session
-
createQuery
public <T> org.hibernate.query.Query<T> createQuery(javax.persistence.criteria.CriteriaQuery<T> criteria)
- Specified by:
createQuery
in interfacejavax.persistence.EntityManager
- Specified by:
createQuery
in interfaceorg.hibernate.Session
-
createQuery
public org.hibernate.query.Query<?> createQuery(javax.persistence.criteria.CriteriaUpdate criteria)
- Specified by:
createQuery
in interfacejavax.persistence.EntityManager
- Specified by:
createQuery
in interfaceorg.hibernate.Session
-
createQuery
public <T> org.hibernate.query.Query<T> createQuery(String queryString, Class<T> resultType)
- Specified by:
createQuery
in interfacejavax.persistence.EntityManager
- Specified by:
createQuery
in interfaceorg.hibernate.query.QueryProducer
- Specified by:
createQuery
in interfaceorg.hibernate.Session
-
getHibernateFlushMode
public org.hibernate.FlushMode getHibernateFlushMode()
- Specified by:
getHibernateFlushMode
in interfaceorg.hibernate.Session
-
setHibernateFlushMode
public void setHibernateFlushMode(org.hibernate.FlushMode flushMode)
- Specified by:
setHibernateFlushMode
in interfaceorg.hibernate.Session
-
createNamedQuery
public org.hibernate.query.Query<?> createNamedQuery(String queryName)
- Specified by:
createNamedQuery
in interfacejavax.persistence.EntityManager
- Specified by:
createNamedQuery
in interfaceorg.hibernate.query.QueryProducer
-
createNativeQuery
public org.hibernate.query.NativeQuery createNativeQuery(String sql, Class resultClass)
- Specified by:
createNativeQuery
in interfacejavax.persistence.EntityManager
- Specified by:
createNativeQuery
in interfaceorg.hibernate.query.QueryProducer
-
createNativeQuery
public org.hibernate.query.NativeQuery<?> createNativeQuery(String sql, String resultSetMapping)
- Specified by:
createNativeQuery
in interfacejavax.persistence.EntityManager
- Specified by:
createNativeQuery
in interfaceorg.hibernate.query.QueryProducer
-
createNativeQuery
public org.hibernate.query.NativeQuery<?> createNativeQuery(String sql)
- Specified by:
createNativeQuery
in interfacejavax.persistence.EntityManager
- Specified by:
createNativeQuery
in interfaceorg.hibernate.query.QueryProducer
-
getNamedNativeQuery
public org.hibernate.query.NativeQuery<?> getNamedNativeQuery(String queryName)
- Specified by:
getNamedNativeQuery
in interfaceorg.hibernate.query.QueryProducer
-
createEntityGraph
public <T> javax.persistence.EntityGraph<T> createEntityGraph(Class<T> rootType)
- Specified by:
createEntityGraph
in interfacejavax.persistence.EntityManager
-
createEntityGraph
public javax.persistence.EntityGraph<?> createEntityGraph(String graphName)
- Specified by:
createEntityGraph
in interfacejavax.persistence.EntityManager
-
createNamedStoredProcedureQuery
public javax.persistence.StoredProcedureQuery createNamedStoredProcedureQuery(String name)
- Specified by:
createNamedStoredProcedureQuery
in interfacejavax.persistence.EntityManager
-
createStoredProcedureQuery
public javax.persistence.StoredProcedureQuery createStoredProcedureQuery(String procedureName, Class... resultClasses)
- Specified by:
createStoredProcedureQuery
in interfacejavax.persistence.EntityManager
-
createStoredProcedureQuery
public javax.persistence.StoredProcedureQuery createStoredProcedureQuery(String procedureName, String... resultSetMappings)
- Specified by:
createStoredProcedureQuery
in interfacejavax.persistence.EntityManager
-
createStoredProcedureQuery
public javax.persistence.StoredProcedureQuery createStoredProcedureQuery(String procedureName)
- Specified by:
createStoredProcedureQuery
in interfacejavax.persistence.EntityManager
-
detach
public void detach(Object object)
- Specified by:
detach
in interfacejavax.persistence.EntityManager
-
find
public <T> T find(Class<T> entityClass, Object primaryKey, javax.persistence.LockModeType lockMode, Map<String,Object> properties)
- Specified by:
find
in interfacejavax.persistence.EntityManager
-
find
public <T> T find(Class<T> entityClass, Object primaryKey, javax.persistence.LockModeType lockMode)
- Specified by:
find
in interfacejavax.persistence.EntityManager
-
find
public <T> T find(Class<T> entityClass, Object primaryKey, Map<String,Object> properties)
- Specified by:
find
in interfacejavax.persistence.EntityManager
-
find
public <T> T find(Class<T> entityClass, Object primaryKey)
- Specified by:
find
in interfacejavax.persistence.EntityManager
-
getCriteriaBuilder
public javax.persistence.criteria.CriteriaBuilder getCriteriaBuilder()
- Specified by:
getCriteriaBuilder
in interfacejavax.persistence.EntityManager
-
getDelegate
public Object getDelegate()
- Specified by:
getDelegate
in interfacejavax.persistence.EntityManager
-
getEntityGraph
public javax.persistence.EntityGraph<?> getEntityGraph(String graphName)
- Specified by:
getEntityGraph
in interfacejavax.persistence.EntityManager
-
getEntityGraphs
public <T> List<javax.persistence.EntityGraph<? super T>> getEntityGraphs(Class<T> entityClass)
- Specified by:
getEntityGraphs
in interfacejavax.persistence.EntityManager
-
getEntityManagerFactory
public javax.persistence.EntityManagerFactory getEntityManagerFactory()
- Specified by:
getEntityManagerFactory
in interfacejavax.persistence.EntityManager
-
getLockMode
public javax.persistence.LockModeType getLockMode(Object entity)
- Specified by:
getLockMode
in interfacejavax.persistence.EntityManager
-
getMetamodel
public javax.persistence.metamodel.Metamodel getMetamodel()
- Specified by:
getMetamodel
in interfacejavax.persistence.EntityManager
-
getProperties
public Map<String,Object> getProperties()
- Specified by:
getProperties
in interfacejavax.persistence.EntityManager
-
getReference
public <T> T getReference(Class<T> entityClass, Object primaryKey)
- Specified by:
getReference
in interfacejavax.persistence.EntityManager
-
isJoinedToTransaction
public boolean isJoinedToTransaction()
- Specified by:
isJoinedToTransaction
in interfacejavax.persistence.EntityManager
-
joinTransaction
public void joinTransaction()
- Specified by:
joinTransaction
in interfacejavax.persistence.EntityManager
-
lock
public void lock(Object entity, javax.persistence.LockModeType lockMode, Map<String,Object> properties)
- Specified by:
lock
in interfacejavax.persistence.EntityManager
-
lock
public void lock(Object entity, javax.persistence.LockModeType lockMode)
- Specified by:
lock
in interfacejavax.persistence.EntityManager
-
refresh
public void refresh(Object entity, javax.persistence.LockModeType lockMode, Map<String,Object> properties)
- Specified by:
refresh
in interfacejavax.persistence.EntityManager
-
refresh
public void refresh(Object entity, javax.persistence.LockModeType lockMode)
- Specified by:
refresh
in interfacejavax.persistence.EntityManager
-
refresh
public void refresh(Object entity, Map<String,Object> properties)
- Specified by:
refresh
in interfacejavax.persistence.EntityManager
-
remove
public void remove(Object entity)
- Specified by:
remove
in interfacejavax.persistence.EntityManager
-
setFlushMode
public void setFlushMode(javax.persistence.FlushModeType flushMode)
- Specified by:
setFlushMode
in interfacejavax.persistence.EntityManager
-
setProperty
public void setProperty(String propertyName, Object value)
- Specified by:
setProperty
in interfacejavax.persistence.EntityManager
-
unwrap
public <T> T unwrap(Class<T> cls)
- Specified by:
unwrap
in interfacejavax.persistence.EntityManager
-
getSession
@Deprecated public org.hibernate.Session getSession()
Deprecated.- Specified by:
getSession
in interfaceorg.hibernate.jpa.HibernateEntityManager
-
-