RKManagedObjectStore Class Reference
| Inherits from | NSObject |
| Declared in | RKManagedObjectStore.h RKManagedObjectStore.m |
Tasks
Other Methods
-
managedObjectCacheManaged object cache provides support for automatic removal of objects pruned from a server side load. Also used to provide offline object loading
property -
managedObjectContext
propertyOverride managedObjectContext getter to ensure we return a separate context for each NSThread. -
+ objectStoreWithStoreFilename:Initialize a new managed object store with a SQLite database with the filename specified
-
+ objectStoreWithStoreFilename:usingSeedDatabaseName:managedObjectModel:delegate:Initialize a new managed object store backed by a SQLite database with the specified filename. If a seed database name is provided and no existing database is found, initialize the store by copying the seed database from the main bundle. If the managed object model provided is nil, all models will be merged from the main bundle for you.
-
+ objectStoreWithStoreFilename:inDirectory:usingSeedDatabaseName:managedObjectModel:delegate:Initialize a new managed object store backed by a SQLite database with the specified filename, in the specified directory. If no directory is specified, will use the app’s Documents directory. If a seed database name is provided and no existing database is found, initialize the store by copying the seed database from the main bundle. If the managed object model provided is nil, all models will be merged from the main bundle for you.
-
– initWithStoreFilename:DEPRECATED_ATTRIBUTE:Initialize a new managed object store with a SQLite database with the filename specified @deprecated
-
– saveSave the current contents of the managed object store
-
– deletePersistantStoreUsingSeedDatabaseName:This deletes and recreates the managed object context and persistant store, effectively clearing all data
-
– objectWithID:Retrieves a model object from the appropriate context using the objectId -
– objectsWithIDs:Retrieves a array of model objects from the appropriate context using an array of NSManagedObjectIDs -
– findOrCreateInstanceOfEntity:withPrimaryKeyAttribute:andValue:Retrieves a model object from the object store given a Core Data entity and the primary key attribute and value for the desired object. Internally, this method constructs a thread-local cache of managed object instances to avoid repeated fetches from the store
-
– objectsForResourcePath:Returns an array of objects that the ‘live’ at the specified resource path. Usage of this method requires that you have provided an implementation of the managed object cache
Other Methods
-
– applicationDataDirectoryReturns the path to the application’s documents directory.
Properties
Class Methods
objectStoreWithStoreFilename:
Initialize a new managed object store with a SQLite database with the filename specified
+ (RKManagedObjectStore *)objectStoreWithStoreFilename:(NSString *)storeFilenameDeclared In
RKManagedObjectStore.hobjectStoreWithStoreFilename:inDirectory:usingSeedDatabaseName:managedObjectModel:delegate:
Initialize a new managed object store backed by a SQLite database with the specified filename, in the specified directory. If no directory is specified, will use the app’s Documents directory. If a seed database name is provided and no existing database is found, initialize the store by copying the seed database from the main bundle. If the managed object model provided is nil, all models will be merged from the main bundle for you.
+ (RKManagedObjectStore *)objectStoreWithStoreFilename:(NSString *)storeFilename inDirectory:(NSString *)directory usingSeedDatabaseName:(NSString *)nilOrNameOfSeedDatabaseInMainBundle managedObjectModel:(NSManagedObjectModel *)nilOrManagedObjectModel delegate:(id)delegateDeclared In
RKManagedObjectStore.hobjectStoreWithStoreFilename:usingSeedDatabaseName:managedObjectModel:delegate:
Initialize a new managed object store backed by a SQLite database with the specified filename. If a seed database name is provided and no existing database is found, initialize the store by copying the seed database from the main bundle. If the managed object model provided is nil, all models will be merged from the main bundle for you.
+ (RKManagedObjectStore *)objectStoreWithStoreFilename:(NSString *)storeFilename usingSeedDatabaseName:(NSString *)nilOrNameOfSeedDatabaseInMainBundle managedObjectModel:(NSManagedObjectModel *)nilOrManagedObjectModel delegate:(id)delegateDeclared In
RKManagedObjectStore.hInstance Methods
applicationDataDirectory
Returns the path to the application’s documents directory.
- (NSString *)applicationDataDirectoryDeclared In
RKManagedObjectStore.mdeletePersistantStoreUsingSeedDatabaseName:
This deletes and recreates the managed object context and persistant store, effectively clearing all data
- (void)deletePersistantStoreUsingSeedDatabaseName:(NSString *)seedFileDeclared In
RKManagedObjectStore.hfindOrCreateInstanceOfEntity:withPrimaryKeyAttribute:andValue:
Retrieves a model object from the object store given a Core Data entity and the primary key attribute and value for the desired object. Internally, this method constructs a thread-local cache of managed object instances to avoid repeated fetches from the store
- (NSManagedObject *)findOrCreateInstanceOfEntity:(NSEntityDescription *)entity withPrimaryKeyAttribute:(NSString *)primaryKeyAttribute andValue:(id)primaryKeyValueDeclared In
RKManagedObjectStore.hinitWithStoreFilename:DEPRECATED_ATTRIBUTE:
Initialize a new managed object store with a SQLite database with the filename specified @deprecated
- (id)initWithStoreFilename:(NSString *)storeFilename DEPRECATED_ATTRIBUTEDeclared In
RKManagedObjectStore.hobjectWithID:
Retrieves a model object from the appropriate context using the objectId
- (NSManagedObject *)objectWithID:(NSManagedObjectID *)objectIDDeclared In
RKManagedObjectStore.hobjectsForResourcePath:
Returns an array of objects that the ‘live’ at the specified resource path. Usage of this method requires that you have provided an implementation of the managed object cache
- (NSArray *)objectsForResourcePath:(NSString *)resourcePathDiscussion
See managedObjectCache above
Declared In
RKManagedObjectStore.h