org.qi4j.entitystore.sql
Class SQLEntityStoreMixin
java.lang.Object
org.qi4j.entitystore.sql.SQLEntityStoreMixin
- All Implemented Interfaces:
- ServiceActivation, EntityStore, EntityStoreSPI, StateStore
public class SQLEntityStoreMixin
- extends java.lang.Object
- implements EntityStore, EntityStoreSPI, StateStore, ServiceActivation
SQL EntityStore core Mixin.
Method Summary |
void |
activateService()
Called after ServiceComposite Activation. |
StateCommitter |
applyChanges(EntityStoreUnitOfWork unitofwork,
java.lang.Iterable<EntityState> states)
|
EntityState |
entityStateOf(EntityStoreUnitOfWork unitOfWork,
EntityReference entityRef)
|
Input<EntityState,EntityStoreException> |
entityStates(Module module)
|
protected DatabaseSQLService.EntityValueResult |
getValue(EntityReference ref)
|
org.json.JSONObject |
jsonStateOf(java.lang.String id)
|
EntityState |
newEntityState(EntityStoreUnitOfWork unitOfWork,
EntityReference entityRef,
EntityDescriptor entityDescriptor)
|
EntityStoreUnitOfWork |
newUnitOfWork(Usecase usecase,
Module module,
long currentTime)
|
protected java.lang.String |
newUnitOfWorkId()
|
void |
passivateService()
Called before ServiceComposite Passivation. |
protected DefaultEntityState |
readEntityState(DefaultEntityStoreUnitOfWork unitOfWork,
java.io.Reader entityState)
|
protected void |
writeEntityState(DefaultEntityState state,
java.io.Writer writer,
java.lang.String version)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SQLEntityStoreMixin
public SQLEntityStoreMixin()
activateService
public void activateService()
throws java.lang.Exception
- Description copied from interface:
ServiceActivation
- Called after ServiceComposite Activation.
- Specified by:
activateService
in interface ServiceActivation
- Throws:
java.lang.Exception
passivateService
public void passivateService()
throws java.lang.Exception
- Description copied from interface:
ServiceActivation
- Called before ServiceComposite Passivation.
- Specified by:
passivateService
in interface ServiceActivation
- Throws:
java.lang.Exception
applyChanges
public StateCommitter applyChanges(EntityStoreUnitOfWork unitofwork,
java.lang.Iterable<EntityState> states)
- Specified by:
applyChanges
in interface EntityStoreSPI
entityStateOf
public EntityState entityStateOf(EntityStoreUnitOfWork unitOfWork,
EntityReference entityRef)
- Specified by:
entityStateOf
in interface EntityStoreSPI
newEntityState
public EntityState newEntityState(EntityStoreUnitOfWork unitOfWork,
EntityReference entityRef,
EntityDescriptor entityDescriptor)
- Specified by:
newEntityState
in interface EntityStoreSPI
newUnitOfWork
public EntityStoreUnitOfWork newUnitOfWork(Usecase usecase,
Module module,
long currentTime)
- Specified by:
newUnitOfWork
in interface EntityStore
entityStates
public Input<EntityState,EntityStoreException> entityStates(Module module)
- Specified by:
entityStates
in interface EntityStore
newUnitOfWorkId
protected java.lang.String newUnitOfWorkId()
readEntityState
protected DefaultEntityState readEntityState(DefaultEntityStoreUnitOfWork unitOfWork,
java.io.Reader entityState)
throws EntityStoreException
- Throws:
EntityStoreException
jsonStateOf
public org.json.JSONObject jsonStateOf(java.lang.String id)
throws java.io.IOException
- Specified by:
jsonStateOf
in interface StateStore
- Throws:
java.io.IOException
getValue
protected DatabaseSQLService.EntityValueResult getValue(EntityReference ref)
writeEntityState
protected void writeEntityState(DefaultEntityState state,
java.io.Writer writer,
java.lang.String version)
throws EntityStoreException
- Throws:
EntityStoreException