The method getAccPropertyMinMax() in DbManager has seven arguments:
tree
propDef
acc
subset
subtreeCumulative
removeVirtualRoot
includeMoleculeData
If propDef is a scaffold property and subtreeCumulative is set to false, removeVirtualRoot and acc are not used by the implementation in DbManagerHibernate. There are similiar combinations where some parameters are not used depending on the value of other parameters. Perhaps includeMoleculeData is not used for scaffold properties which is however mentioned in the method's documentation. It is also not allowed to set the subset to null and perform the requestedoperation on the whole dataset, which makes it impossible to use this method when no subset is present.
In feature #10 this method is used and modified, so it is blocked by this ticket.
please fix this issues in a complete manner first, you can then rely on a solid implementation in FR 10
Diff:
The following table shows the results of further analysis. Empty cells mean that the parameter is not used in this case.
Last edit: Philipp Mewes 2018-04-04
Diff:
Added the new method getScaffoldPropertyMinMax() to the DatabaseManager for the following reasons ([c53d9f]):
If the minimum/maximum of a scaffold property is required the respective call is getAccPropertyMinMax(tree, scafProp, null, false, false, false). In this case three parameters are not used, especially the parameter acc for the AccumulationFunction(see feature #10). This is a bit misleading, since the method that calculates an accumulated value does not apply any accumulation in this case.
The new method is called by getAccPropertyMinMax() anyway to maintain compatibilty with other calls.
Related
Commit: [c53d9f]
Last edit: Philipp Mewes 2018-04-25
Please have a look, if this solution is sufficient. I also tried an approach with splitting the method into two variants, one for molecules and one for scaffolds, but i wasn't content with that.
As discussed in the meeting i removed the new methods([e5d05f]) and updated the javadoc comment ([b782e1]).
Related
Commit: [b782e1]
Commit: [e5d05f]