@Test public void testInsertProcessing() { ProcessingService ss = BeanFactory.getProcessingServiceBean(); RegistrationService rs = BeanFactory.getRegistrationServiceBean(); RegistrationDTO regDto = rs.findByEmailAddressAndPassword("admin@admin.com", "admin"); Processing newProcessing = new Processing(); newProcessing.setOwner(regDto); newProcessing.setFiles(new HashSet<File>()); newProcessing.setStatus(ProcessingStatus.success); newProcessing.setExitStatus(0); newProcessing.setProcessExitStatus(0); newProcessing.setRunStartTimestamp(null); newProcessing.setRunStopTimestamp(null); newProcessing.setAlgorithm("upload"); newProcessing.setCreateTimestamp(new Date()); ss.insert(newProcessing); }
@Override public void insert(SequencerRun sequencerRun, Processing processing) { if (processing.getStatus() == null) { processing.setStatus(ProcessingStatus.pending); } processing.setCreateTimestamp(new Date()); processingDAO.insert(processing); }
ProcessingServiceImpl implements ProcessingService { @Override public void insert(SequencerRun sequencerRun, Processing processing) { if (processing.getStatus() == null) { processing.setStatus(ProcessingStatus.pending); } processing.setCreateTimestamp(new Date()); processingDAO.insert(processing); } }
ProcessingServiceImpl implements ProcessingService { @Override public void insert(SequencerRun sequencerRun, Processing processing) { if (processing.getStatus() == null) { processing.setStatus(ProcessingStatus.pending); } processing.setCreateTimestamp(new Date()); processingDAO.insert(processing); } ProcessingServiceImpl(); }
ProcessingServiceImpl implements ProcessingService { @Override public void insert(SequencerRun sequencerRun, Processing processing) { if (processing.getStatus() == null) { processing.setStatus(ProcessingStatus.pending); } processing.setCreateTimestamp(new Date()); processingDAO.insert(processing); } ProcessingServiceImpl(); @Override void setProcessingDAO(ProcessingDAO processingDAO); void setFileDAO(FileDAO fileDAO); @Override void insert(SequencerRun sequencerRun, Processing processing); @Override void insert(Registration registration, SequencerRun sequencerRun, Processing processing); @Override Integer insert(Processing processing); @Override void update(Processing processing); @Override void delete(Processing processing, boolean deleteRealFiles); @Override List<File> getFiles(Integer processingId); @Override boolean isHasFile(Integer processingId); @Override Set<Processing> setWithHasFile(Set<Processing> list); @Override List<File> getFiles(Integer processingId, String metaType); boolean isHasFile(Integer processingId, String metaType); @Override Set<Processing> setWithHasFile(Set<Processing> list, String metaType); @Override Processing findByID(Integer id); @Override Processing findByIDOnlyWithRunningWR(Integer processingID); @Override Processing findBySWAccession(Integer swAccession); @Override List<Processing> findByOwnerID(Integer registrationId); @Override List<Processing> findByCriteria(String criteria, boolean isCaseSens); @Override Processing updateDetached(Processing processing); @Override List<Processing> list(); @Override void update(Registration registration, Processing processing); @Override Integer insert(Registration registration, Processing processing); @Override Processing updateDetached(Registration registration, Processing processing); @Override Set<Processing> findFor(Sample sample, WorkflowRun workflowRun); @Override Set<Processing> findFor(Sample sample); }
ProcessingServiceImpl implements ProcessingService { @Override public void insert(SequencerRun sequencerRun, Processing processing) { if (processing.getStatus() == null) { processing.setStatus(ProcessingStatus.pending); } processing.setCreateTimestamp(new Date()); processingDAO.insert(processing); } ProcessingServiceImpl(); @Override void setProcessingDAO(ProcessingDAO processingDAO); void setFileDAO(FileDAO fileDAO); @Override void insert(SequencerRun sequencerRun, Processing processing); @Override void insert(Registration registration, SequencerRun sequencerRun, Processing processing); @Override Integer insert(Processing processing); @Override void update(Processing processing); @Override void delete(Processing processing, boolean deleteRealFiles); @Override List<File> getFiles(Integer processingId); @Override boolean isHasFile(Integer processingId); @Override Set<Processing> setWithHasFile(Set<Processing> list); @Override List<File> getFiles(Integer processingId, String metaType); boolean isHasFile(Integer processingId, String metaType); @Override Set<Processing> setWithHasFile(Set<Processing> list, String metaType); @Override Processing findByID(Integer id); @Override Processing findByIDOnlyWithRunningWR(Integer processingID); @Override Processing findBySWAccession(Integer swAccession); @Override List<Processing> findByOwnerID(Integer registrationId); @Override List<Processing> findByCriteria(String criteria, boolean isCaseSens); @Override Processing updateDetached(Processing processing); @Override List<Processing> list(); @Override void update(Registration registration, Processing processing); @Override Integer insert(Registration registration, Processing processing); @Override Processing updateDetached(Registration registration, Processing processing); @Override Set<Processing> findFor(Sample sample, WorkflowRun workflowRun); @Override Set<Processing> findFor(Sample sample);  }