@Test public void createMappingDetails() throws Exception { MappingDetails mappingDetails = associationOperationsService.createMappingDetails(ASS_INTER); assertThat(mappingDetails).isInstanceOf(MappingDetails.class); assertThat(mappingDetails.getMappingDate()).isToday(); assertThat(mappingDetails.getPerformer()).isEqualTo("test"); }
public MappingDetails createMappingDetails(Association association) { MappingDetails mappingDetails = new MappingDetails(); if (association.getAssociationReport() != null) { mappingDetails.setPerformer(association.getLastMappingPerformedBy()); mappingDetails.setMappingDate(association.getLastMappingDate()); mappingDetails.setAssociationErrorMap(associationMappingErrorService.createAssociationErrorMap(association.getAssociationReport())); } return mappingDetails; }
AssociationOperationsService { public MappingDetails createMappingDetails(Association association) { MappingDetails mappingDetails = new MappingDetails(); if (association.getAssociationReport() != null) { mappingDetails.setPerformer(association.getLastMappingPerformedBy()); mappingDetails.setMappingDate(association.getLastMappingDate()); mappingDetails.setAssociationErrorMap(associationMappingErrorService.createAssociationErrorMap(association.getAssociationReport())); } return mappingDetails; } }
AssociationOperationsService { public MappingDetails createMappingDetails(Association association) { MappingDetails mappingDetails = new MappingDetails(); if (association.getAssociationReport() != null) { mappingDetails.setPerformer(association.getLastMappingPerformedBy()); mappingDetails.setMappingDate(association.getLastMappingDate()); mappingDetails.setAssociationErrorMap(associationMappingErrorService.createAssociationErrorMap(association.getAssociationReport())); } return mappingDetails; } @Autowired  AssociationOperationsService(SingleSnpMultiSnpAssociationService singleSnpMultiSnpAssociationService,
                                        SnpInteractionAssociationService snpInteractionAssociationService,
                                        AssociationReportRepository associationReportRepository,
                                        AssociationRepository associationRepository,
                                        LocusRepository locusRepository,
                                        MappingService mappingService,
                                        LociAttributesService lociAttributesService,
                                        ValidationService validationService,
                                        AssociationValidationReportService associationValidationReportService,
                                        ErrorCreationService errorCreationService,
                                        @Qualifier("associationTrackingOperationServiceImpl") TrackingOperationService trackingOperationService,
                                        AssociationMappingErrorService associationMappingErrorService); }
AssociationOperationsService { public MappingDetails createMappingDetails(Association association) { MappingDetails mappingDetails = new MappingDetails(); if (association.getAssociationReport() != null) { mappingDetails.setPerformer(association.getLastMappingPerformedBy()); mappingDetails.setMappingDate(association.getLastMappingDate()); mappingDetails.setAssociationErrorMap(associationMappingErrorService.createAssociationErrorMap(association.getAssociationReport())); } return mappingDetails; } @Autowired  AssociationOperationsService(SingleSnpMultiSnpAssociationService singleSnpMultiSnpAssociationService,
                                        SnpInteractionAssociationService snpInteractionAssociationService,
                                        AssociationReportRepository associationReportRepository,
                                        AssociationRepository associationRepository,
                                        LocusRepository locusRepository,
                                        MappingService mappingService,
                                        LociAttributesService lociAttributesService,
                                        ValidationService validationService,
                                        AssociationValidationReportService associationValidationReportService,
                                        ErrorCreationService errorCreationService,
                                        @Qualifier("associationTrackingOperationServiceImpl") TrackingOperationService trackingOperationService,
                                        AssociationMappingErrorService associationMappingErrorService); List<AssociationValidationView> checkSnpAssociationFormErrors(SnpAssociationStandardMultiForm form,
                                                                         String measurementType); List<AssociationValidationView> checkSnpAssociationErrors(Association association,
                                                                         String measurementType); List<AssociationValidationView> checkSnpAssociationInteractionFormErrors(SnpAssociationInteractionForm form,
                                                                                    String measurementType); Collection<AssociationValidationView> saveAssociationCreatedFromForm(Study study,
                                                                                Association association,
                                                                                SecureUser user,
                                                                                String eRelease); Collection<AssociationValidationView> saveEditedAssociationFromForm(Study study,
                                                                               Association association,
                                                                               Long associationId,
                                                                               SecureUser user,
                                                                               String eRelease); Collection<AssociationValidationView> validateAndSaveAssociation(Study study,
                                                                               Association association,
                                                                               SecureUser user,
                                                                               String eRelease); void saveAssociation(Association association, Study study, Collection<ValidationError> errors); void runMapping(Curator curator, Association association, SecureUser user); String determineIfAssociationIsOrType(Association association); SnpAssociationForm generateForm(Association association); MappingDetails createMappingDetails(Association association); LastViewedAssociation getLastViewedAssociation(Long associationId); void approveAssociation(Association association, SecureUser user); void unapproveAssociation(Association association, SecureUser user); void createAssociationCreationEvent(Association association, SecureUser user); void deleteAssocationReport(Long associationReportId); Collection<String> getGenesIds(Collection<Locus> loci); Collection<String> getSpnsName(Collection<SingleNucleotidePolymorphism> snpsList); }
AssociationOperationsService { public MappingDetails createMappingDetails(Association association) { MappingDetails mappingDetails = new MappingDetails(); if (association.getAssociationReport() != null) { mappingDetails.setPerformer(association.getLastMappingPerformedBy()); mappingDetails.setMappingDate(association.getLastMappingDate()); mappingDetails.setAssociationErrorMap(associationMappingErrorService.createAssociationErrorMap(association.getAssociationReport())); } return mappingDetails; } @Autowired  AssociationOperationsService(SingleSnpMultiSnpAssociationService singleSnpMultiSnpAssociationService,
                                        SnpInteractionAssociationService snpInteractionAssociationService,
                                        AssociationReportRepository associationReportRepository,
                                        AssociationRepository associationRepository,
                                        LocusRepository locusRepository,
                                        MappingService mappingService,
                                        LociAttributesService lociAttributesService,
                                        ValidationService validationService,
                                        AssociationValidationReportService associationValidationReportService,
                                        ErrorCreationService errorCreationService,
                                        @Qualifier("associationTrackingOperationServiceImpl") TrackingOperationService trackingOperationService,
                                        AssociationMappingErrorService associationMappingErrorService); List<AssociationValidationView> checkSnpAssociationFormErrors(SnpAssociationStandardMultiForm form,
                                                                         String measurementType); List<AssociationValidationView> checkSnpAssociationErrors(Association association,
                                                                         String measurementType); List<AssociationValidationView> checkSnpAssociationInteractionFormErrors(SnpAssociationInteractionForm form,
                                                                                    String measurementType); Collection<AssociationValidationView> saveAssociationCreatedFromForm(Study study,
                                                                                Association association,
                                                                                SecureUser user,
                                                                                String eRelease); Collection<AssociationValidationView> saveEditedAssociationFromForm(Study study,
                                                                               Association association,
                                                                               Long associationId,
                                                                               SecureUser user,
                                                                               String eRelease); Collection<AssociationValidationView> validateAndSaveAssociation(Study study,
                                                                               Association association,
                                                                               SecureUser user,
                                                                               String eRelease); void saveAssociation(Association association, Study study, Collection<ValidationError> errors); void runMapping(Curator curator, Association association, SecureUser user); String determineIfAssociationIsOrType(Association association); SnpAssociationForm generateForm(Association association); MappingDetails createMappingDetails(Association association); LastViewedAssociation getLastViewedAssociation(Long associationId); void approveAssociation(Association association, SecureUser user); void unapproveAssociation(Association association, SecureUser user); void createAssociationCreationEvent(Association association, SecureUser user); void deleteAssocationReport(Long associationReportId); Collection<String> getGenesIds(Collection<Locus> loci); Collection<String> getSpnsName(Collection<SingleNucleotidePolymorphism> snpsList);  }