|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.hibernate.AbstractQueryCache net.sf.basedb.core.hibernate.SessionWrapper
public class SessionWrapper
Wrapper around Hibernate sessions that includes a query cache. This wrapper forwards all calls to the underlying real Hibernate session.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.hibernate.Session |
---|
org.hibernate.Session.LockRequest |
Field Summary | |
---|---|
private static long |
serialVersionUID
|
private org.hibernate.Session |
session
|
Constructor Summary | |
---|---|
SessionWrapper(org.hibernate.Session session)
Creates a new session wrapper |
Method Summary | |
---|---|
org.hibernate.Transaction |
beginTransaction()
|
org.hibernate.Session.LockRequest |
buildLockRequest(org.hibernate.LockOptions options)
|
void |
cancelQuery()
|
void |
clear()
|
Connection |
close()
|
Connection |
connection()
Deprecated. |
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)
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.SQLQuery |
createSQLQuery(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. |
void |
delete(Object object)
|
void |
delete(String entityName,
Object object)
|
void |
disableFetchProfile(String name)
|
void |
disableFilter(String filterName)
|
Connection |
disconnect()
|
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)
|
org.hibernate.Filter |
getEnabledFilter(String filterName)
|
org.hibernate.EntityMode |
getEntityMode()
|
String |
getEntityName(Object object)
|
org.hibernate.FlushMode |
getFlushMode()
|
Serializable |
getIdentifier(Object object)
|
org.hibernate.LobHelper |
getLobHelper()
|
org.hibernate.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. |
org.hibernate.Session |
getSession(org.hibernate.EntityMode entityMode)
|
org.hibernate.SessionFactory |
getSessionFactory()
|
org.hibernate.stat.SessionStatistics |
getStatistics()
|
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()
Deprecated. |
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 |
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)
|
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)
|
Methods inherited from class net.sf.basedb.core.hibernate.AbstractQueryCache |
---|
cacheQuery, getCachedQuery |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private final org.hibernate.Session session
Constructor Detail |
---|
public SessionWrapper(org.hibernate.Session session)
session
- The real Hibernate sessionMethod Detail |
---|
public org.hibernate.Session getParentSession()
public org.hibernate.Transaction beginTransaction() throws org.hibernate.HibernateException
beginTransaction
in interface org.hibernate.Session
org.hibernate.HibernateException
public org.hibernate.Session.LockRequest buildLockRequest(org.hibernate.LockOptions options)
buildLockRequest
in interface org.hibernate.Session
public void cancelQuery() throws org.hibernate.HibernateException
cancelQuery
in interface org.hibernate.Session
org.hibernate.HibernateException
public void clear()
clear
in interface org.hibernate.Session
public Connection close() throws org.hibernate.HibernateException
close
in interface org.hibernate.Session
org.hibernate.HibernateException
@Deprecated public Connection connection() throws org.hibernate.HibernateException
connection
in interface org.hibernate.Session
org.hibernate.HibernateException
public boolean contains(Object object)
contains
in interface org.hibernate.Session
public org.hibernate.Criteria createCriteria(Class persistentClass, String alias)
createCriteria
in interface org.hibernate.Session
public org.hibernate.Criteria createCriteria(Class persistentClass)
createCriteria
in interface org.hibernate.Session
public org.hibernate.Criteria createCriteria(String entityName, String alias)
createCriteria
in interface org.hibernate.Session
public org.hibernate.Criteria createCriteria(String entityName)
createCriteria
in interface org.hibernate.Session
public org.hibernate.Query createFilter(Object collection, String queryString) throws org.hibernate.HibernateException
createFilter
in interface org.hibernate.Session
org.hibernate.HibernateException
public org.hibernate.Query createQuery(String queryString) throws org.hibernate.HibernateException
createQuery
in interface org.hibernate.Session
org.hibernate.HibernateException
public org.hibernate.SQLQuery createSQLQuery(String queryString) throws org.hibernate.HibernateException
createSQLQuery
in interface org.hibernate.Session
org.hibernate.HibernateException
public void delete(Object object) throws org.hibernate.HibernateException
delete
in interface org.hibernate.Session
org.hibernate.HibernateException
public void delete(String entityName, Object object) throws org.hibernate.HibernateException
delete
in interface org.hibernate.Session
org.hibernate.HibernateException
public void disableFetchProfile(String name) throws org.hibernate.UnknownProfileException
disableFetchProfile
in interface org.hibernate.Session
org.hibernate.UnknownProfileException
public void disableFilter(String filterName)
disableFilter
in interface org.hibernate.Session
public Connection disconnect() throws org.hibernate.HibernateException
disconnect
in interface org.hibernate.Session
org.hibernate.HibernateException
public void doWork(org.hibernate.jdbc.Work work) throws org.hibernate.HibernateException
doWork
in interface org.hibernate.Session
org.hibernate.HibernateException
public void enableFetchProfile(String name) throws org.hibernate.UnknownProfileException
enableFetchProfile
in interface org.hibernate.Session
org.hibernate.UnknownProfileException
public org.hibernate.Filter enableFilter(String filterName)
enableFilter
in interface org.hibernate.Session
public void evict(Object object) throws org.hibernate.HibernateException
evict
in interface org.hibernate.Session
org.hibernate.HibernateException
public void flush() throws org.hibernate.HibernateException
flush
in interface org.hibernate.Session
org.hibernate.HibernateException
@Deprecated public Object get(Class clazz, Serializable id, org.hibernate.LockMode lockMode) throws org.hibernate.HibernateException
get
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object get(Class clazz, Serializable id, org.hibernate.LockOptions lockOptions) throws org.hibernate.HibernateException
get
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object get(Class clazz, Serializable id) throws org.hibernate.HibernateException
get
in interface org.hibernate.Session
org.hibernate.HibernateException
@Deprecated public Object get(String entityName, Serializable id, org.hibernate.LockMode lockMode) throws org.hibernate.HibernateException
get
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object get(String entityName, Serializable id, org.hibernate.LockOptions lockOptions) throws org.hibernate.HibernateException
get
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object get(String entityName, Serializable id) throws org.hibernate.HibernateException
get
in interface org.hibernate.Session
org.hibernate.HibernateException
public org.hibernate.CacheMode getCacheMode()
getCacheMode
in interface org.hibernate.Session
public org.hibernate.LockMode getCurrentLockMode(Object object) throws org.hibernate.HibernateException
getCurrentLockMode
in interface org.hibernate.Session
org.hibernate.HibernateException
public org.hibernate.Filter getEnabledFilter(String filterName)
getEnabledFilter
in interface org.hibernate.Session
public org.hibernate.EntityMode getEntityMode()
getEntityMode
in interface org.hibernate.Session
public String getEntityName(Object object) throws org.hibernate.HibernateException
getEntityName
in interface org.hibernate.Session
org.hibernate.HibernateException
public org.hibernate.FlushMode getFlushMode()
getFlushMode
in interface org.hibernate.Session
public Serializable getIdentifier(Object object) throws org.hibernate.HibernateException
getIdentifier
in interface org.hibernate.Session
org.hibernate.HibernateException
public org.hibernate.LobHelper getLobHelper()
getLobHelper
in interface org.hibernate.Session
public org.hibernate.Query getNamedQuery(String queryName) throws org.hibernate.HibernateException
getNamedQuery
in interface org.hibernate.Session
org.hibernate.HibernateException
public org.hibernate.Session getSession(org.hibernate.EntityMode entityMode)
getSession
in interface org.hibernate.Session
public org.hibernate.SessionFactory getSessionFactory()
getSessionFactory
in interface org.hibernate.Session
public org.hibernate.stat.SessionStatistics getStatistics()
getStatistics
in interface org.hibernate.Session
public org.hibernate.Transaction getTransaction()
getTransaction
in interface org.hibernate.Session
public org.hibernate.TypeHelper getTypeHelper()
getTypeHelper
in interface org.hibernate.Session
public boolean isConnected()
isConnected
in interface org.hibernate.Session
public boolean isDefaultReadOnly()
isDefaultReadOnly
in interface org.hibernate.Session
public boolean isDirty() throws org.hibernate.HibernateException
isDirty
in interface org.hibernate.Session
org.hibernate.HibernateException
public boolean isFetchProfileEnabled(String name) throws org.hibernate.UnknownProfileException
isFetchProfileEnabled
in interface org.hibernate.Session
org.hibernate.UnknownProfileException
public boolean isOpen()
isOpen
in interface org.hibernate.Session
public boolean isReadOnly(Object entityOrProxy)
isReadOnly
in interface org.hibernate.Session
@Deprecated public Object load(Class theClass, Serializable id, org.hibernate.LockMode lockMode) throws org.hibernate.HibernateException
load
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object load(Class theClass, Serializable id, org.hibernate.LockOptions lockOptions) throws org.hibernate.HibernateException
load
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object load(Class theClass, Serializable id) throws org.hibernate.HibernateException
load
in interface org.hibernate.Session
org.hibernate.HibernateException
public void load(Object object, Serializable id) throws org.hibernate.HibernateException
load
in interface org.hibernate.Session
org.hibernate.HibernateException
@Deprecated public Object load(String entityName, Serializable id, org.hibernate.LockMode lockMode) throws org.hibernate.HibernateException
load
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object load(String entityName, Serializable id, org.hibernate.LockOptions lockOptions) throws org.hibernate.HibernateException
load
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object load(String entityName, Serializable id) throws org.hibernate.HibernateException
load
in interface org.hibernate.Session
org.hibernate.HibernateException
@Deprecated public void lock(Object object, org.hibernate.LockMode lockMode) throws org.hibernate.HibernateException
lock
in interface org.hibernate.Session
org.hibernate.HibernateException
@Deprecated public void lock(String entityName, Object object, org.hibernate.LockMode lockMode) throws org.hibernate.HibernateException
lock
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object merge(Object object) throws org.hibernate.HibernateException
merge
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object merge(String entityName, Object object) throws org.hibernate.HibernateException
merge
in interface org.hibernate.Session
org.hibernate.HibernateException
public void persist(Object object) throws org.hibernate.HibernateException
persist
in interface org.hibernate.Session
org.hibernate.HibernateException
public void persist(String entityName, Object object) throws org.hibernate.HibernateException
persist
in interface org.hibernate.Session
org.hibernate.HibernateException
@Deprecated public void reconnect() throws org.hibernate.HibernateException
reconnect
in interface org.hibernate.Session
org.hibernate.HibernateException
public void reconnect(Connection connection) throws org.hibernate.HibernateException
reconnect
in interface org.hibernate.Session
org.hibernate.HibernateException
@Deprecated public void refresh(Object object, org.hibernate.LockMode lockMode) throws org.hibernate.HibernateException
refresh
in interface org.hibernate.Session
org.hibernate.HibernateException
public void refresh(Object object, org.hibernate.LockOptions lockOptions) throws org.hibernate.HibernateException
refresh
in interface org.hibernate.Session
org.hibernate.HibernateException
public void refresh(Object object) throws org.hibernate.HibernateException
refresh
in interface org.hibernate.Session
org.hibernate.HibernateException
public void replicate(Object object, org.hibernate.ReplicationMode replicationMode) throws org.hibernate.HibernateException
replicate
in interface org.hibernate.Session
org.hibernate.HibernateException
public void replicate(String entityName, Object object, org.hibernate.ReplicationMode replicationMode) throws org.hibernate.HibernateException
replicate
in interface org.hibernate.Session
org.hibernate.HibernateException
public Serializable save(Object object) throws org.hibernate.HibernateException
save
in interface org.hibernate.Session
org.hibernate.HibernateException
public Serializable save(String entityName, Object object) throws org.hibernate.HibernateException
save
in interface org.hibernate.Session
org.hibernate.HibernateException
public void saveOrUpdate(Object object) throws org.hibernate.HibernateException
saveOrUpdate
in interface org.hibernate.Session
org.hibernate.HibernateException
public void saveOrUpdate(String entityName, Object object) throws org.hibernate.HibernateException
saveOrUpdate
in interface org.hibernate.Session
org.hibernate.HibernateException
public void setCacheMode(org.hibernate.CacheMode cacheMode)
setCacheMode
in interface org.hibernate.Session
public void setDefaultReadOnly(boolean readOnly)
setDefaultReadOnly
in interface org.hibernate.Session
public void setFlushMode(org.hibernate.FlushMode flushMode)
setFlushMode
in interface org.hibernate.Session
public void setReadOnly(Object entityOrProxy, boolean readOnly)
setReadOnly
in interface org.hibernate.Session
public void update(Object object) throws org.hibernate.HibernateException
update
in interface org.hibernate.Session
org.hibernate.HibernateException
public void update(String entityName, Object object) throws org.hibernate.HibernateException
update
in interface org.hibernate.Session
org.hibernate.HibernateException
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |