public class SQLEntityStoreMixin extends Object implements EntityStore, EntityStoreSPI, StateStore, ServiceActivation
ServiceActivation.ServiceActivator
Constructor and Description |
---|
SQLEntityStoreMixin() |
Modifier and Type | Method and Description |
---|---|
void |
activateService()
Called after ServiceComposite Activation.
|
StateCommitter |
applyChanges(EntityStoreUnitOfWork unitofwork,
Iterable<EntityState> states) |
EntityState |
entityStateOf(EntityStoreUnitOfWork unitOfWork,
ModuleSpi module,
EntityReference entityRef) |
Input<EntityState,EntityStoreException> |
entityStates(ModuleSpi module) |
protected DatabaseSQLService.EntityValueResult |
getValue(EntityReference ref) |
JSONObject |
jsonStateOf(String id) |
EntityState |
newEntityState(EntityStoreUnitOfWork unitOfWork,
ModuleSpi module,
EntityReference entityRef,
EntityDescriptor entityDescriptor) |
EntityStoreUnitOfWork |
newUnitOfWork(Usecase usecase,
ModuleSpi module,
long currentTime) |
protected String |
newUnitOfWorkId() |
void |
passivateService()
Called before ServiceComposite Passivation.
|
protected DefaultEntityState |
readEntityState(ModuleSpi module,
Reader entityState) |
protected void |
writeEntityState(DefaultEntityState state,
Writer writer,
String version) |
public void activateService() throws Exception
ServiceActivation
activateService
in interface ServiceActivation
Exception
public void passivateService() throws Exception
ServiceActivation
passivateService
in interface ServiceActivation
Exception
public StateCommitter applyChanges(EntityStoreUnitOfWork unitofwork, Iterable<EntityState> states)
applyChanges
in interface EntityStoreSPI
public EntityState entityStateOf(EntityStoreUnitOfWork unitOfWork, ModuleSpi module, EntityReference entityRef)
entityStateOf
in interface EntityStoreSPI
public EntityState newEntityState(EntityStoreUnitOfWork unitOfWork, ModuleSpi module, EntityReference entityRef, EntityDescriptor entityDescriptor)
newEntityState
in interface EntityStoreSPI
public EntityStoreUnitOfWork newUnitOfWork(Usecase usecase, ModuleSpi module, long currentTime)
newUnitOfWork
in interface EntityStore
public Input<EntityState,EntityStoreException> entityStates(ModuleSpi module)
entityStates
in interface EntityStore
protected String newUnitOfWorkId()
protected DefaultEntityState readEntityState(ModuleSpi module, Reader entityState) throws EntityStoreException
EntityStoreException
public JSONObject jsonStateOf(String id) throws IOException
jsonStateOf
in interface StateStore
IOException
protected DatabaseSQLService.EntityValueResult getValue(EntityReference ref)
protected void writeEntityState(DefaultEntityState state, Writer writer, String version) throws EntityStoreException
EntityStoreException