public interface HibernateRepository
| Modifier and Type | Method and Description |
|---|---|
org.hibernate.Session |
currentSession()
Returns the currently open session for this thread.
|
<T> T |
executeUnitOfWork(UnitOfWork<T> work)
Executes the given
UnitOfWork within a single transaction. |
<T> T executeUnitOfWork(UnitOfWork<T> work)
UnitOfWork within a single transaction.
currentSession() accordingly.UnitOfWork while another UnitOfWork is already executing. However note that
when doing so the Session or the current Transaction is not modified.
work - a UnitOfWork that should be executed.UnitOfWork.ExecutionError - if UnitOfWork.execute() throws an exception.org.hibernate.Session currentSession()
IllegalStateException - if no UnitOfWork is currently executing in this thread.Copyright © 2012 IP SQUARE. All Rights Reserved.