public class DefaultHibernateRepository extends Object implements HibernateRepository
HibernateRepository implementation.| Constructor and Description |
|---|
DefaultHibernateRepository(HibernateConfiguration hibernateCfg) |
| 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. |
@Inject public DefaultHibernateRepository(HibernateConfiguration hibernateCfg)
public <T> T executeUnitOfWork(UnitOfWork<T> work)
HibernateRepositoryUnitOfWork within a single transaction.
HibernateRepository.currentSession() accordingly.UnitOfWork while another UnitOfWork is already executing. However note that
when doing so the Session or the current Transaction is not modified.
executeUnitOfWork in interface HibernateRepositorywork - a UnitOfWork that should be executed.UnitOfWork.public org.hibernate.Session currentSession()
HibernateRepositorycurrentSession in interface HibernateRepositoryCopyright © 2012 IP SQUARE. All Rights Reserved.