public class ModuleEntityStoreUnitOfWork extends Object implements EntityStoreUnitOfWork
| Constructor and Description |
|---|
ModuleEntityStoreUnitOfWork(ModuleSpi module,
EntityStoreUnitOfWork underlying) |
| Modifier and Type | Method and Description |
|---|---|
StateCommitter |
applyChanges() |
long |
currentTime() |
void |
discard() |
EntityState |
entityStateOf(ModuleSpi module,
EntityReference reference)
Get the EntityState for a given identity.
|
String |
identity() |
ModuleSpi |
module() |
EntityState |
newEntityState(ModuleSpi module,
EntityReference reference,
EntityDescriptor descriptor)
Create new EntityState for a given identity.
|
Usecase |
usecase() |
public ModuleEntityStoreUnitOfWork(ModuleSpi module, EntityStoreUnitOfWork underlying)
public ModuleSpi module()
public String identity()
identity in interface EntityStoreUnitOfWorkpublic long currentTime()
currentTime in interface EntityStoreUnitOfWorkpublic EntityState newEntityState(ModuleSpi module, EntityReference reference, EntityDescriptor descriptor) throws EntityStoreException
EntityStoreUnitOfWork
This should only create the EntityState and not insert it into any database, since that should occur during
the EntityStoreUnitOfWork.applyChanges() call.
newEntityState in interface EntityStoreUnitOfWorkreference - the identity of the entitydescriptor - entity descriptorEntityStoreException - Thrown if creational fails.public EntityState entityStateOf(ModuleSpi module, EntityReference reference) throws EntityStoreException, EntityNotFoundException
EntityStoreUnitOfWorkEntityNotFoundException
if the entity with given anIdentity is not found.entityStateOf in interface EntityStoreUnitOfWorkreference - The entity identity. This argument must not be null.EntityStoreException - thrown if retrieval failed.EntityNotFoundException - if requested entity does not existpublic StateCommitter applyChanges() throws EntityStoreException
applyChanges in interface EntityStoreUnitOfWorkEntityStoreExceptionpublic void discard()
discard in interface EntityStoreUnitOfWorkpublic Usecase usecase()
usecase in interface EntityStoreUnitOfWork