GNUstep Core Data  0.1
GSPersistentStore.h
1 /* Interface of the GSPersistentStore class for the GNUstep
2  Core Data framework.
3  Copyright (C) 2005 Free Software Foundation, Inc.
4 
5  Written by: Saso Kiselkov <diablos@manga.sk>
6  Date: August 2005
7 
8  This file is part of the GNUstep Core Data framework.
9 
10  This library is free software; you can redistribute it and/or
11  modify it under the terms of the GNU Lesser General Public
12  License as published by the Free Software Foundation; either
13  version 2.1 of the License, or (at your option) any later version.
14 
15  This library is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public
21  License along with this library; if not, write to the Free
22  Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
23  */
24 
25 #ifndef _GSPersistentStore_h_
26 #define _GSPersistentStore_h_
27 
28 #include <Foundation/NSObject.h>
29 
30 @class NSString,
31  NSDictionary,
32  NSMutableDictionary,
33  NSArray,
34  NSError,
35  NSSet,
36  NSPredicate;
37 @class NSURL,
38  NSEntityDescription,
39  NSManagedObjectModel,
42 
43 @interface GSPersistentStore : NSObject
44 {
45  NSURL * _URL;
46  NSManagedObjectModel * _model;
47  NSString * _configuration;
48 
49  NSDictionary * _metadata;
50 
51  NSMutableDictionary * _versionNumbers;
52 }
53 
54 - initWithURL: (NSURL *) URL
55  managedObjectModel: (NSManagedObjectModel *) model
56  configuration: (NSString *) configuration
57  options: (NSDictionary *) options;
58 
59 - (NSURL *) URL;
60 - (NSString *) configuration;
61 - (void) setUUID: (NSString *) newUUID;
62 
63 // store metadata manipulation
64 - (void) setMetadata: (NSDictionary *) metadata;
65 - (NSDictionary *) metadata;
66 
67 - (BOOL) saveObjects: (NSSet *) objects
68  error: (NSError **) error;
69 
70 - (unsigned long long) versionNumberForObjectID:(NSManagedObjectID *)objectID;
71 
72 // subclasses must override these methods
73 
74 - (NSString *) storeType;
75 - (unsigned long long) highestIDValue;
76 - (NSDictionary *) fetchObjectsWithEntity: (NSEntityDescription *) entity
77  predicate: (NSPredicate *) predicate
78  error: (NSError **) error;
79 - (NSDictionary *) fetchObjectWithID: (NSManagedObjectID *) objectID
80  fetchProperties: (NSSet *) propertiesToFetch;
81 - (NSDictionary *) fetchObjectsWithEntity: (NSEntityDescription *) entity
82  predicate: (NSPredicate *) predicate
83  error: (NSError **) error;
84 - (BOOL) writeSavingObjects: (NSSet *) objectsToWrite
85  deletingObjects: (NSSet *) objectIDsToDelete
86  error: (NSError **) error;
87 @end
88 
89 #endif // _GSPersistentStore_h_
Nn abstract superclass from which concrete implementations of various persistent store types are subc...
An object for storing details about managed object fetches.
For implementation notes see "Documentation/NSManagedObjectID.txt" in the source distribution of the ...