| 
 | WebObjects 5.4.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public static interface EOAdaptorContext.Delegate
EOAdaptorContext invokes its delegate any time a transaction is begun, committed, or rolled back. The delegate can use these methods to preempt these operations, modify their results, or simply track activity.
| Method Summary | |
|---|---|
|  void | adaptorContextDidBegin(EOAdaptorContext adaptorContext)Invoked from beginTransactionortransactionDidBeginto tell the delegate that a transaction has begun. | 
|  void | adaptorContextDidCommit(EOAdaptorContext adaptorContext)Invoked from commitTransactionortransactionDidCommitto tell the delegate that a transaction has been committed. | 
|  void | adaptorContextDidRollback(EOAdaptorContext adaptorContext)Invoked from rollbackTransactionortransactionDidRollbackto tell the delegate that a transaction has been rolled back. | 
|  boolean | adaptorContextShouldBegin(EOAdaptorContext adaptorContext)Invoked from beginTransactionto ask the delegate whether the adaptor contextobjectshould begin a transaction. | 
|  boolean | adaptorContextShouldCommit(EOAdaptorContext adaptorContext)Invoked from commitTransactionto ask the delegate whether or not to commit a transaction. | 
|  boolean | adaptorContextShouldConnect(EOAdaptorContext adaptorContext)Invoked before the adaptor attempts to connect. | 
|  boolean | adaptorContextShouldRollback(EOAdaptorContext adaptorContext)Invoked from rollbackTransactionto ask the delegate whether or not to roll back a transaction. | 
| Method Detail | 
|---|
boolean adaptorContextShouldConnect(EOAdaptorContext adaptorContext)
false if it wants to override the connect operation, true if it wants the adaptor to attempt to connect in the usual way. Should throw a runtime exception if it fails to connect.
adaptorContext - An adaptor context object.
true to permit the adaptor to attempt to connect.boolean adaptorContextShouldBegin(EOAdaptorContext adaptorContext)
beginTransaction to ask the delegate whether the adaptor context object should begin a transaction. The delegate should return true to allow the adaptor context to begin a transaction, false to prevent the
 transaction. If the delegate returns false, it is the delegate's responsibility to handle the transaction state. It might start its own transaction or it might return false from adaptorContextShouldCommit in order to control the transaction in
 a private way.
adaptorContext - An adaptor context object.
true to allow the adaptor context to begin a transaction.EOAdaptorContext.beginTransaction(), 
EOAdaptorContext.Delegate.adaptorContextShouldCommit(com.webobjects.eoaccess.EOAdaptorContext)void adaptorContextDidBegin(EOAdaptorContext adaptorContext)
beginTransaction or transactionDidBegin to tell the delegate that a transaction has begun. The delegate may take whatever action it needs based on this information.
adaptorContext - An adaptor context object.EOAdaptorContext.beginTransaction(), 
EOAdaptorContext.transactionDidBegin()boolean adaptorContextShouldCommit(EOAdaptorContext adaptorContext)
commitTransaction to ask the delegate whether or not to commit a transaction. If this method returns false, the adaptor context does not commit the transaction; the delegate must perform the database COMMIT itself.
adaptorContext - An adaptor context object.
true to allow the adaptor context to commit.EOAdaptorContext.commitTransaction(), 
EOAdaptorContext.Delegate.adaptorContextShouldBegin(com.webobjects.eoaccess.EOAdaptorContext)void adaptorContextDidCommit(EOAdaptorContext adaptorContext)
commitTransaction or transactionDidCommit to tell the delegate that a transaction has been committed. The delegate may take whatever action it needs based on this information.
adaptorContext - An adaptor context object.EOAdaptorContext.commitTransaction(), 
EOAdaptorContext.transactionDidCommit()boolean adaptorContextShouldRollback(EOAdaptorContext adaptorContext)
rollbackTransaction to ask the delegate whether or not to roll back a transaction. Should return true to allow the adaptor context object to roll back the transaction, false to prevent the rollback.
adaptorContext - An adaptor context object.
true to allow the adaptor context to roll back the transaction.EOAdaptorContext.rollbackTransaction()void adaptorContextDidRollback(EOAdaptorContext adaptorContext)
rollbackTransaction or transactionDidRollback to tell the delegate that a transaction has been rolled back. The delegate may take whatever action it needs based on this information.
adaptorContext - An adaptor context object.EOAdaptorContext.rollbackTransaction(), 
EOAdaptorContext.transactionDidRollback()| 
 | Last updated June 2008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||