Class DerivedBioAssay.FixDerivedBioAssayParentsRecursivelyAction

java.lang.Object
net.sf.basedb.core.DerivedBioAssay.FixDerivedBioAssayParentsRecursivelyAction
All Implemented Interfaces:
TransactionalAction
Enclosing class:
DerivedBioAssay

static class DerivedBioAssay.FixDerivedBioAssayParentsRecursivelyAction extends Object implements TransactionalAction
Whenever we modify the parent items to a derived bioassay, we must make sure that the physical bioassays for all child items are synchronized with the same changes. This is a bit complicated due to the fact that a single transaction may affect multiple derived bioassays at different levels in the parent-child tree. The fix must be made top-down and must handle accidentally created circular references. Whenever a change is deteced a single instance of this class is associated with the DbControl. All changed derived bioassays are collected with the add(DerivedBioAssayData) method. The actual fix is done as a last step before committing the transaction onBeforeCommit().