#NEWLINE# def per_state_dependencies( self , uow , save_parent , delete_parent , child_action , after_save , before_delete , isdelete , childisdelete ) : #NEWLINE# #INDENT# if before_delete . post_update : #NEWLINE# #INDENT# if ( not isdelete ) : #NEWLINE# #INDENT# parent_post_updates = unitofwork . IssuePostUpdate ( uow , self . parent . primary_base_mapper , False ) #NEWLINE# if childisdelete : #NEWLINE# #INDENT# uow . dependencies . update ( [ ( after_save , parent_post_updates ) , ( parent_post_updates , child_action ) ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# uow . dependencies . update ( [ ( save_parent , after_save ) , ( child_action , after_save ) , ( after_save , parent_post_updates ) ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# parent_pre_updates = unitofwork . IssuePostUpdate ( uow , self . parent . primary_base_mapper , True ) #NEWLINE# uow . dependencies . update ( [ ( before_delete , parent_pre_updates ) , ( parent_pre_updates , delete_parent ) , ( parent_pre_updates , child_action ) ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( not isdelete ) : #NEWLINE# #INDENT# if ( not childisdelete ) : #NEWLINE# #INDENT# uow . dependencies . update ( [ ( child_action , after_save ) , ( after_save , save_parent ) ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# uow . dependencies . update ( [ ( after_save , save_parent ) ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if childisdelete : #NEWLINE# #INDENT# uow . dependencies . update ( [ ( delete_parent , child_action ) ] )