org.springframework.datastore.mock
Class SimpleMapDatastore
java.lang.Object
org.springframework.datastore.core.AbstractDatastore
org.springframework.datastore.mock.SimpleMapDatastore
- All Implemented Interfaces:
- Datastore, EntityInterceptorAware
public class SimpleMapDatastore
- extends AbstractDatastore
A simple implementation of the Datastore
interface that backs onto an in-memory map.
Mainly used for mocking and testing scenarios
- Since:
- 1.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleMapDatastore
public SimpleMapDatastore(Map<String,Map> datastore)
- Creates a map based datastore backing onto the specified map
- Parameters:
datastore
- The datastore to back on to
SimpleMapDatastore
public SimpleMapDatastore()
getIndices
public Map getIndices()
createSession
protected Session createSession(Map<String,String> connectionDetails)
- Description copied from class:
AbstractDatastore
- Creates the native session
- Specified by:
createSession
in class AbstractDatastore
- Parameters:
connectionDetails
- The session details
- Returns:
- The session object
getBackingMap
public Map<String,Map> getBackingMap()
clearData
public void clearData()