Inherits From:
NSObject
Conforms To: NSObject (NSObject)
Declared in: EOAccess/EODatabaseOperation.h
databaseContext:willOrderAdaptorOperationsFromDatabaseOperations:
).An EODatabaseOperation specifies an enterprise object (called "object") on which the operation is performed, the global ID for the object, and the object's entity. In addition, the database operation has a snapshot containing the last known database values for the object and a newRow dictionary of new or updated values to save in the database. Finally, a database operation specifies one of the following operators (the type of operation represented by the database operation).
adaptorOperations
Returns the EOAdaptorOperation objects that need to be performed to carry out the operation represented by the receiver.
See also: - addAdaptorOperation: , - removeAdaptorOperation:
addAdaptorOperation:
- (void)addAdaptorOperation:
(EOAdaptorOperation *)adaptorOperation
Adds adaptorOperation to the receiver's list of adaptor operations. Raises an exception if adaptorOperation is nil .
See also: - adaptorOperations , - removeAdaptorOperation:
databaseOperator
- (EODatabaseOperator)databaseOperator
Returns the receiver's database operator.
See also: - setDatabaseOperator:
dbSnapshot
- (NSDictionary *)dbSnapshot
Returns the database snapshot for the receiver's enterprise object. The snapshot contains the last known database values for the enterprise
object. The dictionary returned from this method will be empty if the receiver's object has just been inserted into an EOEditingContext and has not yet been saved in persistent storage.
See also: - setDBSnapshot:
Returns the entity that corresponds to the receiver's enterprise object.
See also: - initWithGlobalID:object:entity:
globalID
- (EOGlobalID *)globalID
Returns the global ID that corresponds to the receiver's enterprise object.
See also: - initWithGlobalID:object:entity:
initWithGlobalID:object:entity:
- initWithGlobalID:
(EOGlobalID *)globalID object:
(id)object entity:
(EOEntity *)entity
The designated initializer, this method initializes a new EODatabaseOperation instance. Sets the enterprise object to which the operation will be applied, the object's global ID, and the object's entity. Returns self .
See also: - globalID , - object , - entity
newRow
- (NSMutableDictionary *)newRow
Returns a dictionary representation of the receiver's enterprise object. In addition to all the properties of the enterprise object that are stored in the database, the dictionary contains values for the non-derived attribute's of the enterprise object's entity that aren't visible in the enterprise object. For example, primary and foreign keys aren't ordinarily properties of an enterprise object but are attributes of the object's entity.
The newRow dictionary is initialized with the values in the receiver's snapshot. New or updated values are added to the newRow dictionary (replacing out-of-date values) as the Framework maps changes in the object to an operation.
See also: - setNewRow:
Returns the receiver's enterprise object.
See also: - initWithGlobalID:object:entity:
primaryKeyDiffs
- (NSDictionary *)primaryKeyDiffs
Returns an NSDictionary that contains any primary key values in newRow that are different from those in the row snapshot. Returns nil
if the receiver doesn't have EODatabaseUpdateOperator set as its database operator.
See also: - setDatabaseOperator: , - newRow
recordToManySnapshots:
- (void)recordToManySnapshot:
(NSArray *)globalIDs relationshipName:
(NSString *)name
Records the objects in globalIDs. globalIDs is an array of the globalIDs that identify the objects at the destination of the to-many relationship named name; name is a property of the receiver's enterprise object.
See also: - toManySnapshots
removeAdaptorOperation:
- (void)removeAdaptorOperation:
(EOAdaptorOperation *)adaptorOperation
Removes adaptorOperation from the receiver's list of adaptor operations.
See also: - adaptorOperations , - addAdaptorOperation:
rowDiffs
- (NSDictionary *)rowDiffs
Returns values in the receiver's newRow dictionary that are different than the corresponding values its snapshot. The dictionary returned from this method contains the new values from the enterprise object.
See also: - rowDiffsForAttributes: , - newRow
rowDiffsForAttributes:
- (NSDictionary *)rowDiffsForAttributes:
(NSArray *)attributes
For the EOAttribute objects in attributes, this method returns values in the receiver's newRow dictionary that are different than the corresponding values its snapshot. The dictionary returned contains the new values from the enterprise object.
See also: - rowDiffs , - newRow
setDBSnapshot:
- (void)setDBSnapshot:
(NSDictionary *)dbSnapshot
Sets the snapshot for the receiver's enterprise object. If the object has just been inserted into an EOEditingContext, it won't have a snapshot. In this case, dbSnapshot should be an empty dictionary.
See also: - dbSnapshot
setDatabaseOperator:
- (void)setDatabaseOperator:
(EODatabaseOperator)dbOp
Sets the receiver's database operator.
See also: - databaseOperator
setNewRow:
- (void)setNewRow:
(NSMutableDictionary *)newRow
Sets the dictionary representation of the receiver's enterprise object. newRow should contain values for all the properties of the enterprise object that are stored in the database and for the non-derived attribute's of the enterprise object's entity that aren't visible in the enterprise object.
See also: - newRow
toManySnapshots
- (NSDictionary *)toManySnapshots
Returns the NSDictionary containing the snapshots for the to-many relationships of the receiver's enterprise object.
See also: - recordToManySnapshots:
Copyright © 1997, Apple Computer, Inc. All rights reserved.