PATH
Documentation > WebObjects 4.5 >
EOAdaptor Reference
(informal interface)
Package:
com.apple.yellow.eoaccess
Interface 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
public abstract void adaptorContextDidBegin(Object context)
Invoked from beginTransaction to tell the delegate
that a transaction has begun.
public abstract void adaptorContextDidCommit(Object context)
Invoked from commitTransaction to
tell the delegate that a transaction has been committed.
public abstract void adaptorContextDidRollback(Object context)
Invoked from rollbackTransaction to
tell the delegate that a transaction has been rolled back.
public abstract boolean adaptorContextShouldBegin(Object context)
Invoked from beginTransaction to tell the delegate
that context is beginning a transaction.
If this method returns false, the adaptor context does not begin
a transaction. Return true to allow the adaptor context to begin
a transaction.
public abstract boolean adaptorContextShouldCommit(Object context)
Invoked from commitTransaction to
tell the delegate that context is
committing a transaction. If this method returns false, the adaptor
context does not commit the transaction. Return true to allow the adaptor
context to commit.
Note that if you implement this delegate method to return false,
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.
public abstract boolean adaptorContextShouldConnect(Object context)
Invoked before the adaptor attempts to connect.
The delegate can return false if it wants to override the connect, true if
it wants the adaptor to attempt to connect in the usual way. The
delegate should throw an exception if it fails to connect.
public abstract boolean adaptorContextShouldRollback(Object context)
Invoked from rollbackTransaction to
tell the delegate that context is
rolling back a transaction. If this method returns false, the adaptor
context does not roll back the transaction. Return true to allow
the adaptor context to roll back.