|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.webapp.query.QAbstractDataContext
to.etc.domui.hibernate.generic.BuggyHibernateBaseContext
public class BuggyHibernateBaseContext
This is a basic Hibernate QDataContext implementation, suitable for being used in DomUI code. This base class implements every QDataContext call but does not do any session lifecycle handling. FIXME 20100310 jal This now supports JDBC queries using the same JDBC context but with a butt-ugly mechanism; it needs to be replaced with some kind of switch proxy implementation later on.
Field Summary | |
---|---|
protected static org.slf4j.Logger |
LOG
|
protected Session |
m_session
|
protected HibernateSessionMaker |
m_sessionMaker
|
Method Summary | |
---|---|
void |
addCommitAction(IRunnable cx)
Add an action which should be executed after a succesful commit on this context. |
protected void |
checkValid()
|
void |
close()
This version just delegates to the Factory immediately. |
void |
commit()
|
void |
conversationAttached(ConversationContext cc)
|
void |
conversationDestroyed(ConversationContext cc)
|
void |
conversationDetached(ConversationContext cc)
|
void |
conversationNew(ConversationContext cc)
|
java.sql.Connection |
getConnection()
We explicitly undeprecate here. |
Session |
getSession()
INTERNAL USE ONLY Get the Hibernate session present in this QDataContext; allocate a new Session if no session is currently active. |
boolean |
inTransaction()
|
boolean |
isIgnoreClose()
|
void |
rollback()
|
protected void |
runCommitHandlers()
|
protected void |
setConversationInvalid(java.lang.String conversationInvalid)
|
void |
setIgnoreClose(boolean on)
When ignoreClose is set to T the close call must be silently ignored. |
protected void |
setSessionMaker(HibernateSessionMaker sm)
Set the Hibernate session maker factory. |
void |
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 |
Field Detail |
---|
protected static final org.slf4j.Logger LOG
protected HibernateSessionMaker m_sessionMaker
protected Session m_session
Method Detail |
---|
protected void setSessionMaker(HibernateSessionMaker sm)
sm
- public Session getSession() throws java.lang.Exception
java.lang.Exception
protected void checkValid()
protected void setConversationInvalid(java.lang.String conversationInvalid)
public void setIgnoreClose(boolean on)
setIgnoreClose
in interface QDataContext
QDataContext.setIgnoreClose(boolean)
public boolean isIgnoreClose()
public void close()
close
in interface QDataContext
QDataContext.close()
public void startTransaction() throws java.lang.Exception
startTransaction
in interface QDataContext
java.lang.Exception
QDataContext.startTransaction()
public void commit() throws java.lang.Exception
commit
in interface QDataContext
java.lang.Exception
QDataContext.commit()
protected void runCommitHandlers() throws java.lang.Exception
java.lang.Exception
public boolean inTransaction() throws java.lang.Exception
inTransaction
in interface QDataContext
java.lang.Exception
QDataContext.inTransaction()
public void rollback() throws java.lang.Exception
rollback
in interface QDataContext
java.lang.Exception
QDataContext.rollback()
public java.sql.Connection getConnection() throws java.lang.Exception
getConnection
in interface QDataContext
java.lang.Exception
QDataContext.getConnection()
public void addCommitAction(IRunnable cx)
QDataContext
addCommitAction
in interface QDataContext
public void conversationAttached(ConversationContext cc) throws java.lang.Exception
conversationAttached
in interface IConversationStateListener
java.lang.Exception
public void conversationDestroyed(ConversationContext cc) throws java.lang.Exception
conversationDestroyed
in interface IConversationStateListener
java.lang.Exception
IConversationStateListener.conversationDestroyed(to.etc.domui.state.ConversationContext)
public void conversationDetached(ConversationContext cc) throws java.lang.Exception
conversationDetached
in interface IConversationStateListener
java.lang.Exception
IConversationStateListener.conversationDetached(to.etc.domui.state.ConversationContext)
public void conversationNew(ConversationContext cc) throws java.lang.Exception
conversationNew
in interface IConversationStateListener
java.lang.Exception
IConversationStateListener.conversationNew(to.etc.domui.state.ConversationContext)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |