25 #ifndef _NSPersistentStoreCoordinator_h_
26 #define _NSPersistentStoreCoordinator_h_
28 #import <Foundation/NSObject.h>
29 #import <Foundation/NSLock.h>
36 @class NSManagedObjectModel,
40 extern NSString *
const NSSQLiteStoreType;
41 extern NSString *
const NSXMLStoreType;
42 extern NSString *
const NSBinaryStoreType;
43 extern NSString *
const NSInMemoryStoreType;
46 extern NSString *
const NSReadOnlyPersistentStoreOption;
47 extern NSString *
const NSValidateXMLStoreOption;
50 extern NSString *
const NSStoreTypeKey;
51 extern NSString *
const NSStoreUUIDKey;
53 @interface NSPersistentStoreCoordinator : NSObject <NSLocking>
55 NSManagedObjectModel * _model;
58 NSMutableDictionary * _persistentStores;
59 NSRecursiveLock * _lock;
71 BOOL _configurationSet;
74 BOOL _multipleConfigurationsAllowed;
86 - (id) initWithManagedObjectModel: (NSManagedObjectModel *) aModel;
87 - (NSManagedObjectModel *) managedObjectModel;
90 - (id) addPersistentStoreWithType: (NSString *) aStoreType
91 configuration: (NSString *) aConfiguration
92 URL: (NSURL *) aStoreURL
93 options: (NSDictionary *) someOptions
94 error: (NSError **) anErrorPointer;
96 - (BOOL) removePersistentStore: (
id) aPersistentStore
97 error: (NSError **) errorPointer;
99 - (id) migratePersistentStore: (
id) aPersistentStore
100 toURL: (NSURL *) aURL
101 options: (NSDictionary *) options
102 withType: (NSString *) newStoreType
103 error: (NSError **) errorPointer;
105 - (NSArray *) persistentStores;
106 - (id) persistentStoreForURL: (NSURL *) aURL;
107 - (NSURL *) URLForPersistentStore: (
id) aPersistentStore;
115 + (NSDictionary *) metadataForPersistentStoreWithURL: (NSURL *) aUrl
116 error: (NSError **) errorPtr;
117 - (NSDictionary *) metadataForPersistentStore: (
id) store;
118 - (void) setMetadata: (NSDictionary *) metadata
119 forPersistentStore: (
id) store;
For implementation notes see "Documentation/NSManagedObjectID.txt" in the source distribution of the ...