-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Joel/vo records #9110
base: main
Are you sure you want to change the base?
Joel/vo records #9110
Conversation
ab38a0f
to
62bcbe8
Compare
@@ -562,7 +562,8 @@ public int hashCode() { | |||
wgsLongReadsJointVcfGRCh38, | |||
wgsLongReadsJointVcfT2T, | |||
publicReleaseNumber, | |||
vwbTemplateId); | |||
vwbTemplateId, | |||
publicReleaseNumber); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing
@@ -587,10 +588,10 @@ public boolean equals(Object o) { | |||
&& Objects.equals(wgsBigqueryDataset, that.wgsBigqueryDataset) | |||
&& Objects.equals(wgsFilterSetName, that.wgsFilterSetName) | |||
&& Objects.equals(hasFitbitData, that.hasFitbitData) | |||
&& Objects.equals(hasCopeSurveyData, that.hasCopeSurveyData) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to use the ordering we have elsewhere
|
||
// used for JSON parsing of cdr_config_*.json | ||
// adapted from DbAccessTier | ||
public record AccessTierConfig( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
convert these from "Value Objects" to records, which enforce that all fields are considered on creation - though they can be null
@Mapper( | ||
config = MapStructConfig.class, | ||
uses = {CommonMappers.class, DbStorageEnums.class}) | ||
public interface CdrConfigMapper { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was CdrConfigVOMapper
@Mapping(source = "accessTier", target = "accessTier", qualifiedByName = "toDbTierByShortName") | ||
DbCdrVersion toDbVersion(CdrVersionConfig localVersion, @Context AccessTierDao accessTierDao); | ||
|
||
@Named("toDbTierByShortName") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was an @AfterMapper
in the previous version. I think this is clearer.
hasFitbitData, | ||
hasCopeSurveyData, | ||
hasFitbitSleepData, | ||
null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO. we were missing a lot of newer params in this test.
Not adding them here, to demonstrate that this is just a translation of the original and also to show that these can be null. I'll come back for this later.
PR checklist
[risk=no|low|moderate|severe]
in the PR title as outlined in CONTRIBUTING.md.