org.qi4j.entitystore.mongodb
Class MongoMapEntityStoreMixin

java.lang.Object
  extended by org.qi4j.entitystore.mongodb.MongoMapEntityStoreMixin
All Implemented Interfaces:
ServiceActivation, MongoAccessors, MapEntityStore

public class MongoMapEntityStoreMixin
extends java.lang.Object
implements ServiceActivation, MapEntityStore, MongoAccessors

MongoDB implementation of MapEntityStore.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.qi4j.api.service.ServiceActivation
ServiceActivation.ServiceActivator
 
Nested classes/interfaces inherited from interface org.qi4j.spi.entitystore.helpers.MapEntityStore
MapEntityStore.JSONKeys, MapEntityStore.MapChanger, MapEntityStore.MapChanges
 
Field Summary
static java.lang.String IDENTITY_COLUMN
           
static java.lang.String STATE_COLUMN
           
 
Constructor Summary
MongoMapEntityStoreMixin()
           
 
Method Summary
 void activateService()
          Called after ServiceComposite Activation.
 void applyChanges(MapEntityStore.MapChanges changes)
           
 java.lang.String collectionUsed()
           
 com.mongodb.DB dbInstanceUsed()
           
 Input<java.io.Reader,java.io.IOException> entityStates()
           
 java.io.Reader get(EntityReference entityReference)
           
 com.mongodb.Mongo mongoInstanceUsed()
           
 void passivateService()
          Called before ServiceComposite Passivation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IDENTITY_COLUMN

public static final java.lang.String IDENTITY_COLUMN
See Also:
Constant Field Values

STATE_COLUMN

public static final java.lang.String STATE_COLUMN
See Also:
Constant Field Values
Constructor Detail

MongoMapEntityStoreMixin

public MongoMapEntityStoreMixin()
Method Detail

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

mongoInstanceUsed

public com.mongodb.Mongo mongoInstanceUsed()
Specified by:
mongoInstanceUsed in interface MongoAccessors

dbInstanceUsed

public com.mongodb.DB dbInstanceUsed()
Specified by:
dbInstanceUsed in interface MongoAccessors

collectionUsed

public java.lang.String collectionUsed()
Specified by:
collectionUsed in interface MongoAccessors

get

public java.io.Reader get(EntityReference entityReference)
                   throws EntityStoreException
Specified by:
get in interface MapEntityStore
Returns:
Entity state Reader
Throws:
EntityStoreException

applyChanges

public void applyChanges(MapEntityStore.MapChanges changes)
                  throws java.io.IOException
Specified by:
applyChanges in interface MapEntityStore
Throws:
java.io.IOException

entityStates

public Input<java.io.Reader,java.io.IOException> entityStates()
Specified by:
entityStates in interface MapEntityStore
Returns:
All entities state Readers