Class PersistenceSessionImpl
java.lang.Object
ch.tocco.nice2.persist.core.impl.hibernate.PersistenceSessionImpl
- All Implemented Interfaces:
PersistenceSession
,PersistenceSessionImplementor
-
Constructor Summary
ConstructorDescriptionPersistenceSessionImpl
(org.hibernate.Session session, CacheControl cacheControl) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCleanupAction
(Runnable runnable) Register a runnable that will be executed after this session was closed.void
addCommitListener
(CommitListener listener) Register aCommitListener
for this session.void
void
void
addTransactionListener
(TransactionListener listener) Add aTransactionListener
that will be added to all transactions that will be started in this session.void
clear()
Clear the underlying hibernate session.void
void
fireOnAfterFlush
(TransactionControl transaction) void
fireOnBeforeCommit
(TransactionControl transaction) <T> T
getAttribute
(String key) org.hibernate.Session
boolean
isOpen()
void
removeCommitListener
(CommitListener listener) Remove aCommitListener
.void
void
void
removeTransactionListener
(TransactionListener listener) Remove aTransactionListener
for the session.void
setAttribute
(String key, Object value) void
setQueryTimeout
(int queryTimeout)
-
Constructor Details
-
PersistenceSessionImpl
-
-
Method Details
-
isOpen
public boolean isOpen()- Specified by:
isOpen
in interfacePersistenceSession
- Returns:
- true is the ssesion is open and usable
-
addCleanupAction
Description copied from interface:PersistenceSession
Register a runnable that will be executed after this session was closed.- Specified by:
addCleanupAction
in interfacePersistenceSession
-
clear
public void clear()Description copied from interface:PersistenceSession
Clear the underlying hibernate session.- Specified by:
clear
in interfacePersistenceSession
-
getCacheControl
- Specified by:
getCacheControl
in interfacePersistenceSession
-
setQueryTimeout
public void setQueryTimeout(int queryTimeout) - Specified by:
setQueryTimeout
in interfacePersistenceSession
-
getQueryTimeout
- Specified by:
getQueryTimeout
in interfacePersistenceSession
-
setAttribute
- Specified by:
setAttribute
in interfacePersistenceSession
-
getAttribute
- Specified by:
getAttribute
in interfacePersistenceSession
-
addEntityListener
- Specified by:
addEntityListener
in interfacePersistenceSession
-
removeEntityListener
- Specified by:
removeEntityListener
in interfacePersistenceSession
-
addEntityFacadeListener
- Specified by:
addEntityFacadeListener
in interfacePersistenceSession
-
removeEntityFacadeListener
- Specified by:
removeEntityFacadeListener
in interfacePersistenceSession
-
addTransactionListener
Description copied from interface:PersistenceSession
Add aTransactionListener
that will be added to all transactions that will be started in this session.- Specified by:
addTransactionListener
in interfacePersistenceSession
-
removeTransactionListener
Description copied from interface:PersistenceSession
Remove aTransactionListener
for the session.- Specified by:
removeTransactionListener
in interfacePersistenceSession
-
addCommitListener
Description copied from interface:PersistenceSession
Register aCommitListener
for this session.- Specified by:
addCommitListener
in interfacePersistenceSession
-
removeCommitListener
Description copied from interface:PersistenceSession
Remove aCommitListener
.- Specified by:
removeCommitListener
in interfacePersistenceSession
-
getHibernateSession
public org.hibernate.Session getHibernateSession()- Specified by:
getHibernateSession
in interfacePersistenceSessionImplementor
-
getTransactionListeners
- Specified by:
getTransactionListeners
in interfacePersistenceSessionImplementor
-
getTemporaryEntityListeners
- Specified by:
getTemporaryEntityListeners
in interfacePersistenceSessionImplementor
-
fireOnBeforeCommit
- Specified by:
fireOnBeforeCommit
in interfacePersistenceSessionImplementor
-
fireOnAfterFlush
- Specified by:
fireOnAfterFlush
in interfacePersistenceSessionImplementor
-
fireOnAfterCommit
public void fireOnAfterCommit()- Specified by:
fireOnAfterCommit
in interfacePersistenceSessionImplementor
-