to.etc.domui.hibernate.generic
Class HibernateReattachingDataContext

java.lang.Object
  extended by to.etc.webapp.query.QAbstractDataContext
      extended by to.etc.domui.hibernate.generic.BuggyHibernateBaseContext
          extended by to.etc.domui.hibernate.generic.HibernateReattachingDataContext
All Implemented Interfaces:
IConversationStateListener, QDataContext

public class HibernateReattachingDataContext
extends BuggyHibernateBaseContext

This is an HibernateContext which uses automatic reattachment of all nodes to prevent all kinds of crappy Hibernate-related shit.

Author:
Frits Jalvingh Created on Oct 22, 2008

Field Summary
 
Fields inherited from class to.etc.domui.hibernate.generic.BuggyHibernateBaseContext
LOG, m_session, m_sessionMaker
 
Constructor Summary
HibernateReattachingDataContext(QDataContextFactory src, HibernateSessionMaker sessionMaker)
           
 
Method Summary
 void conversationDestroyed(ConversationContext cc)
          
 void conversationDetached(ConversationContext cc)
          
 Session getSession()
          Overridden to allow for automagic re-attachment of crap.
 
Methods inherited from class to.etc.domui.hibernate.generic.BuggyHibernateBaseContext
addCommitAction, checkValid, close, commit, conversationAttached, conversationNew, getConnection, inTransaction, isIgnoreClose, rollback, runCommitHandlers, setConversationInvalid, setIgnoreClose, setSessionMaker, startTransaction
 
Methods inherited from class to.etc.webapp.query.QAbstractDataContext
attach, delete, find, find, getFactory, getHandlerFactory, getInstance, getInstance, query, query, queryOne, queryOne, refresh, save
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface to.etc.webapp.query.QDataContext
attach, delete, find, find, getFactory, getInstance, getInstance, query, query, queryOne, queryOne, refresh, save
 

Constructor Detail

HibernateReattachingDataContext

public HibernateReattachingDataContext(QDataContextFactory src,
                                       HibernateSessionMaker sessionMaker)
Method Detail

getSession

public Session getSession()
                   throws java.lang.Exception
Overridden to allow for automagic re-attachment of crap.

Overrides:
getSession in class BuggyHibernateBaseContext
Returns:
Throws:
java.lang.Exception
See Also:
BuggyHibernateBaseContext.getSession()

conversationDestroyed

public void conversationDestroyed(ConversationContext cc)
                           throws java.lang.Exception
Description copied from class: BuggyHibernateBaseContext

Specified by:
conversationDestroyed in interface IConversationStateListener
Overrides:
conversationDestroyed in class BuggyHibernateBaseContext
Throws:
java.lang.Exception
See Also:
IConversationStateListener.conversationDestroyed(to.etc.domui.state.ConversationContext)

conversationDetached

public void conversationDetached(ConversationContext cc)
                          throws java.lang.Exception
Description copied from class: BuggyHibernateBaseContext

Specified by:
conversationDetached in interface IConversationStateListener
Overrides:
conversationDetached in class BuggyHibernateBaseContext
Throws:
java.lang.Exception
See Also:
IConversationStateListener.conversationDetached(to.etc.domui.state.ConversationContext)