Documentation Archive Developer
Search
PATH  Documentation > WebObjects 4.5 > EOAccess Reference

Table of Contents

EOAdaptor Delegate


(informal protocol)
Declared in: EOAccess/EOAdaptor.h


Protocol Description


The delegate for EOAdaptor can implement the method adaptor:fetchedValueForValue:attribute: to perform a database-specific transformations on a value.



Instance Methods



adaptor:fetchedValueForValue:attribute:

- (id)adaptor:(EOAdaptor *)adaptor fetchedValueForValue:(id)value attribute:(EOAttribute *)attribute

Invoked from fetchedValueForValue:attribute: to allow the delegate to perform a database-specific transformation on value. The delegate should return the value that the adaptor's database server would ultimately store for value if it was inserted or updated in the column described by attribute.

Ordinarily, fetchedValueForValue:attribute: invokes one of the type-specific fetchedValue... methods depending on the type of value. If you implement this delegate method, fetchedValueForValue:attribute: does not invoke the other fetchedValue... methods. It simply invokes your delegate method and returns the value returned from it. Therefore, an implementation of adaptor:fetchedValueForValue:attribute: must handle values of all types.



reconnectionDictionaryForAdaptor:

- (NSDictionary *)reconnectionDictionaryForAdaptor:(EOAdaptor *)adaptor

Invoked from handleDroppedConnection to provides a new connection dictionary for reconnection attempts. If the adaptor's database connection is dropped (and the adaptor supports database reconnection), the adaptor attempts to recover by reconnecting. By default, the adaptor attempts to connect using its original connection dictionary. If you want it to connect to a different database, implement this method to return a connection dictionary for the secondary database. (Note that the secondary database should have the same data as the original.) If the delegate method is not implemented, the adaptor uses its existing connection dictionary to reconnect to the server.

See Also: - isDroppedConnectionException:




Table of Contents