NSPersistentStoreRequest Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/CoreData.framework
Availability
Available in iOS 5.0 and later.
Companion guide
Declared in
NSPersistentStoreRequest.h

Overview

An instance of NSPersistentStoreRequest describes criteria used to retrieve data from or save data to persistent stores.

Tasks

Fetch Attributes

Instance Methods

affectedStores

Returns the stores the request should be sent to.

- (NSArray *)affectedStores
Return Value

The stores the request should be sent to.

Discussion

The array contains instances of NSPersistentStore.

Availability
  • Available in iOS 5.0 and later.
Declared In
NSPersistentStoreRequest.h

requestType

Returns the type of the fetch request.

Return Value

The type of the fetch request.

Discussion

For possible values, see “NSFetchRequestResultType.”

Availability
  • Available in iOS 5.0 and later.
Declared In
NSPersistentStoreRequest.h

setAffectedStores:

Sets the stores the request should be sent to.

- (void)setAffectedStores:(NSArray *)stores
Parameters
stores

The stores the request should be sent to.

The array should contain instances of NSPersistentStore.

Discussion

Availability
  • Available in iOS 5.0 and later.
Declared In
NSPersistentStoreRequest.h

Constants

NSFetchRequestResultType

These constants specify the types of fetch request.

enum {
   NSFetchRequestType = 1,
   NSSaveRequestType,
};
typedef NSUInteger NSPersistentStoreRequestType;
Constants
NSFetchRequestType

Specifies that the request returns managed objects.

Available in iOS 5.0 and later.

Declared in NSPersistentStoreRequest.h.

NSSaveRequestType

Specifies that the request saves managed objects.

Available in iOS 5.0 and later.

Declared in NSPersistentStoreRequest.h.

Discussion

These constants are used by requestType.