use of uk.ac.ebi.spot.goci.model.DiseaseTrait in project goci by EBISPOT.
the class OldDiseaseTraitController method viewDiseaseTraitToDelete.
// Delete a disease trait
@RequestMapping(value = "/{diseaseTraitId}/delete", produces = MediaType.TEXT_HTML_VALUE, method = RequestMethod.GET)
public String viewDiseaseTraitToDelete(Model model, @PathVariable Long diseaseTraitId) {
DiseaseTrait diseaseTraitToView = diseaseTraitRepository.findOne(diseaseTraitId);
Collection<Study> studiesLinkedToTrait = studyRepository.findByDiseaseTraitId(diseaseTraitId);
model.addAttribute("studies", studiesLinkedToTrait);
model.addAttribute("totalStudies", studiesLinkedToTrait.size());
model.addAttribute("diseaseTrait", diseaseTraitToView);
return "delete_disease_trait";
}
use of uk.ac.ebi.spot.goci.model.DiseaseTrait in project goci by EBISPOT.
the class DiseaseTraitLogAspect method createDiseaseTraitLogs.
@Around("createDiseaseTrait()")
public Object createDiseaseTraitLogs(ProceedingJoinPoint joinPoint) throws Throwable {
long start = timeNow();
List<Object> arguments = Arrays.asList(joinPoint.getArgs());
log.info("Creating {}: {}", EntityType.DISEASE_TRAIT, arguments);
DiseaseTrait diseaseTrait = (DiseaseTrait) joinPoint.proceed();
log.info("{} created: {} in {}s", EntityType.DISEASE_TRAIT, diseaseTrait.getId(), timeNow() - start);
return diseaseTrait;
}
Aggregations