public class SessionDecorator extends Object implements org.hibernate.Session
Constructor and Description |
---|
SessionDecorator(org.hibernate.Session delegate) |
Modifier and Type | Method and Description |
---|---|
void |
addEventListeners(org.hibernate.SessionEventListener... listeners) |
org.hibernate.Transaction |
beginTransaction() |
org.hibernate.Session.LockRequest |
buildLockRequest(org.hibernate.LockOptions lockOptions) |
org.hibernate.IdentifierLoadAccess |
byId(Class entityClass) |
org.hibernate.IdentifierLoadAccess |
byId(String entityName) |
org.hibernate.NaturalIdLoadAccess |
byNaturalId(Class entityClass) |
org.hibernate.NaturalIdLoadAccess |
byNaturalId(String entityName) |
org.hibernate.SimpleNaturalIdLoadAccess |
bySimpleNaturalId(Class entityClass) |
org.hibernate.SimpleNaturalIdLoadAccess |
bySimpleNaturalId(String entityName) |
void |
cancelQuery() |
void |
clear() |
Connection |
close() |
boolean |
contains(Object object) |
org.hibernate.Criteria |
createCriteria(Class persistentClass) |
org.hibernate.Criteria |
createCriteria(Class persistentClass,
String alias) |
org.hibernate.Criteria |
createCriteria(String entityName) |
org.hibernate.Criteria |
createCriteria(String entityName,
String alias) |
org.hibernate.Query |
createFilter(Object collection,
String queryString) |
org.hibernate.Query |
createQuery(String queryString) |
org.hibernate.SQLQuery |
createSQLQuery(String queryString) |
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) |
void |
delete(Object object) |
void |
delete(String entityName,
Object object) |
void |
disableFetchProfile(String name) |
void |
disableFilter(String filterName) |
Connection |
disconnect() |
<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) |
void |
flush() |
Object |
get(Class clazz,
Serializable id) |
Object |
get(Class clazz,
Serializable id,
org.hibernate.LockMode lockMode)
Deprecated.
|
Object |
get(Class 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() |
org.hibernate.LockMode |
getCurrentLockMode(Object object) |
protected org.hibernate.Session |
getDelegate() |
org.hibernate.Filter |
getEnabledFilter(String filterName) |
String |
getEntityName(Object object) |
org.hibernate.FlushMode |
getFlushMode() |
Serializable |
getIdentifier(Object object) |
org.hibernate.LobHelper |
getLobHelper() |
org.hibernate.procedure.ProcedureCall |
getNamedProcedureCall(String name) |
org.hibernate.Query |
getNamedQuery(String queryName) |
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 |
isOpen() |
boolean |
isReadOnly(Object entityOrProxy) |
Object |
load(Class theClass,
Serializable id) |
Object |
load(Class theClass,
Serializable id,
org.hibernate.LockMode lockMode)
Deprecated.
|
Object |
load(Class 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)
Deprecated.
|
Object |
load(String entityName,
Serializable id,
org.hibernate.LockOptions lockOptions) |
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 object,
org.hibernate.LockMode lockMode)
Deprecated.
|
void |
refresh(Object object,
org.hibernate.LockOptions lockOptions) |
void |
refresh(String entityName,
Object object) |
void |
refresh(String entityName,
Object object,
org.hibernate.LockOptions lockOptions) |
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(org.hibernate.FlushMode flushMode) |
void |
setReadOnly(Object entityOrProxy,
boolean readOnly) |
void |
update(Object object) |
void |
update(String entityName,
Object object) |
public SessionDecorator(@Nonnull org.hibernate.Session delegate)
@Nonnull protected org.hibernate.Session getDelegate()
public org.hibernate.SharedSessionBuilder sessionWithOptions()
sessionWithOptions
in interface org.hibernate.Session
public void flush() throws org.hibernate.HibernateException
flush
in interface org.hibernate.Session
org.hibernate.HibernateException
public void setFlushMode(org.hibernate.FlushMode flushMode)
setFlushMode
in interface org.hibernate.Session
public org.hibernate.FlushMode getFlushMode()
getFlushMode
in interface org.hibernate.Session
public void setCacheMode(org.hibernate.CacheMode cacheMode)
setCacheMode
in interface org.hibernate.Session
public org.hibernate.CacheMode getCacheMode()
getCacheMode
in interface org.hibernate.Session
public org.hibernate.SessionFactory getSessionFactory()
getSessionFactory
in interface org.hibernate.Session
public Connection close() throws org.hibernate.HibernateException
close
in interface org.hibernate.Session
org.hibernate.HibernateException
public void cancelQuery() throws org.hibernate.HibernateException
cancelQuery
in interface org.hibernate.Session
org.hibernate.HibernateException
public boolean isOpen()
isOpen
in interface org.hibernate.Session
public boolean isConnected()
isConnected
in interface org.hibernate.Session
public boolean isDirty() throws org.hibernate.HibernateException
isDirty
in interface org.hibernate.Session
org.hibernate.HibernateException
public boolean isDefaultReadOnly()
isDefaultReadOnly
in interface org.hibernate.Session
public void setDefaultReadOnly(boolean readOnly)
setDefaultReadOnly
in interface org.hibernate.Session
public Serializable getIdentifier(Object object)
getIdentifier
in interface org.hibernate.Session
public boolean contains(Object object)
contains
in interface org.hibernate.Session
public void evict(Object object)
evict
in interface org.hibernate.Session
@Deprecated public Object load(Class theClass, Serializable id, org.hibernate.LockMode lockMode)
load
in interface org.hibernate.Session
public Object load(Class theClass, Serializable id, org.hibernate.LockOptions lockOptions)
load
in interface org.hibernate.Session
@Deprecated public Object load(String entityName, Serializable id, org.hibernate.LockMode lockMode)
load
in interface org.hibernate.Session
public Object load(String entityName, Serializable id, org.hibernate.LockOptions lockOptions)
load
in interface org.hibernate.Session
public Object load(Class theClass, Serializable id)
load
in interface org.hibernate.Session
public Object load(String entityName, Serializable id)
load
in interface org.hibernate.Session
public void load(Object object, Serializable id)
load
in interface org.hibernate.Session
public void replicate(Object object, org.hibernate.ReplicationMode replicationMode)
replicate
in interface org.hibernate.Session
public void replicate(String entityName, Object object, org.hibernate.ReplicationMode replicationMode)
replicate
in interface org.hibernate.Session
public Serializable save(Object object)
save
in interface org.hibernate.Session
public Serializable save(String entityName, Object object)
save
in interface org.hibernate.Session
public void saveOrUpdate(Object object)
saveOrUpdate
in interface org.hibernate.Session
public void saveOrUpdate(String entityName, Object object)
saveOrUpdate
in interface org.hibernate.Session
public void update(Object object)
update
in interface org.hibernate.Session
public void update(String entityName, Object object)
update
in interface org.hibernate.Session
public Object merge(String entityName, Object object)
merge
in interface org.hibernate.Session
public void persist(Object object)
persist
in interface org.hibernate.Session
public void persist(String entityName, Object object)
persist
in interface org.hibernate.Session
public void delete(Object object)
delete
in interface org.hibernate.Session
public void delete(String entityName, Object object)
delete
in interface org.hibernate.Session
@Deprecated public void lock(Object object, org.hibernate.LockMode lockMode)
lock
in interface org.hibernate.Session
@Deprecated public void lock(String entityName, Object object, org.hibernate.LockMode lockMode)
lock
in interface org.hibernate.Session
public org.hibernate.Session.LockRequest buildLockRequest(org.hibernate.LockOptions lockOptions)
buildLockRequest
in interface org.hibernate.Session
public void refresh(Object object)
refresh
in interface org.hibernate.Session
public void refresh(String entityName, Object object)
refresh
in interface org.hibernate.Session
@Deprecated public void refresh(Object object, org.hibernate.LockMode lockMode)
refresh
in interface org.hibernate.Session
public void refresh(Object object, org.hibernate.LockOptions lockOptions)
refresh
in interface org.hibernate.Session
public void refresh(String entityName, Object object, org.hibernate.LockOptions lockOptions)
refresh
in interface org.hibernate.Session
public org.hibernate.LockMode getCurrentLockMode(Object object)
getCurrentLockMode
in interface org.hibernate.Session
public org.hibernate.Query createFilter(Object collection, String queryString)
createFilter
in interface org.hibernate.Session
public void clear()
clear
in interface org.hibernate.Session
public Object get(Class clazz, Serializable id)
get
in interface org.hibernate.Session
@Deprecated public Object get(Class clazz, Serializable id, org.hibernate.LockMode lockMode)
get
in interface org.hibernate.Session
public Object get(Class clazz, Serializable id, org.hibernate.LockOptions lockOptions)
get
in interface org.hibernate.Session
public Object get(String entityName, Serializable id)
get
in interface org.hibernate.Session
@Deprecated public Object get(String entityName, Serializable id, org.hibernate.LockMode lockMode)
get
in interface org.hibernate.Session
public Object get(String entityName, Serializable id, org.hibernate.LockOptions lockOptions)
get
in interface org.hibernate.Session
public String getEntityName(Object object)
getEntityName
in interface org.hibernate.Session
public org.hibernate.IdentifierLoadAccess byId(String entityName)
byId
in interface org.hibernate.Session
public org.hibernate.IdentifierLoadAccess byId(Class entityClass)
byId
in interface org.hibernate.Session
public org.hibernate.NaturalIdLoadAccess byNaturalId(String entityName)
byNaturalId
in interface org.hibernate.Session
public org.hibernate.NaturalIdLoadAccess byNaturalId(Class entityClass)
byNaturalId
in interface org.hibernate.Session
public org.hibernate.SimpleNaturalIdLoadAccess bySimpleNaturalId(String entityName)
bySimpleNaturalId
in interface org.hibernate.Session
public org.hibernate.SimpleNaturalIdLoadAccess bySimpleNaturalId(Class entityClass)
bySimpleNaturalId
in interface org.hibernate.Session
public org.hibernate.Filter enableFilter(String filterName)
enableFilter
in interface org.hibernate.Session
public org.hibernate.Filter getEnabledFilter(String filterName)
getEnabledFilter
in interface org.hibernate.Session
public void disableFilter(String filterName)
disableFilter
in interface org.hibernate.Session
public org.hibernate.stat.SessionStatistics getStatistics()
getStatistics
in interface org.hibernate.Session
public boolean isReadOnly(Object entityOrProxy)
isReadOnly
in interface org.hibernate.Session
public void setReadOnly(Object entityOrProxy, boolean readOnly)
setReadOnly
in interface org.hibernate.Session
public void doWork(org.hibernate.jdbc.Work work) throws org.hibernate.HibernateException
doWork
in interface org.hibernate.Session
org.hibernate.HibernateException
public <T> T doReturningWork(org.hibernate.jdbc.ReturningWork<T> work) throws org.hibernate.HibernateException
doReturningWork
in interface org.hibernate.Session
org.hibernate.HibernateException
public Connection disconnect()
disconnect
in interface org.hibernate.Session
public void reconnect(Connection connection)
reconnect
in interface org.hibernate.Session
public boolean isFetchProfileEnabled(String name) throws org.hibernate.UnknownProfileException
isFetchProfileEnabled
in interface org.hibernate.Session
org.hibernate.UnknownProfileException
public void enableFetchProfile(String name) throws org.hibernate.UnknownProfileException
enableFetchProfile
in interface org.hibernate.Session
org.hibernate.UnknownProfileException
public void disableFetchProfile(String name) throws org.hibernate.UnknownProfileException
disableFetchProfile
in interface org.hibernate.Session
org.hibernate.UnknownProfileException
public org.hibernate.TypeHelper getTypeHelper()
getTypeHelper
in interface org.hibernate.Session
public org.hibernate.LobHelper getLobHelper()
getLobHelper
in interface org.hibernate.Session
public void addEventListeners(org.hibernate.SessionEventListener... listeners)
addEventListeners
in interface org.hibernate.Session
public String getTenantIdentifier()
getTenantIdentifier
in interface org.hibernate.SharedSessionContract
public org.hibernate.Transaction beginTransaction()
beginTransaction
in interface org.hibernate.SharedSessionContract
public org.hibernate.Transaction getTransaction()
getTransaction
in interface org.hibernate.SharedSessionContract
public org.hibernate.Query getNamedQuery(String queryName)
getNamedQuery
in interface org.hibernate.SharedSessionContract
public org.hibernate.Query createQuery(String queryString)
createQuery
in interface org.hibernate.SharedSessionContract
public org.hibernate.SQLQuery createSQLQuery(String queryString)
createSQLQuery
in interface org.hibernate.SharedSessionContract
public org.hibernate.procedure.ProcedureCall getNamedProcedureCall(String name)
getNamedProcedureCall
in interface org.hibernate.SharedSessionContract
public org.hibernate.procedure.ProcedureCall createStoredProcedureCall(String procedureName)
createStoredProcedureCall
in interface org.hibernate.SharedSessionContract
public org.hibernate.procedure.ProcedureCall createStoredProcedureCall(String procedureName, Class... resultClasses)
createStoredProcedureCall
in interface org.hibernate.SharedSessionContract
public org.hibernate.procedure.ProcedureCall createStoredProcedureCall(String procedureName, String... resultSetMappings)
createStoredProcedureCall
in interface org.hibernate.SharedSessionContract
public org.hibernate.Criteria createCriteria(Class persistentClass)
createCriteria
in interface org.hibernate.SharedSessionContract
public org.hibernate.Criteria createCriteria(Class persistentClass, String alias)
createCriteria
in interface org.hibernate.SharedSessionContract
public org.hibernate.Criteria createCriteria(String entityName)
createCriteria
in interface org.hibernate.SharedSessionContract