Modifier and Type | Method and Description |
---|---|
UnitOfWork |
currentUnitOfWork()
Returns the UnitOfWork that is currently associated with the executing thread.
|
UnitOfWork |
getUnitOfWork(EntityComposite entity)
Returns the UnitOfWork that the EntityComposite is bound to.
|
boolean |
isUnitOfWorkActive() |
UnitOfWork |
newUnitOfWork()
Create a new UnitOfWork and associate it with the current thread.
|
UnitOfWork |
newUnitOfWork(long currentTime)
Create a new UnitOfWork and associate it with the current thread.
|
UnitOfWork |
newUnitOfWork(Usecase usecase)
Create a new UnitOfWork for the given Usecase and associate it with the current thread.
|
UnitOfWork |
newUnitOfWork(Usecase usecase,
long currentTime)
Create a new UnitOfWork for the given Usecase and associate it with the current thread.
|
UnitOfWork newUnitOfWork()
The UnitOfWork will use the default Usecase settings.
Current time will be set to System.currentTimeMillis();
UnitOfWork newUnitOfWork(long currentTime)
The UnitOfWork will use the default Usecase settings.
UnitOfWork newUnitOfWork(Usecase usecase)
Current time will be set to System.currentTimeMillis();
usecase
- the Usecase for this UnitOfWorkUnitOfWork newUnitOfWork(Usecase usecase, long currentTime)
usecase
- the Usecase for this UnitOfWorkboolean isUnitOfWorkActive()
UnitOfWork currentUnitOfWork() throws IllegalStateException
IllegalStateException
- if no current UnitOfWork is activeUnitOfWork getUnitOfWork(EntityComposite entity)
entity
- the entity to be checked.