Class: NSPersistentStore
Overview
This class is the abstract base class for all Core Data persistent stores.
Direct Known Subclasses
Class Method Summary (collapse)
-
+ metadataForPersistentStoreWithURL:error:
Returns the metadata from the persistent store at the given URL.
-
+ migrationManagerClass
Returns the NSMigrationManager class for this store class.
-
+ setMetadata:forPersistentStoreWithURL:error:
Sets the metadata for the store at a given URL.
Instance Method Summary (collapse)
-
- configurationName
Returns the name of the managed object model configuration used to create the receiver.
-
- didAddToPersistentStoreCoordinator:
Invoked after the receiver has been added to the persistent store coordinator.
-
- identifier
Returns the unique identifier for the receiver.
-
- initWithPersistentStoreCoordinator:configurationName:URL:options:
Returns a store initialized with the given arguments.
-
- isReadOnly
Returns a Boolean value that indicates whether the receiver is read-only.
-
- loadMetadata:
Instructs the receiver to load its metadata.
-
- metadata
Returns the metadata for the receiver.
-
- options
Returns the options with which the receiver was created.
-
- persistentStoreCoordinator
Returns the persistent store coordinator which loaded the receiver.
-
- setIdentifier:
Sets the unique identifier for the receiver.
-
- setMetadata:
Sets the metadata for the receiver.
-
- setReadOnly:
Sets whether the receiver is read-only.
-
- setURL:
Sets the URL for the receiver.
-
- type
Returns the type string of the receiver.
-
- URL
Returns the URL for the receiver.
-
- willRemoveFromPersistentStoreCoordinator:
Invoked before the receiver is removed from the persistent store coordinator.
Methods inherited from NSObject
#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version
Constructor Details
This class inherits a constructor from NSObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class NSObject
Class Method Details
+ (Hash) metadataForPersistentStoreWithURL(url, error:error)
Returns the metadata from the persistent store at the given URL.
+ (Class) migrationManagerClass
Returns the NSMigrationManager class for this store class. In a subclass of NSPersistentStore, you can override this to provide a custom migration manager subclass (for example, to take advantage of store-specific functionality to improve migration performance).
+ (Boolean) setMetadata(metadata, forPersistentStoreWithURL:url, error:error)
Sets the metadata for the store at a given URL.
Instance Method Details
- (String) configurationName
Returns the name of the managed object model configuration used to create the receiver.
- (Object) didAddToPersistentStoreCoordinator(coordinator)
Invoked after the receiver has been added to the persistent store coordinator. The default implementation does nothing. You can override this method in a subclass in order to perform any kind of setup necessary before the load method is invoked.
- (String) identifier
Returns the unique identifier for the receiver. The identifier is used as part of the managed object IDs for each object in the store.
- (Object) initWithPersistentStoreCoordinator(root, configurationName:name, URL:url, options:options)
Returns a store initialized with the given arguments. You must ensure that you load metadata during initialization and set it using setMetadata:.
- (Boolean) isReadOnly
Returns a Boolean value that indicates whether the receiver is read-only.
- (Boolean) loadMetadata(error)
Instructs the receiver to load its metadata.
- (Hash) metadata
Returns the metadata for the receiver.
- (Hash) options
Returns the options with which the receiver was created. See NSPersistentStoreCoordinator for a list of key names for options in this dictionary.
- (NSPersistentStoreCoordinator) persistentStoreCoordinator
Returns the persistent store coordinator which loaded the receiver.
- (Object) setIdentifier(identifier)
Sets the unique identifier for the receiver.
- (Object) setMetadata(storeMetadata)
Sets the metadata for the receiver.
- (Object) setReadOnly(flag)
Sets whether the receiver is read-only.
- (Object) setURL(url)
Sets the URL for the receiver. To alter the location of a store, send the persistent store coordinator a setURL:forPersistentStore: message.
- (String) type
Returns the type string of the receiver. This string is used when specifying the type of store to add to a persistent store coordinator.
- (NSURL) URL
Returns the URL for the receiver.
- (Object) willRemoveFromPersistentStoreCoordinator(coordinator)
Invoked before the receiver is removed from the persistent store coordinator. The default implementation does nothing. You can override this method in a subclass in order to perform any clean-up before the store is removed from the coordinator (and deallocated).