Package Modeling :: Package interfaces :: Module AdaptorContext :: Class IAdaptorContext
[show private | hide private]
[frames | no frames]

Class IAdaptorContext

Base --+
       |
      IAdaptorContext


Provided and shouldnt be overriden:
hasOpenTransaction transactionDidBegin transactionDidCommit transactionDidRollback
Should be overriden:
beginTransaction commitTransaction createAdaptorChannel rollbackTransaction

Method Summary
  __init__(self, anAdaptor)
Initializes the new AdaptorContext.
  __addChannel__(self, aChannel)
Private method ; you should never call this method --except if you are implementing a concrete AdaptorContext.
  adaptor(self)
Returns the Adaptor to which this instance is bound
  adaptorChannelDidClose(self, aChannel)
Called automatically by the AdaptorContext's channels.
  beginTransaction(self)
abstract
  channels(self)
Returns the channels created by and registered to the AdaptorContext
  commitTransaction(self)
  createAdaptorChannel(self)
Implemented by concrete AdaptorContexts to Instanciate a new concrete AdaptorChannel, adds it to the list of channels(), and returns that AdaptorChannel.
  delegate(self)
Returns the object's delegate
  handleDroppedConnection(self)
  hasBusyChannels(self)
Sends all its channels() a 'isFetchInProgress()' message ; if at least one of them returned true, the method itself returns 1 (true), otherwise returns 0 (false)
  hasOpenChannels(self)
Returns 0 (false) if none of its AdaptorChannels returned true to the 'isOpen()' message, 0 (false) otherwise
  hasOpenTransaction(self)
  rollbackTransaction(self)
  setDelegate(self, aDelegate)
Sets the object's delegate
  transactionDidBegin(self)
  transactionDidCommit(self)
  transactionDidRollback(self)

Method Details

__init__(self, anAdaptor)
(Constructor)

Initializes the new AdaptorContext.

Concrete AdaptorContexts should have no need to override this method ; if they do, this method should be called prior to any other code-statements.

__addChannel__(self, aChannel)

Private method ; you should never call this method --except if you are implementing a concrete AdaptorContext.

Concrete AdaptorContext should use this method to register the new channels it creates in 'createAdaptorChannel()' ; it should not be overriden.

adaptor(self)

Returns the Adaptor to which this instance is bound

Concrete AdaptorContexts should not override this method.

adaptorChannelDidClose(self, aChannel)

Called automatically by the AdaptorContext's channels. You should never call this method except if you implement a concrete Adaptor Layer.

If the closed channel was the last one among the registered channels() being opened, this method can choose to close its connection to the database.

Concrete implementation should specify whether it takes particular actions before closing the connection to the database server (such as committing or rolling-back any begun transactions).

See also: AdaptorChannel.closeChannel()

beginTransaction(self)

abstract

channels(self)

Returns the channels created by and registered to the AdaptorContext

Concrete AdaptorContexts should not override this method.

createAdaptorChannel(self)

Implemented by concrete AdaptorContexts to Instanciate a new concrete AdaptorChannel, adds it to the list of channels(), and returns that AdaptorChannel.

Implementation should call the private method __addChannel__() to register the newly created channel before returning it.

abstract

delegate(self)

Returns the object's delegate

hasBusyChannels(self)

Sends all its channels() a 'isFetchInProgress()' message ; if at least one of them returned true, the method itself returns 1 (true), otherwise returns 0 (false)

hasOpenChannels(self)

Returns 0 (false) if none of its AdaptorChannels returned true to the 'isOpen()' message, 0 (false) otherwise

setDelegate(self, aDelegate)

Sets the object's delegate

Generated by Epydoc 2.1 on Sat Mar 4 13:36:24 2006 http://epydoc.sf.net