BI-1612 - Experiment Import Phenotype Data Persistence#220
BI-1612 - Experiment Import Phenotype Data Persistence#220nickpalladino merged 13 commits intodevelopfrom
Conversation
timparsons
left a comment
There was a problem hiding this comment.
I need to test the code still, but had two minor questions
| } | ||
|
|
||
| private String createObservationUnitKey(ExperimentObservation importRow) { | ||
| private static String createObservationUnitKey(ExperimentObservation importRow) { |
There was a problem hiding this comment.
Why was this changed to be static?
There was a problem hiding this comment.
Think I just changed it when I was in there in line with the rationale in the following comment.
| private static String getImportObservationHash(ExperimentObservation importRow, String variableName) { | ||
| // TODO: handle timestamps once we support them | ||
| return getObservationHash(createObservationUnitKey(importRow), variableName, importRow.getEnv()); | ||
| } | ||
|
|
||
| //TODO: Add timestamp parameter once we support them | ||
| private static String getObservationHash(String observationUnitName, String variableName, String studyName) { | ||
| String concat = DigestUtils.sha256Hex(observationUnitName) + | ||
| DigestUtils.sha256Hex(variableName) + | ||
| DigestUtils.sha256Hex(studyName); | ||
| return DigestUtils.sha256Hex(concat); | ||
| } | ||
|
|
There was a problem hiding this comment.
Why are these methods static?
There was a problem hiding this comment.
I had them as static in the old ObservationProcessor and just brought that over because there is no dependence on the class instance.
There was a problem hiding this comment.
Gotcha. I'd recommend removing the static modifier to avoid any potential weirdness going between an instance of a class and a static method outside of the object
Description
Story: BI-1612
Dependencies
Testing
Checklist: