EOCooperatingObjectStore
- Inherits from:
- EOObjectStore : NSObject
- Conforms to:
- NSObject
- (NSObject)
Declared in:
- EOControl/EOObjectStoreCoordinator.h
Class Description
EOCooperatingObjectStore is a part of the control layer's object storage abstraction. It is an abstract class that defines the basic API for object stores that work together to manage data from several distinct data repositories.
For more general information on the object storage abstraction, see "Object Storage Abstraction" in the introduction to the EOControl Framework.
The interaction between EOCooperatingObjectStores is managed by another class, EOObjectStoreCoordinator. The EOObjectStoreCoordinator communicates changes to its EOCooperatingObjectStores by passing them an EOEditingContext. Each cooperating store examines the modified objects in the editing context and determines if it's responsible for handling the changes. When a cooperating store has changes that need to be handled by another store, it communicates the changes to the other store back through the coordinator.
For relational databases, Enterprise Objects Framework provides a concrete subclass of EOCooperatingObjectStore, EODatabaseContext (EOAccess). A database context represents a single connection to a database server, fetching and saving objects on behalf of one or more editing contexts. However, a database context and an editing context don't interact with each other directly-a coordinator acts as a mediator between them.
Method Types
- Committing or discarding changes
- - commitChanges
- - ownsGlobalID:
- - rollbackChanges
- - prepareForSaveWithCoordinator:editingContext:
- - recordChangesInEditingContext
- - recordUpdateForObject:changes:
- Returning information about objects
- - valuesForKeys:object:
- Determining if the EOCooperatingObjectStore is responsible for an operation
- - ownsObject:
- - ownsGlobalID:
- - handlesFetchSpecification:
Instance Methods
commitChanges
- (void)commitChanges
See Also: - ownsGlobalID:, - commitChanges, - saveChangesInEditingContext: ( EOObjectStoreCoordinator)
handlesFetchSpecification:
- (BOOL)handlesFetchSpecification:(EOFetchSpecification
*)fetchSpecification
See Also: - ownsGlobalID:, - ownsObject:
ownsGlobalID:
- (BOOL)ownsGlobalID:(EOGlobalID
*)globalID
See Also: - handlesFetchSpecification:, - ownsObject:
ownsObject:
- (BOOL)ownsObject:(id)object
See Also: - ownsGlobalID:, - handlesFetchSpecification:
performChanges
- (void)performChanges
See Also: - commitChanges, - rollbackChanges, - saveChangesInEditingContext: ( EOObjectStoreCoordinator)
prepareForSaveWithCoordinator:editingContext:
- (void)prepareForSaveWithCoordinator:(EOObjectStoreCoordinator
*)coordinator
editingContext:(EOEditingContext
*)anEditingContext
After performing these methods, the receiver should be prepared to receive the possible messages ownsGlobalID: and then commitChanges or rollbackChanges.
recordChangesInEditingContext
- (void)recordChangesInEditingContext
See Also: - prepareForSaveWithCoordinator:editingContext:, - recordUpdateForObject:changes:
recordUpdateForObject:changes:
- (void)recordUpdateForObject:(id)object
changes:(NSDictionary *)changes
See Also: - prepareForSaveWithCoordinator:editingContext:, - recordChangesInEditingContext
rollbackChanges
- (void)rollbackChanges
See Also: - commitChanges, - ownsGlobalID:, - saveChangesInEditingContext: (EOObjectStoreCoordinator)
valuesForKeys:object:
- (NSDictionary *)valuesForKeys:(NSArray
*)keys
object:(id)object