Skip to content

Commit

Permalink
Update sample billing accepted fields (#1167)
Browse files Browse the repository at this point in the history
Message handler will now handle updates to fields in sample billing json:
- custodianInformation
- accessLevel

Signed-off-by: Angelica Ochoa <[email protected]>
  • Loading branch information
ao508 authored May 21, 2024
1 parent c0053c7 commit c68d381
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ public class SampleBillingJson implements Serializable {
private String billedBy;
@JsonProperty("costCenter")
private String costCenter;
@JsonProperty("custodianInformation")
private String custodianInformation;
@JsonProperty("accessLevel")
private String accessLevel;

public SampleBillingJson() {}

Expand Down Expand Up @@ -54,6 +58,22 @@ public void setCostCenter(String costCenter) {
this.costCenter = costCenter;
}

public String getCustodianInformation() {
return custodianInformation;
}

public void setCustodianInformation(String custodianInformation) {
this.custodianInformation = custodianInformation;
}

public String getAccessLevel() {
return accessLevel;
}

public void setAccessLevel(String accessLevel) {
this.accessLevel = accessLevel;
}

@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Tempo mergeMafCompleteEventBySamplePrimaryId(@Param("primaryId") String primaryI
@Query("MATCH (s: Sample)-[:HAS_METADATA]->(sm: SampleMetadata {primaryId: $billing.primaryId}) "
+ "MATCH (s)-[:HAS_TEMPO]->(t: Tempo) "
+ "SET t.billed = $billing.billed, t.billedBy = $billing.billedBy, "
+ "t.costCenter = $billing.costCenter")
+ "t.costCenter = $billing.costCenter, t.custodianInformation = $billing.custodianInformation, "
+ "t.accessLevel = $billing.accessLevel")
void updateSampleBilling(@Param("billing") SampleBillingJson billing);
}

0 comments on commit c68d381

Please sign in to comment.