org.picocontainer.persistence.hibernate
Class AbstractSessionDecorator

java.lang.Object
  extended by org.picocontainer.persistence.hibernate.AbstractSessionDecorator
All Implemented Interfaces:
Serializable, org.hibernate.Session
Direct Known Subclasses:
ScopedSession

public abstract class AbstractSessionDecorator
extends Object
implements org.hibernate.Session

Abstract session decorator

See Also:
Serialized Form

Constructor Summary
AbstractSessionDecorator()
           
 
Method Summary
 org.hibernate.Transaction beginTransaction()
           *
 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)
           *
 org.hibernate.SQLQuery createSQLQuery(String queryString)
           *
 void delete(Object object)
           *
 void delete(String entityName, Object object)
           *
 void disableFilter(String filterName)
           *
 Connection disconnect()
           *
 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)
           *
 Object get(String entityName, Serializable id)
           *
 Object get(String entityName, Serializable id, org.hibernate.LockMode lockMode)
           *
 org.hibernate.CacheMode getCacheMode()
           *
 org.hibernate.LockMode getCurrentLockMode(Object object)
           *
abstract  org.hibernate.Session getDelegate()
          Returns the Session delegate
 org.hibernate.Filter getEnabledFilter(String filterName)
           *
 org.hibernate.EntityMode getEntityMode()
           *
 String getEntityName(Object object)
           *
 org.hibernate.FlushMode getFlushMode()
           *
 Serializable getIdentifier(Object object)
           *
 org.hibernate.Query getNamedQuery(String queryName)
           *
 org.hibernate.Session getSession(org.hibernate.EntityMode entityMode)
           *
 org.hibernate.SessionFactory getSessionFactory()
           *
 org.hibernate.stat.SessionStatistics getStatistics()
           *
 org.hibernate.Transaction getTransaction()
           *
protected  RuntimeException handleException(RuntimeException cause)
          Invalidates the session calling invalidateDelegate() and just return the cause back.
abstract  void invalidateDelegate()
          Perform actions to dispose "burned" session properly.
 boolean isConnected()
           *
 boolean isDirty()
           *
 boolean isOpen()
           *
 Object load(Class theClass, Serializable id)
           *
 Object load(Class theClass, Serializable id, org.hibernate.LockMode lockMode)
           *
 void load(Object object, Serializable id)
           *
 Object load(String entityName, Serializable id)
           *
 Object load(String entityName, Serializable id, org.hibernate.LockMode lockMode)
           *
 void lock(Object object, org.hibernate.LockMode lockMode)
           *
 void lock(String entityEntity, Object object, org.hibernate.LockMode lockMode)
           *
 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 conn)
           *
 void refresh(Object object)
           *
 void refresh(Object object, org.hibernate.LockMode lockMode)
           *
 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 setFlushMode(org.hibernate.FlushMode value)
           *
 void setReadOnly(Object entity, boolean readOnly)
           *
 void update(Object object)
           *
 void update(String entityName, Object object)
           *
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSessionDecorator

public AbstractSessionDecorator()
Method Detail

getDelegate

public abstract org.hibernate.Session getDelegate()
Returns the Session delegate

Returns:
The Session

invalidateDelegate

public abstract void invalidateDelegate()
Perform actions to dispose "burned" session properly.


handleException

protected RuntimeException handleException(RuntimeException cause)
Invalidates the session calling invalidateDelegate() and just return the cause back.

Parameters:
cause -
Returns:

beginTransaction

public org.hibernate.Transaction beginTransaction()
*

Specified by:
beginTransaction in interface org.hibernate.Session

cancelQuery

public void cancelQuery()
*

Specified by:
cancelQuery in interface org.hibernate.Session

clear

public void clear()
*

Specified by:
clear in interface org.hibernate.Session

close

public Connection close()
*

Specified by:
close in interface org.hibernate.Session

connection

@Deprecated
public Connection connection()
Deprecated. 

*

Specified by:
connection in interface org.hibernate.Session

contains

public boolean contains(Object object)
*

Specified by:
contains in interface org.hibernate.Session

createCriteria

public org.hibernate.Criteria createCriteria(Class persistentClass)
*

Specified by:
createCriteria in interface org.hibernate.Session

createCriteria

public org.hibernate.Criteria createCriteria(Class persistentClass,
                                             String alias)
*

Specified by:
createCriteria in interface org.hibernate.Session

createCriteria

public org.hibernate.Criteria createCriteria(String entityName)
*

Specified by:
createCriteria in interface org.hibernate.Session

createCriteria

public org.hibernate.Criteria createCriteria(String entityName,
                                             String alias)
*

Specified by:
createCriteria in interface org.hibernate.Session

createFilter

public org.hibernate.Query createFilter(Object collection,
                                        String queryString)
*

Specified by:
createFilter in interface org.hibernate.Session

createQuery

public org.hibernate.Query createQuery(String queryString)
*

Specified by:
createQuery in interface org.hibernate.Session

createSQLQuery

public org.hibernate.SQLQuery createSQLQuery(String queryString)
*

Specified by:
createSQLQuery in interface org.hibernate.Session

delete

public void delete(Object object)
*

Specified by:
delete in interface org.hibernate.Session

delete

public void delete(String entityName,
                   Object object)
*

Specified by:
delete in interface org.hibernate.Session

disableFilter

public void disableFilter(String filterName)
*

Specified by:
disableFilter in interface org.hibernate.Session

disconnect

public Connection disconnect()
*

Specified by:
disconnect in interface org.hibernate.Session

enableFilter

public org.hibernate.Filter enableFilter(String filterName)
*

Specified by:
enableFilter in interface org.hibernate.Session

evict

public void evict(Object object)
*

Specified by:
evict in interface org.hibernate.Session

flush

public void flush()
*

Specified by:
flush in interface org.hibernate.Session

get

public Object get(Class clazz,
                  Serializable id)
*

Specified by:
get in interface org.hibernate.Session

get

public Object get(Class clazz,
                  Serializable id,
                  org.hibernate.LockMode lockMode)
*

Specified by:
get in interface org.hibernate.Session

get

public Object get(String entityName,
                  Serializable id)
*

Specified by:
get in interface org.hibernate.Session

get

public Object get(String entityName,
                  Serializable id,
                  org.hibernate.LockMode lockMode)
*

Specified by:
get in interface org.hibernate.Session

getCacheMode

public org.hibernate.CacheMode getCacheMode()
*

Specified by:
getCacheMode in interface org.hibernate.Session

getCurrentLockMode

public org.hibernate.LockMode getCurrentLockMode(Object object)
*

Specified by:
getCurrentLockMode in interface org.hibernate.Session

getEnabledFilter

public org.hibernate.Filter getEnabledFilter(String filterName)
*

Specified by:
getEnabledFilter in interface org.hibernate.Session

getEntityMode

public org.hibernate.EntityMode getEntityMode()
*

Specified by:
getEntityMode in interface org.hibernate.Session

getEntityName

public String getEntityName(Object object)
*

Specified by:
getEntityName in interface org.hibernate.Session

getFlushMode

public org.hibernate.FlushMode getFlushMode()
*

Specified by:
getFlushMode in interface org.hibernate.Session

getIdentifier

public Serializable getIdentifier(Object object)
*

Specified by:
getIdentifier in interface org.hibernate.Session

getNamedQuery

public org.hibernate.Query getNamedQuery(String queryName)
*

Specified by:
getNamedQuery in interface org.hibernate.Session

getSession

public org.hibernate.Session getSession(org.hibernate.EntityMode entityMode)
*

Specified by:
getSession in interface org.hibernate.Session

getSessionFactory

public org.hibernate.SessionFactory getSessionFactory()
*

Specified by:
getSessionFactory in interface org.hibernate.Session

getStatistics

public org.hibernate.stat.SessionStatistics getStatistics()
*

Specified by:
getStatistics in interface org.hibernate.Session

getTransaction

public org.hibernate.Transaction getTransaction()
*

Specified by:
getTransaction in interface org.hibernate.Session

isConnected

public boolean isConnected()
*

Specified by:
isConnected in interface org.hibernate.Session

isDirty

public boolean isDirty()
*

Specified by:
isDirty in interface org.hibernate.Session

isOpen

public boolean isOpen()
*

Specified by:
isOpen in interface org.hibernate.Session

load

public Object load(Class theClass,
                   Serializable id)
*

Specified by:
load in interface org.hibernate.Session

load

public Object load(Class theClass,
                   Serializable id,
                   org.hibernate.LockMode lockMode)
*

Specified by:
load in interface org.hibernate.Session

load

public void load(Object object,
                 Serializable id)
*

Specified by:
load in interface org.hibernate.Session

load

public Object load(String entityName,
                   Serializable id)
*

Specified by:
load in interface org.hibernate.Session

load

public Object load(String entityName,
                   Serializable id,
                   org.hibernate.LockMode lockMode)
*

Specified by:
load in interface org.hibernate.Session

lock

public void lock(Object object,
                 org.hibernate.LockMode lockMode)
*

Specified by:
lock in interface org.hibernate.Session

lock

public void lock(String entityEntity,
                 Object object,
                 org.hibernate.LockMode lockMode)
*

Specified by:
lock in interface org.hibernate.Session

merge

public Object merge(Object object)
*

Specified by:
merge in interface org.hibernate.Session

merge

public Object merge(String entityName,
                    Object object)
*

Specified by:
merge in interface org.hibernate.Session

persist

public void persist(Object object)
*

Specified by:
persist in interface org.hibernate.Session

persist

public void persist(String entityName,
                    Object object)
*

Specified by:
persist in interface org.hibernate.Session

reconnect

@Deprecated
public void reconnect()
Deprecated. 

*

Specified by:
reconnect in interface org.hibernate.Session

reconnect

public void reconnect(Connection conn)
*

Specified by:
reconnect in interface org.hibernate.Session

refresh

public void refresh(Object object)
*

Specified by:
refresh in interface org.hibernate.Session

refresh

public void refresh(Object object,
                    org.hibernate.LockMode lockMode)
*

Specified by:
refresh in interface org.hibernate.Session

replicate

public void replicate(Object object,
                      org.hibernate.ReplicationMode replicationMode)
*

Specified by:
replicate in interface org.hibernate.Session

replicate

public void replicate(String entityName,
                      Object object,
                      org.hibernate.ReplicationMode replicationMode)
*

Specified by:
replicate in interface org.hibernate.Session

save

public Serializable save(Object object)
*

Specified by:
save in interface org.hibernate.Session

save

public Serializable save(String entityName,
                         Object object)
*

Specified by:
save in interface org.hibernate.Session

saveOrUpdate

public void saveOrUpdate(Object object)
*

Specified by:
saveOrUpdate in interface org.hibernate.Session

saveOrUpdate

public void saveOrUpdate(String entityName,
                         Object object)
*

Specified by:
saveOrUpdate in interface org.hibernate.Session

setCacheMode

public void setCacheMode(org.hibernate.CacheMode cacheMode)
*

Specified by:
setCacheMode in interface org.hibernate.Session

setReadOnly

public void setReadOnly(Object entity,
                        boolean readOnly)
*

Specified by:
setReadOnly in interface org.hibernate.Session

setFlushMode

public void setFlushMode(org.hibernate.FlushMode value)
*

Specified by:
setFlushMode in interface org.hibernate.Session

update

public void update(Object object)
*

Specified by:
update in interface org.hibernate.Session

update

public void update(String entityName,
                   Object object)
*

Specified by:
update in interface org.hibernate.Session


Copyright © 2008. All Rights Reserved.