EOAdaptorOperation
Inherits from: NSObject
Conforms to: NSObject
(NSObject)
Declared in: EOAccess/EODatabaseOperation.h
Class Description
An EOAdaptorOperation object represents a primitive operation in a database server-lock, insert, update, or delete a row; or execute a stored procedure-and all the necessary information required by the operation. An EOAdaptorOperation is processed by an EOAdaptorChannel object in the method performAdaptorOperation:. You don't ordinarily create instances of EOAdaptorOperation; rather, the Framework automatically creates an EOAdaptorOperation object and sends it to an adaptor channel when your application needs the database server to perform an operation. You generally interact with EOAdaptorOperation objects only if you need to specify the order in which a set of operations are carried out (see the description for the EODatabaseContext delegate method databaseContext:willOrderAdaptorOperationsFromDatabaseOperations:).
An EOAdaptorOperation has an entity and an operator (the type
of operation the object represents). An adaptor operation's operator
(EOAdaptorLockOperator
, EOAdaptorInsertOperator
, EOAdaptorUpdateOperator
, EOAdaptorDeleteOperator
,
or EOAdaptorStoredProcedureOperator
)
determines additional, operator-dependent information used by the
EOAdaptorOperation object. For example, only a stored procedure
operation has an EOStoredProcedure object. The operator-dependent information
is accessible using the methods described below.
Method Types
- Creating a new EOAdaptorOperation
- - initWithEntity:
- Accessing the entity
- - entity
- Accessing the operator
- - setAdaptorOperator:
- - adaptorOperator
- Accessing the qualifier
- - setQualifier:
- - qualifier
- Accessing locking attributes
- - setAttributes:
- - attributes
- Accessing operation values
- - setChangedValues:
- - changedValues
- Accessing a stored procedure
- - setStoredProcedure:
- - storedProcedure
- Handling errors during the operation
- - setException:
- - exception
- Comparing operations
- - compareAdaptorOperation:
Instance Methods
adaptorOperator
- (EOAdaptorOperator)adaptorOperator
EOAdaptorInsertOperator
uses changedValues, but
not attributes, qualifier, or storedProcedure.attributes
- (NSArray *)attributes
EOAdaptorLockOperator
.changedValues
- (NSDictionary *)changedValues
compareAdaptorOperation:
- (NSComparisonResult)compareAdaptorOperation:(EOAdaptorOperation
*)operation
EOAdaptorLockOperator
EOAdaptorInsertOperator
EOAdaptorUpdateOperator
EOAdaptorDeleteOperator
EOAdaptorStoredProcedureOperator
EOAdaptorLockOperator
precedes EOAdaptorInsertOperator
, EOAdaptorInsertOperator
precedes EOAdaptorUpdateOperator
,
and so on.
An EODatabaseContext uses compareAdaptorOperation: to order adaptor operations before invoking EOAdaptorChannel's performAdaptorOperations: method.
entity
- (EOEntity *)entity
See Also: - initWithEntity:
exception
- (NSException *)exception
qualifier
- (EOQualifier *)qualifier
EOAdaptorInsertOperator
and EOAdaptorStoredProcedureOperator
.initWithEntity:
- initWithEntity:(EOEntity
*)entity
See Also: - entity
setAdaptorOperator:
- (void)setAdaptorOperator:(EOAdaptorOperator)adaptorOperator
EOAdaptorLockOperator
EOAdaptorInsertOperator
EOAdaptorUpdateOperator
EOAdaptorDeleteOperator
EOAdaptorStoredProcedureOperator
For more information, see the discussion on adaptor operators in the class description above.
setAttributes:
- (void)setAttributes:(NSArray
*)attributes
EOAdaptorLockOperator
.setChangedValues:
- (void)setChangedValues:(NSDictionary
*)changedValues
Operator | Contents of changedValues Dictionary |
EOAdaptorLockOperator |
Snapshot values used to verify that the database row hasn't changed since this application last fetched it |
EOAdaptorInsertOperator |
The values to insert |
EOAdaptorUpdateOperator |
The new values for the columns to update |
EOAdaptorDeleteOperator |
Snapshot values (changedValues is
only valid for EOAdaptorDeleteOperator if
the receiver's entity uses a stored procedure to perform delete
operations.) |
EOAdaptorStoredProcedureOperator |
Snapshot values |
setException:
- (void)setException:(NSException
*)exception
setQualifier:
- (void)setQualifier:(EOQualifier
*)qualifier
setStoredProcedure:
- (void)setStoredProcedure:(EOStoredProcedure
*)storedProcedure
storedProcedure
- (EOStoredProcedure *)storedProcedure
EOAdaptorStoredProcedureOperator
.