Package Modeling :: Module FaultHandler :: Class AccessGenericFaultHandler
[show private | hide private]
[frames | no frames]

Class AccessGenericFaultHandler

FaultHandler --+
               |
              AccessGenericFaultHandler

Known Subclasses:
AccessArrayFaultHandler, AccessFaultHandler

This is an abstract class providing the following capabilities:

Implementation notes:

!!! DatabaseContext: should be the right one (not the original but the one that is responsible for the object). Maybe this can be checked somewhere TBD

Subclasses must use the '_setContext()' method to initialize the AccessGenericFaultHandler (typically it will be called in '__init__()')


Method Summary
  completeInitializationOfObject(self, anObject)
Abstract method implemented by subclasses to populate 'anObject'
  databaseContext(self)
Returns the 'DatabaseContext' object the fault handler uses to fetch data rows from a database.
  editingContext(self)
Returns the underlying EditingContext --see _setContext().
  faultWillFire(self, anObject)
Removes itself from the chain of handlers
  generation(self)
Return the ``generation'' of the fault --see: 'linkAfterHandler()'.
  linkAfterHandler(self, anAccessGenericFaultHandler, generation)
Adds the FaultHandler to the chain ended by 'anAccessGenericFaultHandler'.
  next(self)
Returns the successor of 'self' in the chain, or None.
  previous(self)
Returns the predecessor of 'self' in the chain, or None
    Inherited from FaultHandler
  targetClass(self)

Method Details

completeInitializationOfObject(self, anObject)

Abstract method implemented by subclasses to populate 'anObject'

Parameter:

anObject -- an object implementing the 'Faulting' interface. Within the
framework, it is typically a 'DatabaseObject'
Overrides:
Modeling.FaultHandler.FaultHandler.completeInitializationOfObject

databaseContext(self)

Returns the 'DatabaseContext' object the fault handler uses to fetch data rows from a database.

See also: 'editingContext()'

editingContext(self)

Returns the underlying EditingContext --see _setContext().

Return value may be None if unset or if the underlying editing context has been garbage-collected (NB: the latter case should not actually happen since an object/fault ``belonging'' to a garbage-collected/deleted EditingContext should normally _not_ be hold elsewhere).

faultWillFire(self, anObject)

Removes itself from the chain of handlers

Subclasses can override this method ; if they do, their implementation must call this implementation.

Overrides:
Modeling.FaultHandler.FaultHandler.faultWillFire

generation(self)

Return the ``generation'' of the fault --see: 'linkAfterHandler()'.

linkAfterHandler(self, anAccessGenericFaultHandler, generation=None)

Adds the FaultHandler to the chain ended by 'anAccessGenericFaultHandler'.

'self' should not have any predecessor, neither 'anAccessGenericFaultHandler' should have any successor in the chain.

NB: Chaining fault handlers is not used in the framework yet.

Parameters:

self -- an AccessGenericFaultHandler for which 'previous()' answers None

anAccessGenericFaultHandler -- an AccessGenericFaultHandler for which 'next()' returns None

generation -- a float indicating when the fault was created. If it is omitted or 'None', it defaults to 'time.time()'

next(self)

Returns the successor of 'self' in the chain, or None.

NB: Chaining fault handlers is not used in the framework yet.

previous(self)

Returns the predecessor of 'self' in the chain, or None

NB: Chaining fault handlers is not used in the framework yet.


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