@Test(expected = IllegalArgumentException.class) public void getApplicationsByCandidateDTOShouldThrowIllegalArgumentExceptionWhenCandidateDTOsIdIsNull() { CandidateDTO candidateDTO = CandidateDTO.builder().id(null).build(); applicationsService.getApplicationsByCandidateDTO(candidateDTO); }
@Transactional(readOnly = true) @Override public List<ApplicationDTO> getApplicationsByCandidateDTO(CandidateDTO candidateDTO) { Assert.notNull(candidateDTO); Assert.notNull(candidateDTO.getId()); CandidateEntity candidateEntity = candidateRepository.findOne(candidateDTO.getId()); List<ApplicationEntity> applicationEntities = applicationsRepository.findByCandidateEntity(candidateEntity); return converterService.convert(applicationEntities, ApplicationDTO.class); }
ApplicationsServiceImpl extends AbstractLogicallyDeletableService<ApplicationDTO, ApplicationEntity> implements ApplicationsService { @Transactional(readOnly = true) @Override public List<ApplicationDTO> getApplicationsByCandidateDTO(CandidateDTO candidateDTO) { Assert.notNull(candidateDTO); Assert.notNull(candidateDTO.getId()); CandidateEntity candidateEntity = candidateRepository.findOne(candidateDTO.getId()); List<ApplicationEntity> applicationEntities = applicationsRepository.findByCandidateEntity(candidateEntity); return converterService.convert(applicationEntities, ApplicationDTO.class); } }
ApplicationsServiceImpl extends AbstractLogicallyDeletableService<ApplicationDTO, ApplicationEntity> implements ApplicationsService { @Transactional(readOnly = true) @Override public List<ApplicationDTO> getApplicationsByCandidateDTO(CandidateDTO candidateDTO) { Assert.notNull(candidateDTO); Assert.notNull(candidateDTO.getId()); CandidateEntity candidateEntity = candidateRepository.findOne(candidateDTO.getId()); List<ApplicationEntity> applicationEntities = applicationsRepository.findByCandidateEntity(candidateEntity); return converterService.convert(applicationEntities, ApplicationDTO.class); } @Autowired  ApplicationsServiceImpl(
      ApplicationsRepository applicationRepository,
      StatesHistoryService statesHistoryService,
      CandidateRepository candidateRepository,
      ConverterService converterService); }
ApplicationsServiceImpl extends AbstractLogicallyDeletableService<ApplicationDTO, ApplicationEntity> implements ApplicationsService { @Transactional(readOnly = true) @Override public List<ApplicationDTO> getApplicationsByCandidateDTO(CandidateDTO candidateDTO) { Assert.notNull(candidateDTO); Assert.notNull(candidateDTO.getId()); CandidateEntity candidateEntity = candidateRepository.findOne(candidateDTO.getId()); List<ApplicationEntity> applicationEntities = applicationsRepository.findByCandidateEntity(candidateEntity); return converterService.convert(applicationEntities, ApplicationDTO.class); } @Autowired  ApplicationsServiceImpl(
      ApplicationsRepository applicationRepository,
      StatesHistoryService statesHistoryService,
      CandidateRepository candidateRepository,
      ConverterService converterService); @Transactional(readOnly = true) @Override List<ApplicationDTO> getApplicationsByCandidateDTO(CandidateDTO candidateDTO); @Transactional(readOnly = true) @Override PagingResponse<CandidateApplicationDTO> getApplicationsByCandidateId(
      Long candidateId,
      int page,
      int size); @Transactional @Override void deleteApplicationsByCandidateDTO(CandidateDTO candidateDTO); @Transactional(readOnly = true) @Override ApplicationDTO getApplicationDtoById(Long applicationId); @Transactional @Override Long saveOrUpdate(ApplicationDTO applicationDTO); @Transactional @Override Long saveApplication(ApplicationDTO applicationDTO, StateHistoryDTO stateHistoryDTO); }
ApplicationsServiceImpl extends AbstractLogicallyDeletableService<ApplicationDTO, ApplicationEntity> implements ApplicationsService { @Transactional(readOnly = true) @Override public List<ApplicationDTO> getApplicationsByCandidateDTO(CandidateDTO candidateDTO) { Assert.notNull(candidateDTO); Assert.notNull(candidateDTO.getId()); CandidateEntity candidateEntity = candidateRepository.findOne(candidateDTO.getId()); List<ApplicationEntity> applicationEntities = applicationsRepository.findByCandidateEntity(candidateEntity); return converterService.convert(applicationEntities, ApplicationDTO.class); } @Autowired  ApplicationsServiceImpl(
      ApplicationsRepository applicationRepository,
      StatesHistoryService statesHistoryService,
      CandidateRepository candidateRepository,
      ConverterService converterService); @Transactional(readOnly = true) @Override List<ApplicationDTO> getApplicationsByCandidateDTO(CandidateDTO candidateDTO); @Transactional(readOnly = true) @Override PagingResponse<CandidateApplicationDTO> getApplicationsByCandidateId(
      Long candidateId,
      int page,
      int size); @Transactional @Override void deleteApplicationsByCandidateDTO(CandidateDTO candidateDTO); @Transactional(readOnly = true) @Override ApplicationDTO getApplicationDtoById(Long applicationId); @Transactional @Override Long saveOrUpdate(ApplicationDTO applicationDTO); @Transactional @Override Long saveApplication(ApplicationDTO applicationDTO, StateHistoryDTO stateHistoryDTO);  }