Skip to content
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

SCRUM-4667 make AgmAgmAssociation live under the general AgmAssociati… #1816

Open
wants to merge 9 commits into
base: alpha
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ public void process(BulkLoadFileHistory bulkLoadFileHistory, Boolean cleanUp) th
if (loadType == AGM_ASSOCIATION || loadType == FULL_INGEST) {
agmStrAssociationExecutor.execLoad(bulkLoadFileHistory, cleanUp);
agmAlleleAssociationExecutor.execLoad(bulkLoadFileHistory, cleanUp);
}
if (loadType == AGM_AGM_ASSOCIATION || loadType == FULL_INGEST) {
agmAgmAssociationExecutor.execLoad(bulkLoadFileHistory, cleanUp);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public class AffectedGenomicModel extends GenomicEntity {
"agmAssociationObject.secondaryIdentifiers",
"agmAssociationObject.secondaryIdentifiers_keyword"
})
@OneToMany(mappedBy = "agmAssociationObject", cascade = CascadeType.ALL, orphanRemoval = true)
@OneToMany(mappedBy = "agmAgmAssociationObject", cascade = CascadeType.ALL, orphanRemoval = true)
@JsonView({View.FieldsAndLists.class, View.AffectedGenomicModelDetailView.class})
private List<AgmAgmAssociation> agmAgmObjectAssociations;
cmpich marked this conversation as resolved.
Show resolved Hide resolved

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ public class AgmAgmAssociation extends Association {
@ManyToOne
@JsonView({View.FieldsOnly.class})
@JsonIgnoreProperties({"agmAgmAssociations", "agmAgmObjectAssociations", "agmSequenceTargetingReagentAssociations"})
private AffectedGenomicModel agmAssociationObject;
private AffectedGenomicModel agmAgmAssociationObject;
}
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ private void addAssociationToAgm(AgmAgmAssociation association) {
}

private void addAssociationToStr(AgmAgmAssociation association) {
AffectedGenomicModel str = association.getAgmAssociationObject();
AffectedGenomicModel str = association.getAgmAgmAssociationObject();
List<AgmAgmAssociation> currentAssociations = str.getAgmAgmAssociations();
if (currentAssociations == null) {
currentAssociations = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ public AgmAgmAssociation validateAgmAgmAssociationDTO(AgmAgmAssociationDTO dto,
}
}

if (association.getAgmAssociationObject() == null && !StringUtils.isBlank(dto.getAgmObjectIdentifier())) {
if (association.getAgmAgmAssociationObject() == null && !StringUtils.isBlank(dto.getAgmObjectIdentifier())) {

AffectedGenomicModel object = agmService.findByIdentifierString(dto.getAgmObjectIdentifier());
if (object == null) {
response.addErrorMessage("agm_object_identifier", ValidationConstants.INVALID_MESSAGE + " (" + dto.getAgmObjectIdentifier() + ")");
} else if (beDataProvider != null && !object.getDataProvider().getAbbreviation().equals(beDataProvider.sourceOrganization)) {
response.addErrorMessage("agm_object_identifier", ValidationConstants.INVALID_MESSAGE + " for " + beDataProvider.name() + " load (" + dto.getAgmObjectIdentifier() + ")");
} else {
association.setAgmAssociationObject(object);
association.setAgmAgmAssociationObject(object);
}
}
association = validateAuditedObjectDTO(association, dto);
Expand Down
Loading