2004-04-17 11:30:47 +00:00
|
|
|
/* -*-objc-*-
|
2002-11-15 22:57:05 +00:00
|
|
|
EOObjectStoreCoordinator.h
|
|
|
|
|
2005-08-17 08:07:57 +00:00
|
|
|
Copyright (C) 2000,2002,2003,2004,2005 Free Software Foundation, Inc.
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
Date: June 2000
|
|
|
|
|
|
|
|
This file is part of the GNUstep Database Library.
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Library General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
2007-07-12 06:39:22 +00:00
|
|
|
version 3 of the License, or (at your option) any later version.
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Library General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
|
|
License along with this library; see the file COPYING.LIB.
|
|
|
|
If not, write to the Free Software Foundation,
|
2005-08-17 08:07:57 +00:00
|
|
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2002-11-15 22:57:05 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __EOObjectStoreCoordinator_h__
|
|
|
|
#define __EOObjectStoreCoordinator_h__
|
|
|
|
|
2002-12-30 22:10:43 +00:00
|
|
|
|
2003-03-31 00:24:15 +00:00
|
|
|
#include <EOControl/EOObjectStore.h>
|
2002-11-15 22:57:05 +00:00
|
|
|
|
2004-04-17 11:30:47 +00:00
|
|
|
#include <EOControl/EODefines.h>
|
|
|
|
|
2002-12-30 22:10:43 +00:00
|
|
|
|
|
|
|
@class NSArray;
|
|
|
|
@class NSMutableArray;
|
|
|
|
@class NSDictionary;
|
|
|
|
@class NSString;
|
|
|
|
|
2002-11-15 22:57:05 +00:00
|
|
|
@class EOCooperatingObjectStore;
|
|
|
|
@class EOQualifier;
|
|
|
|
@class EOModelGroup;
|
|
|
|
|
2002-12-30 22:10:43 +00:00
|
|
|
|
2004-04-17 11:30:47 +00:00
|
|
|
@interface EOObjectStoreCoordinator : EOObjectStore
|
2002-11-15 22:57:05 +00:00
|
|
|
{
|
|
|
|
NSMutableArray *_stores;
|
|
|
|
NSDictionary *_userInfo;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)addCooperatingObjectStore: (EOCooperatingObjectStore *)store;
|
|
|
|
|
|
|
|
- (void)removeCooperatingObjectStore: (EOCooperatingObjectStore *)store;
|
|
|
|
|
|
|
|
- (NSArray *)cooperatingObjectStores;
|
|
|
|
|
2004-04-17 11:30:47 +00:00
|
|
|
- (void)forwardUpdateForObject: (id)object changes: (NSDictionary *)changes;
|
2002-11-15 22:57:05 +00:00
|
|
|
|
2004-04-17 11:30:47 +00:00
|
|
|
- (NSDictionary *)valuesForKeys: (NSArray *)keys object: (id)object;
|
2002-11-15 22:57:05 +00:00
|
|
|
|
2006-12-30 17:41:02 +00:00
|
|
|
- (EOCooperatingObjectStore *)objectStoreForGlobalID: (EOGlobalID *)globalID;
|
2002-11-15 22:57:05 +00:00
|
|
|
|
2004-04-17 11:30:47 +00:00
|
|
|
- (EOCooperatingObjectStore *)objectStoreForObject: (id)object;
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
- (EOCooperatingObjectStore *)objectStoreForFetchSpecification: (EOFetchSpecification *)fetchSpecification;
|
|
|
|
|
|
|
|
- (NSDictionary *)userInfo;
|
|
|
|
- (void)setUserInfo: (NSDictionary *)info;
|
|
|
|
|
|
|
|
+ (void)setDefaultCoordinator: (EOObjectStoreCoordinator *)coordinator;
|
|
|
|
+ (id)defaultCoordinator;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
2004-04-17 11:30:47 +00:00
|
|
|
/* Notifications */
|
|
|
|
GDL2CONTROL_EXPORT NSString *EOCooperatingObjectStoreWasAdded;
|
|
|
|
GDL2CONTROL_EXPORT NSString *EOCooperatingObjectStoreWasRemoved;
|
2002-11-15 22:57:05 +00:00
|
|
|
|
2004-04-17 11:30:47 +00:00
|
|
|
GDL2CONTROL_EXPORT NSString *EOCooperatingObjectStoreNeeded;
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
|
2004-04-17 11:30:47 +00:00
|
|
|
@interface EOCooperatingObjectStore : EOObjectStore
|
2010-07-04 10:00:57 +00:00
|
|
|
{
|
|
|
|
EOObjectStoreCoordinator *_coordinator; /* unretained */
|
|
|
|
}
|
|
|
|
|
|
|
|
- (EOObjectStoreCoordinator *)coordinator;
|
|
|
|
- (void) setCoordinator:(EOObjectStoreCoordinator *) newCoordinator;
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
- (BOOL)ownsGlobalID: (EOGlobalID *)globalID;
|
|
|
|
|
|
|
|
- (BOOL)ownsObject: (id)object;
|
|
|
|
|
|
|
|
- (BOOL)ownsEntityNamed: (NSString *)entityName;
|
|
|
|
|
|
|
|
- (BOOL)handlesFetchSpecification: (EOFetchSpecification *)fetchSpecification;
|
|
|
|
|
2004-04-17 11:30:47 +00:00
|
|
|
- (void)prepareForSaveWithCoordinator: (EOObjectStoreCoordinator *)coordinator
|
|
|
|
editingContext: (EOEditingContext *)context;
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
- (void)recordChangesInEditingContext;
|
|
|
|
|
2004-04-17 11:30:47 +00:00
|
|
|
- (void)recordUpdateForObject: (id)object changes: (NSDictionary *)changes;
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
- (void)performChanges;
|
|
|
|
|
|
|
|
- (void)commitChanges;
|
|
|
|
- (void)rollbackChanges;
|
|
|
|
|
2004-04-17 11:30:47 +00:00
|
|
|
- (NSDictionary *)valuesForKeys: (NSArray *)keys object: (id)object;
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|