[ZODB-Dev] know the state of an object

Victor Safronovich vsafronovich at naumen.ru
Thu Oct 20 02:13:01 EDT 2005


Hello Dieter Maurer,

Thursday, October 20, 2005, 1:53:35 AM, you wrote:

DM> Victor Safronovich wrote at 2005-10-18 13:18 +0600:
>> ...
>>   May be usefull to add some simple workflow to Persistent class with
>>   states:
>>       GHOST
>>       UPTODATE
>>       CHANGED
>>       STICKY
>>   transitions:

DM> Most of the transitions are there (though through strange names)
   The main idea was to add many hooks to persistent object,

   for example
   >>>obj._p_state
   GHOST
   >>>obj._p_change_state( UPTODATE )
   this call
   1.obj._p_before_activate()
   2.obj._p_activate()
   3.obj._p_after_activate()

>>>       invalidate

DM> I think, this is not easily available, but
DM> "obj._p_changed = None" might work
    What about obj._p_invalidate()?

-- 
Best regards,
 Victor Safronovich
 NauMen.NauDoc.SoftwareDeveloper  http://www.naumen.ru



More information about the ZODB-Dev mailing list