Class PersistenceSessionImpl
java.lang.Object
ch.tocco.nice2.persist.core.impl.hibernate.PersistenceSessionImpl
- All Implemented Interfaces:
PersistenceSession, PersistenceSessionImplementor
-
Constructor Summary
ConstructorsConstructorDescriptionPersistenceSessionImpl(org.hibernate.Session session, CacheControl cacheControl) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCleanupAction(Runnable runnable) Register a runnable that will be executed after this session was closed.voidaddCommitListener(CommitListener listener) Register aCommitListenerfor this session.voidvoidvoidaddTransactionListener(TransactionListener listener) Add aTransactionListenerthat will be added to all transactions that will be started in this session.voidclear()Clear the underlying hibernate session.voidvoidfireOnAfterFlush(TransactionControl transaction) voidfireOnBeforeCommit(TransactionControl transaction) <T> TgetAttribute(String key) org.hibernate.SessionbooleanisOpen()voidremoveCommitListener(CommitListener listener) Remove aCommitListener.voidvoidvoidremoveTransactionListener(TransactionListener listener) Remove aTransactionListenerfor the session.voidsetAttribute(String key, Object value) voidsetQueryTimeout(int queryTimeout)
-
Constructor Details
-
PersistenceSessionImpl
-
-
Method Details
-
isOpen
public boolean isOpen()- Specified by:
isOpenin interfacePersistenceSession- Returns:
- true is the ssesion is open and usable
-
addCleanupAction
Description copied from interface:PersistenceSessionRegister a runnable that will be executed after this session was closed.- Specified by:
addCleanupActionin interfacePersistenceSession
-
clear
public void clear()Description copied from interface:PersistenceSessionClear the underlying hibernate session.- Specified by:
clearin interfacePersistenceSession
-
getCacheControl
- Specified by:
getCacheControlin interfacePersistenceSession
-
setQueryTimeout
public void setQueryTimeout(int queryTimeout) - Specified by:
setQueryTimeoutin interfacePersistenceSession
-
getQueryTimeout
- Specified by:
getQueryTimeoutin interfacePersistenceSession
-
setAttribute
- Specified by:
setAttributein interfacePersistenceSession
-
getAttribute
- Specified by:
getAttributein interfacePersistenceSession
-
addEntityListener
- Specified by:
addEntityListenerin interfacePersistenceSession
-
removeEntityListener
- Specified by:
removeEntityListenerin interfacePersistenceSession
-
addEntityFacadeListener
- Specified by:
addEntityFacadeListenerin interfacePersistenceSession
-
removeEntityFacadeListener
- Specified by:
removeEntityFacadeListenerin interfacePersistenceSession
-
addTransactionListener
Description copied from interface:PersistenceSessionAdd aTransactionListenerthat will be added to all transactions that will be started in this session.- Specified by:
addTransactionListenerin interfacePersistenceSession
-
removeTransactionListener
Description copied from interface:PersistenceSessionRemove aTransactionListenerfor the session.- Specified by:
removeTransactionListenerin interfacePersistenceSession
-
addCommitListener
Description copied from interface:PersistenceSessionRegister aCommitListenerfor this session.- Specified by:
addCommitListenerin interfacePersistenceSession
-
removeCommitListener
Description copied from interface:PersistenceSessionRemove aCommitListener.- Specified by:
removeCommitListenerin interfacePersistenceSession
-
getHibernateSession
public org.hibernate.Session getHibernateSession()- Specified by:
getHibernateSessionin interfacePersistenceSessionImplementor
-
getTransactionListeners
- Specified by:
getTransactionListenersin interfacePersistenceSessionImplementor
-
getTemporaryEntityListeners
- Specified by:
getTemporaryEntityListenersin interfacePersistenceSessionImplementor
-
fireOnBeforeCommit
- Specified by:
fireOnBeforeCommitin interfacePersistenceSessionImplementor
-
fireOnAfterFlush
- Specified by:
fireOnAfterFlushin interfacePersistenceSessionImplementor
-
fireOnAfterCommit
public void fireOnAfterCommit()- Specified by:
fireOnAfterCommitin interfacePersistenceSessionImplementor
-