PATH
Documentation > WebObjects 4.5 >
EOAccess Reference
(informal protocol)
Declared in: EOAccess/EOAdaptorContext.h
Protocol Description
EOAdaptorContext sends messages to its delegate for any transaction
begin, commit, or rollback. The delegate can use these methods to
preempt these operations, modify their results, or simply track activity.
Instance Methods
- (void)adaptorContextDidBegin:context
Invoked from beginTransaction to tell the delegate
that a transaction has begun.
- (void)adaptorContextDidCommit:context
Invoked from commitTransaction to
tell the delegate that a transaction has been committed.
- (void)adaptorContextDidRollback:context
Invoked from rollbackTransaction to
tell the delegate that a transaction has been rolled back.
- (BOOL)adaptorContextShouldBegin:context
Invoked from beginTransaction to tell the delegate
that context is beginning a transaction.
If this method returns NO, the adaptor context does not begin a
transaction. Return YES to allow the adaptor context to begin a
transaction.
- (BOOL)adaptorContextShouldCommit:context
Invoked from commitTransaction to
tell the delegate that context is
committing a transaction. If this method returns NO, the adaptor
context does not commit the transaction. Return YES to allow the adaptor
context to commit.
Note that if you implement this delegate method to return NO,
your delegate must perform the database COMMIT itself; the rest
of the Enterprise Objects Framework assumes that the commit has
taken place. adaptorContextShouldCommit: doesn't
specify whether or not the commit should take place; it only specifies
whether or not the adaptor context should do it for you.
- (BOOL)adaptorContextShouldConnect:context
Invoked before the adaptor attempts to connect.
The delegate can return NO if it wants to override the connect, YES if
it wants the adaptor to attempt to connect in the usual way. The
delegate should raise an exception if it fails to connect.
- (BOOL)adaptorContextShouldRollback:context
Invoked from rollbackTransaction to
tell the delegate that context is
rolling back a transaction. If this method returns NO, the adaptor
context does not roll back the transaction. Return YES to allow
the adaptor context to roll back.