Mac Developer Library

Developer

CoreData Framework Reference NSSaveChangesRequest Class Reference

Options
Deployment Target:

On This Page
Language:

NSSaveChangesRequest

A save changes request encapsulates a collection of changes to be made by an object store in response to a save operation on a managed object context.

Inheritance


Conforms To


Import Statement


Swift

import CoreData

Objective-C

@import CoreData;

Availability


Available in OS X v10.7 and later.
  • Initializes a save changes request with collections of given changes.

    Declaration

    Swift

    init(insertedObjects insertedObjects: NSSet?, updatedObjects updatedObjects: NSSet?, deletedObjects deletedObjects: NSSet?, lockedObjects lockedObjects: NSSet?)

    Objective-C

    - (instancetype)initWithInsertedObjects:(NSSet *)insertedObjects updatedObjects:(NSSet *)updatedObjects deletedObjects:(NSSet *)deletedObjects lockedObjects:(NSSet *)lockedObjects

    Parameters

    insertedObjects

    Objects that were inserted into the calling context.

    updatedObjects

    Objects that were updated in the calling context.

    deletedObjects

    Objects that were deleted in the calling context.

    lockedObjects

    Objects that were flagged for optimistic locking on the calling context.

    Return Value

    A save changes request initialized with the given changes.

    Import Statement

    Objective-C

    @import CoreData;

    Swift

    import CoreData

    Availability

    Available in OS X v10.7 and later.

  • The objects that were inserted into the calling context. (read-only)

    Declaration

    Swift

    var insertedObjects: NSSet? { get }

    Objective-C

    @property(readonly, strong) NSSet *insertedObjects

    Import Statement

    Objective-C

    @import CoreData;

    Swift

    import CoreData

    Availability

    Available in OS X v10.7 and later.

  • The objects that were modified in the calling context. (read-only)

    Declaration

    Swift

    var updatedObjects: NSSet? { get }

    Objective-C

    @property(readonly, strong) NSSet *updatedObjects

    Import Statement

    Objective-C

    @import CoreData;

    Swift

    import CoreData

    Availability

    Available in OS X v10.7 and later.

  • The objects that were deleted in the calling context. (read-only)

    Declaration

    Swift

    var deletedObjects: NSSet? { get }

    Objective-C

    @property(readonly, strong) NSSet *deletedObjects

    Import Statement

    Objective-C

    @import CoreData;

    Swift

    import CoreData

    Availability

    Available in OS X v10.7 and later.

  • The objects that were flagged for optimistic locking on the calling context. (read-only)

    Declaration

    Swift

    var lockedObjects: NSSet? { get }

    Objective-C

    @property(readonly, strong) NSSet *lockedObjects

    Discussion

    Objects are flagged for optimistic locking with detectConflictsForObject:.

    Import Statement

    Objective-C

    @import CoreData;

    Swift

    import CoreData

    Availability

    Available in OS X v10.7 and later.