org.springframework.datastore.mock
Class SimpleMapSession
java.lang.Object
org.springframework.datastore.core.AbstractSession<Map>
org.springframework.datastore.mock.SimpleMapSession
- All Implemented Interfaces:
- Session, SessionImplementor, EntityInterceptorAware
public class SimpleMapSession
- extends AbstractSession<Map>
A simple implementation of the Session
interface that backs onto an in-memory map.
Mainly used for mocking and testing scenarios
- Since:
- 1.0
Methods inherited from class org.springframework.datastore.core.AbstractSession |
addEntityInterceptor, attach, beginTransaction, cacheObject, clear, clear, contains, createQuery, delete, delete, flush, getAttribute, getDatastore, getFlushMode, getMappingContext, getPendingDeletes, getPendingInserts, getPendingUpdates, getPersister, getTransaction, lock, lock, persist, persist, postFlush, proxy, refresh, retrieve, retrieveAll, retrieveAll, setAttribute, setEntityInterceptors, setFlushMode, unlock |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleMapSession
public SimpleMapSession(SimpleMapDatastore datastore,
MappingContext mappingContext)
createPersister
protected Persister createPersister(Class cls,
MappingContext mappingContext)
- Specified by:
createPersister
in class AbstractSession<Map>
getBackingMap
public Map<String,Map> getBackingMap()
beginTransactionInternal
protected Transaction beginTransactionInternal()
- Specified by:
beginTransactionInternal
in class AbstractSession<Map>
isConnected
public boolean isConnected()
- Returns:
- true if connected to the datastore
disconnect
public void disconnect()
- Description copied from class:
AbstractSession
- Performs clear up. Subclasses should always call into this super
implementation.
- Specified by:
disconnect
in interface Session
- Overrides:
disconnect
in class AbstractSession<Map>
getNativeInterface
public Map getNativeInterface()
- Returns:
- The native interface to the datastore