GNUstep Core Data
0.1
|
Validates whether value'' is a valid value for
attribute'', returning YES if it is, and NO if it isn't and setting the error in `‘error’'.
More...
Inherits NSObject.
Instance Methods | |
(id) | - initWithEntity:insertIntoManagedObjectContext: |
The designated initializer for NSManagedObject. More... | |
(NSManagedObjectContext *) | - managedObjectContext |
Returns the managed object context to which the receiver belongs. More... | |
(NSEntityDescription *) | - entity |
Returns the entity of the receiver. More... | |
(NSManagedObjectID *) | - objectID |
Returns the object ID of the receiver. More... | |
(BOOL) | - isInserted |
Returns YES if the receiver is inserted in a managed object context, and NO otherwise. More... | |
(BOOL) | - isUpdated |
Returns YES if the receiver has changes that have not yet been written to a persistent store (the receiver has been changed since the last save operation). More... | |
(BOOL) | - isDeleted |
Returns YES if the receiver has been scheduled in it's parent managed object context for deletion from the persistent store and NO otherwise. More... | |
(BOOL) | - isFault |
Returns YES if the receiver is a fault, and NO otherwise. More... | |
(void) | - awakeFromFetch |
Invoked automatically after the receiver has been fetched from a persistent store. More... | |
(void) | - awakeFromInsert |
Invoked automatically after the receiver has been inserted into a managed object context. | |
(id) | - valueForKey: |
Returns the value for key ‘aKey’ and invokes corresponding KVO methods. | |
(void) | - setValue:forKey: |
Sets the value of key ‘aKey’ to ‘aValue’ and invokes corresponding KVO methods. | |
(id) | - primitiveValueForKey: |
Returns the value for key ‘aKey’ without invoking KVO methods. | |
(void) | - setPrimitiveValue:forKey: |
Sets the value for key ‘aKey’ without invoking KVO methods. | |
(BOOL) | - validateForDelete: |
Validates whether the receiver can be deleted in it's present state from the managed object context returning YES if it can or NO if it can't. More... | |
Validates whether value'' is a valid value for
attribute'', returning YES if it is, and NO if it isn't and setting the error in `‘error’'.
Does a simmilar job as ValidationAttributeValue, but for relationships. Instances of NSManagedObject (and subclasses of it) are the objects of principal concern in Core Data. They serve as the primary data objects in your Core Data data model.
For more efficient functioning Core Data allows for "fault" objects, i.e. managed objects which don't contain any of their key-values set. Upon requesting or setting some key's value the fault is "fired" and the managed object's state is read from the persistent store. Methods do cause fault firing are explicitly noted as such.
Definition at line 36 of file NSManagedObject.h.
- (void) awakeFromFetch |
Invoked automatically after the receiver has been fetched from a persistent store.
You can use this to compute derived values
Definition at line 56 of file NSManagedObject.m.
- (NSEntityDescription *) entity |
Returns the entity of the receiver.
Doesn't fire a fault.
Definition at line 56 of file NSManagedObject.m.
- (id) initWithEntity: | (NSEntityDescription *) | entity | |
insertIntoManagedObjectContext: | (NSManagedObjectContext *) | ctxt | |
The designated initializer for NSManagedObject.
This method initializes a managed object and inserts it into ‘aContext’. The provided ‘anEntity’ argument must be a non-abstract entity, otherwise an exception is thrown.
Definition at line 56 of file NSManagedObject.m.
- (BOOL) isDeleted |
Returns YES if the receiver has been scheduled in it's parent managed object context for deletion from the persistent store and NO otherwise.
Doesn't fire a fault.
Definition at line 56 of file NSManagedObject.m.
- (BOOL) isFault |
Returns YES if the receiver is a fault, and NO otherwise.
Doesn't fire a fault.
Definition at line 56 of file NSManagedObject.m.
- (BOOL) isInserted |
Returns YES if the receiver is inserted in a managed object context, and NO otherwise.
Doesn't fire a fault.
Definition at line 56 of file NSManagedObject.m.
- (BOOL) isUpdated |
Returns YES if the receiver has changes that have not yet been written to a persistent store (the receiver has been changed since the last save operation).
Doesn't fire a fault.
Definition at line 56 of file NSManagedObject.m.
- (NSManagedObjectContext *) managedObjectContext |
Returns the managed object context to which the receiver belongs.
Doesn't fire a fault.
Definition at line 56 of file NSManagedObject.m.
- (NSManagedObjectID *) objectID |
Returns the object ID of the receiver.
If the receiver is not yet saved to a persistent store the returned ID is temporary, otherwise it is permanent. Doesn't fire a fault.
Definition at line 56 of file NSManagedObject.m.
- (BOOL) validateForDelete: | (NSError **) | error |
Validates whether the receiver can be deleted in it's present state from the managed object context returning YES if it can or NO if it can't.
Deleting an object is not allowed if it, for example, contains an established relationship with a "deny" delete rule.
Definition at line 56 of file NSManagedObject.m.