|
3.2.4: 2013-12-06 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.basedb.core.DerivedBioAssay.FixDerivedBioAssayParentsRecursivelyAction
static class DerivedBioAssay.FixDerivedBioAssayParentsRecursivelyAction
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()
.
Field Summary | |
---|---|
private Set<DerivedBioAssayData> |
allModified
|
private static Map<DbControl,DerivedBioAssay.FixDerivedBioAssayParentsRecursivelyAction> |
cache
|
private DbControl |
dc
|
Constructor Summary | |
---|---|
private |
DerivedBioAssay.FixDerivedBioAssayParentsRecursivelyAction(DbControl dc)
|
Method Summary | |
---|---|
(package private) void |
add(DerivedBioAssayData dba)
Register the given derived bioassay as one that has had it's parent items changed. |
(package private) static DerivedBioAssay.FixDerivedBioAssayParentsRecursivelyAction |
get(DbControl dc)
Get an instance tht handles the fixes for the given DbControl. |
void |
onAfterCommit()
Called after a successful commit. |
void |
onBeforeCommit()
This method is called before the commit is about to happen. |
void |
onRollback()
Called after an unsuccessful commit. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static Map<DbControl,DerivedBioAssay.FixDerivedBioAssayParentsRecursivelyAction> cache
private final DbControl dc
private final Set<DerivedBioAssayData> allModified
Constructor Detail |
---|
private DerivedBioAssay.FixDerivedBioAssayParentsRecursivelyAction(DbControl dc)
Method Detail |
---|
static DerivedBioAssay.FixDerivedBioAssayParentsRecursivelyAction get(DbControl dc)
void add(DerivedBioAssayData dba)
public void onBeforeCommit()
TransactionalAction
onBeforeCommit
in interface TransactionalAction
public void onAfterCommit()
TransactionalAction
onAfterCommit
in interface TransactionalAction
public void onRollback()
TransactionalAction
onRollback
in interface TransactionalAction
|
3.2.4: 2013-12-06 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |