RKManagedObjectSeeder Class Reference
| Inherits from | NSObject |
| Declared in | RKManagedObjectSeeder.h RKManagedObjectSeeder.m |
Overview
Provides an interface for generating a seed database suitable for initializing a Core Data backed RestKit application. The object seeder loads files from the application’s main bundle and processes them with the Object Mapper to produce a database on disk. This file can then be copied into the main bundle of an application and provided to RKManagedObjectStore at initialization to start the app with a set of data immediately available for use within Core Data.
Tasks
-
+ generateSeedDatabaseWithObjectManager:fromFiles:Generates a seed database using an object manager and a null terminated list of files. Exits the seeding process and outputs an informational message
-
+ objectSeederWithObjectManager:Returns an object seeder ready to begin seeding. Requires a fully configured instance of an object manager.
-
– seedObjectsFromFiles:Seed the database with objects from the specified file(s). The list must be terminated by nil
-
– seedObjectsFromFile:withObjectMapping:Seed the database with objects from the specified file using the supplied object mapping.
-
– seedObjectsFromFile:withObjectMapping:bundle:Seed the database with objects from the specified file, from the specified bundle, using the supplied object mapping.
-
– finalizeSeedingAndExitCompletes a seeding session by persisting the store, outputing an informational message and exiting the process
Class Methods
generateSeedDatabaseWithObjectManager:fromFiles:
Generates a seed database using an object manager and a null terminated list of files. Exits the seeding process and outputs an informational message
+ (void)generateSeedDatabaseWithObjectManager:(RKObjectManager *)objectManager fromFiles:(NSString *)fileName, ...Declared In
RKManagedObjectSeeder.hInstance Methods
finalizeSeedingAndExit
Completes a seeding session by persisting the store, outputing an informational message and exiting the process
- (void)finalizeSeedingAndExitDeclared In
RKManagedObjectSeeder.hseedObjectsFromFile:withObjectMapping:
Seed the database with objects from the specified file using the supplied object mapping.
- (void)seedObjectsFromFile:(NSString *)fileName withObjectMapping:(RKObjectMapping *)nilOrObjectMappingDeclared In
RKManagedObjectSeeder.hseedObjectsFromFile:withObjectMapping:bundle:
Seed the database with objects from the specified file, from the specified bundle, using the supplied object mapping.
- (void)seedObjectsFromFile:(NSString *)fileName withObjectMapping:(RKObjectMapping *)nilOrObjectMapping bundle:(NSBundle *)nilOrBundleDeclared In
RKManagedObjectSeeder.h