public interface EntityStoreUnitOfWork
Modifier and Type | Method and Description |
---|---|
StateCommitter |
applyChanges() |
Instant |
currentTime() |
void |
discard() |
EntityState |
entityStateOf(ModuleDescriptor module,
EntityReference anIdentity)
Get the EntityState for a given reference.
|
Identity |
identity() |
ModuleDescriptor |
module() |
EntityState |
newEntityState(EntityReference anIdentity,
EntityDescriptor entityDescriptor)
Create new EntityState for a given reference.
|
Usecase |
usecase() |
String |
versionOf(EntityReference anIdentity) |
Identity identity()
Instant currentTime()
EntityState newEntityState(EntityReference anIdentity, EntityDescriptor entityDescriptor) throws EntityStoreException
This should only create the EntityState and not insert it into any database, since that should occur during
the applyChanges()
call.
anIdentity
- the reference of the entityentityDescriptor
- entity descriptorEntityStoreException
- Thrown if creational fails.EntityState entityStateOf(ModuleDescriptor module, EntityReference anIdentity) throws EntityStoreException, EntityNotFoundException
EntityNotFoundException
if the entity with given anIdentity
is not found.module
- Module descriptoranIdentity
- The entity reference. This argument must not be null
.EntityStoreException
- thrown if retrieval failed.EntityNotFoundException
- if requested entity does not existString versionOf(EntityReference anIdentity) throws EntityStoreException
EntityStoreException
StateCommitter applyChanges() throws EntityStoreException
EntityStoreException
void discard()
Usecase usecase()
ModuleDescriptor module()