Home | Trees | Index | Help |
|
---|
Package Modeling :: Module FaultHandler :: Class AccessGenericFaultHandler |
|
FaultHandler
--+
|
AccessGenericFaultHandler
AccessArrayFaultHandler
,
AccessFaultHandler
This is an abstract class providing the following capabilities:
- it provides the faults the ability to be chained/grouped together. Note: this is not used in the framework yet, but it will!
- It also specifies a generic API based on the fact that this sort of FaultHandlers is based on the "Access Layer", i.e. uses a 'DatabaseContext' and an 'EditingContext' to fetch the datas from an external store/database.
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 | |
---|---|
Abstract method implemented by subclasses to populate 'anObject' | |
Returns the 'DatabaseContext' object the fault handler uses to fetch data rows from a database. | |
Returns the underlying EditingContext --see _setContext(). | |
Removes itself from the chain of handlers | |
Return the ``generation'' of the fault --see: 'linkAfterHandler()'. | |
Adds the FaultHandler to the chain ended by 'anAccessGenericFaultHandler'. | |
Returns the successor of 'self' in the chain, or None. | |
Returns the predecessor of 'self' in the chain, or None | |
Automatically called when the EditingContext the FaultHandler (weak-) references is deleted ; simply removes itself from the chain of handlers. | |
Removes itself from the chain. | |
Initializes the AccessGenericFaultHandler ; subclasses typically call this method in their '__init__()' method. | |
Inherited from FaultHandler | |
|
Class Variable Summary | |
---|---|
NoneType |
_dbContext = None |
int |
_generation = 0 |
NoneType |
_next = None |
NoneType |
_previous = None |
NoneType |
_weakref_ec = None |
Method Details |
---|
completeInitializationOfObject(self, anObject)Abstract method implemented by subclasses to populate 'anObject' Parameter:
|
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. |
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:
|
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. |
_handleECDeletion(self, ref)Automatically called when the EditingContext the FaultHandler (weak-) references is deleted ; simply removes itself from the chain of handlers. You should not call this method directly, nor should it be overriden. See also: linkAfterHandler() |
_removeSelfFromChain(self)Removes itself from the chain. You should never call this method, it is automatically called when necessary. Subclasses should not override this method. See: faultWillFire() |
_setContext(self, aDatabaseContext, anEditingContext)Initializes the AccessGenericFaultHandler ; subclasses typically call this method in their '__init__()' method. Parameters:
|
Class Variable Details |
---|
_dbContext
|
_generation
|
_next
|
_previous
|
_weakref_ec
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Mar 4 13:36:23 2006 | http://epydoc.sf.net |