Documentation Archive Developer
Search
PATH  WebObjects 4.0 Documentation > EOAccess Reference



EOAdaptorChannelDelegate

Adopted By:
EOAdaptorChannel delegate objects

Declared in: EOAccess/EOAdaptorChannel.h

Protocol Description

EOAdaptorChannel sends messages to its delegate for nearly every operation that would affect data in the database server. The delegate can use these methods to preempt these operations, modify their results, or simply track activity.


Instance Methods


adaptorChannelDidChangeResultSet:

- (void)adaptorChannelDidChangeResultSet:(id)channel

Invoked from fetchRowWithZone: when a select operation resulted in multiple result sets. This method tells the delegate that the next invocation of fetchRowWithZone: will fetch from the next result set. This method is invoked when fetchRowWithZone: returns nil and there are still result sets left to fetch. The delegate can invoke setAttributesToFetch: to prepare for fetching the new rows.


adaptorChannel:didEvaluateExpression:

- (void)adaptorChannel:(id)channel
didEvaluateExpression:(EOSQLExpression *)expression

Invoked from evaluateExpression: to tell the delegate that a query language expression has been evaluated by the database server.


adaptorChannel:didExecuteStoredProcedure:withValues:

- (void)adaptorChannel:(id)channel
didExecuteStoredProcedure:(EOStoredProcedure *)procedure
withValues:(NSDictionary *)values

Invoked from executeStoredProcedure:withValues: after procedure is executed successfully.


adaptorChannel:didFetchRow:

- (void)adaptorChannel:(id)channel didFetchRow:(NSMutableDictionary *)row

Invoked from fetchRowWithZone: after a row is fetched successfully. This method is not invoked if an exception occurs during the fetch or if the same returns nil because there are no more rows in the current result set. The delegate may modify row, which will be returned from fetchRowWithZone:.


adaptorChannelDidFinishFetching:

- (void)adaptorChannelDidFinishFetching:(id)channel

Invoked from fetchRowWithZone: to tell the delegate that fetching is finished for the current select operation. This method is invoked when a fetch ends in fetchRowWithZone: because there are no more result sets.


adaptorChannel:didPerformOperations:exception:

- (NSException *)adaptorChannel:(id)channel
didPerformOperations:(NSArray *)operations
exception:(NSException *)exception

Invoked from performAdaptorOperations:. exception is nil if no exception was raised while operations were performed. Otherwise, exception is the raised exception. The delegate can return the same or a different exception, which is re-raised by performAdaptorOperations:, or it can return nil to prevent the adaptor channel from raising an exception.


adaptorChannel:didSelectAttributes:fetchSpecification:lock:entity:

- (void)adaptorChannel:(id)channel
didSelectAttributes:(NSArray *)attributes
fetchSpecification:(EOFetchSpecification *)fetchSpecification
lock:(BOOL)flag
entity:(EOEntity *)entity

Invoked from selectAttributes:fetchSpecification:lock:entity: to tell the delegate that rows have been selected in the database server.


adaptorChannelShouldConstructStoredProcedureReturnValues:

- (NSDictionary *)adaptorChannelShouldConstructStoredProcedureReturnValues:(id)channel

Invoked from returnValuesForLastStoredProcedureInvocation to tell the delegate that channel is constructing return values for the last stored procedure evaluated. If the delegate returns a value other than nil, that value will be returned immediately from returnValuesForLastStoredProcedureInvocation.


adaptorChannel:shouldEvaluateExpression:

- (BOOL)adaptorChannel:(id)channel
shouldEvaluateExpression:(EOSQLExpression *)expression

Invoked from evaluateExpression: to tell the delegate that channel is sending an expression to the database server. The delegate returns YES to permit the adaptor channel to send expression to the server. If the delegate returns NO, the adaptor channel does not send the expression and returns immediately. When the delegate returns NO, the adaptor channel expects that the implementor of the delegate has done the work that evaluateExpression: would have done. The delegate can create a new EOSQLExpression and send the expression itself before returning NO.


adaptorChannel:shouldExecuteStoredProcedure:withValues:

- (NSDictionary *)adaptorChannel:(id)channel
shouldExecuteStoredProcedure:(EOStoredProcedure *)procedure
withValues:(NSDictionary *)values

Invoked from executeStoredProcedure:withValues: to tell the delegate that channel is executing a stored procedure. If the delegate returns a value other than nil, that value is used as the arguments to the stored procedure instead of values.


adaptorChannel:shouldReturnValuesForStoredProcedure:

- (NSDictionary *)adaptorChannel:(id)channel
shouldReturnValuesForStoredProcedure:(NSDictionary *)returnValues

Invoked from returnValuesForLastStoredProcedureInvocation to tell the delegate that channel is returning values for a stored procedure. If the delegate returns a value other than nil, that value is returned from returnValuesForLastStoredProcedureInvocation instead of returnValues.


adaptorChannel:shouldSelectAttributes:fetchSpecification:lock:entity:

- (BOOL)adaptorChannel:(id)channel
shouldSelectAttributes:(NSArray *)attributes
fetchSpecification:(EOFetchSpecification *)fetchSpecification
lock:(BOOL)flag
entity:(EOEntity *)entity

Invoked from selectAttributes:fetchSpecification:lock:entity: to ask the delegate whether a select operation should be performed. The delegate should not modify fetchSpecification. Instead, if the delegate wants to perform a different select it should invoke selectAttributes:fetchSpecification:lock:entity: itself with a new fetch specification, and return NO (indicating that the adaptor channel should not perform the select itself).


adaptorChannelWillFetchRow:

- (void)adaptorChannelWillFetchRow:(id)channel

Invoked from fetchRowWithZone: to tell the delegate that a single row will be fetched. The delegate can determine the attributes used by the fetch by sending attributesToFetch to channel, and can change the set of attributes to fetch by sending setAttributesToFetch: to channel. The adaptor channel performs the actual fetch.


adaptorChannel:willPerformOperations:

- (NSArray *)adaptorChannel:(id)channel willPerformOperations:(NSArray *)operations

Invoked from performAdaptorOperations: to tell the delegate that channel is performing the EOAdaptorOperations in operations. The delegate may return operations or a different NSArray for the adaptor channel to perform. If the delegate returns nil, the adaptor channel does not perform the operations and returns from the method immediately.





Copyright © 1998, Apple Computer, Inc. All rights reserved.