er.memoryadaptor
Class ERMemoryAdaptorContext
java.lang.Object
com.webobjects.eoaccess.EOAdaptorContext
er.memoryadaptor.ERMemoryAdaptorContext
public class ERMemoryAdaptorContext
- extends com.webobjects.eoaccess.EOAdaptorContext
ERMemoryAdaptorContext provides the adaptor context implementation for ERMemoryAdaptor.
For the most part, you don't need to interact with ERMemoryAdaptor at this level. However,
the context does expose resetEntity(EOEntity) and resetAllEntities() methods which allow
control over resetting the memory datastore. This can be helpful when you need to reset
the "database" between test cases.
- Author:
- mschrag
Nested classes/interfaces inherited from class com.webobjects.eoaccess.EOAdaptorContext |
com.webobjects.eoaccess.EOAdaptorContext.Delegate |
Fields inherited from class com.webobjects.eoaccess.EOAdaptorContext |
_adaptor, _channels, _delegate, _delegateRespondsTo_didBegin, _delegateRespondsTo_didCommit, _delegateRespondsTo_didRollback, _delegateRespondsTo_shouldBegin, _delegateRespondsTo_shouldCommit, _delegateRespondsTo_shouldConnect, _delegateRespondsTo_shouldRollback, _hasOpenTransaction, AdaptorContextBeginTransactionNotification, AdaptorContextCommitTransactionNotification, AdaptorContextRollbackTransactionNotification |
Methods inherited from class com.webobjects.eoaccess.EOAdaptorContext |
_registerAdaptorChannel, _unregisterAdaptorChannel, adaptor, canNestTransactions, channels, defaultDelegate, delegate, hasBusyChannels, hasOpenChannels, hasOpenTransaction, setDefaultDelegate, setDelegate, transactionDidBegin, transactionDidCommit, transactionDidRollback, transactionNestingLevel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ERMemoryAdaptorContext
public ERMemoryAdaptorContext(com.webobjects.eoaccess.EOAdaptor adaptor)
resetAllEntities
public void resetAllEntities()
- Resets all the entities in this context, removing any known rows and
clearing out any transactions.
resetEntity
public void resetEntity(com.webobjects.eoaccess.EOEntity entity)
- Resets the given entity, removing any known rows and
clearing out any transactions.
- Parameters:
entity
- the entity to reset
_entityStoreForEntity
public EREntityStore _entityStoreForEntity(com.webobjects.eoaccess.EOEntity entity)
- Returns an EREntityStore for the given entity.
- Parameters:
entity
- the entity to lookup
- Returns:
- the datastore for the entity
_entityStoreForEntity
public EREntityStore _entityStoreForEntity(com.webobjects.eoaccess.EOEntity entity,
boolean transactional)
- Returns an EREntityStore for the given entity.
- Parameters:
entity
- the entity to lookuptransactional
- if true, this will return a transactional view of the store
- Returns:
- the datastore for the entity
_newPrimaryKey
public com.webobjects.foundation.NSDictionary _newPrimaryKey(com.webobjects.eocontrol.EOEnterpriseObject object,
com.webobjects.eoaccess.EOEntity entity)
- Overrides:
_newPrimaryKey
in class com.webobjects.eoaccess.EOAdaptorContext
beginTransaction
public void beginTransaction()
- Specified by:
beginTransaction
in class com.webobjects.eoaccess.EOAdaptorContext
commitTransaction
public void commitTransaction()
- Specified by:
commitTransaction
in class com.webobjects.eoaccess.EOAdaptorContext
createAdaptorChannel
public com.webobjects.eoaccess.EOAdaptorChannel createAdaptorChannel()
- Specified by:
createAdaptorChannel
in class com.webobjects.eoaccess.EOAdaptorContext
handleDroppedConnection
public void handleDroppedConnection()
- Specified by:
handleDroppedConnection
in class com.webobjects.eoaccess.EOAdaptorContext
rollbackTransaction
public void rollbackTransaction()
- Specified by:
rollbackTransaction
in class com.webobjects.eoaccess.EOAdaptorContext
Copyright © 2002 – 2007 Project Wonder.