@Test public void testFindBySWAccession() { Experiment experiment = BeanFactory.getExperimentServiceBean().findBySWAccession(834); assertNotNull(experiment); assertEquals("Sample_Exome_ABC015068", experiment.getTitle()); }
@Override public Experiment findBySWAccession(Integer swAccession) { Experiment experiment = null; if (swAccession != null) { try { experiment = experimentDAO.findBySWAccession(swAccession); } catch (Exception exception) { LOG.error("Cannot find Experiment by swAccession " + swAccession); LOG.error(exception.getMessage()); } } return experiment; }
ExperimentServiceImpl implements ExperimentService { @Override public Experiment findBySWAccession(Integer swAccession) { Experiment experiment = null; if (swAccession != null) { try { experiment = experimentDAO.findBySWAccession(swAccession); } catch (Exception exception) { LOG.error("Cannot find Experiment by swAccession " + swAccession); LOG.error(exception.getMessage()); } } return experiment; } }
ExperimentServiceImpl implements ExperimentService { @Override public Experiment findBySWAccession(Integer swAccession) { Experiment experiment = null; if (swAccession != null) { try { experiment = experimentDAO.findBySWAccession(swAccession); } catch (Exception exception) { LOG.error("Cannot find Experiment by swAccession " + swAccession); LOG.error(exception.getMessage()); } } return experiment; } ExperimentServiceImpl(); }
ExperimentServiceImpl implements ExperimentService { @Override public Experiment findBySWAccession(Integer swAccession) { Experiment experiment = null; if (swAccession != null) { try { experiment = experimentDAO.findBySWAccession(swAccession); } catch (Exception exception) { LOG.error("Cannot find Experiment by swAccession " + swAccession); LOG.error(exception.getMessage()); } } return experiment; } ExperimentServiceImpl(); @Override void setExperimentDAO(ExperimentDAO experimentDAO); void setFileDAO(FileDAO fileDAO); @Override Integer insert(Experiment experiment); @Override void update(Experiment experiment); @Override void merge(Experiment experiment); @Override void delete(Experiment experiment, boolean deleteRealFiles); @Override List<Experiment> list(Registration registration); @Override List<Experiment> list(Study study); @Override List<File> getFiles(Integer experimentId); @Override boolean isHasFile(Integer experimentId); @Override List<File> getFiles(Integer studyId, String metaType); @Override boolean isHasFile(Integer studyId, String metaType); @Override SortedSet<Experiment> setWithHasFile(SortedSet<Experiment> list); @Override SortedSet<Experiment> listWithHasFile(SortedSet<Experiment> list, String metaType); @Override Experiment findByTitle(String title); @Override Experiment findByID(Integer expID); @Override Experiment findBySWAccession(Integer swAccession); @Override boolean hasTitleBeenUsed(String oldTitle, String newTitle); @Override Experiment updateDetached(Experiment experiment); @Override List<Experiment> findByOwnerID(Integer registrationID); @Override List<Experiment> findByCriteria(String criteria, boolean isCaseSens); @Override List<Experiment> list(); @Override void update(Registration registration, Experiment experiment); @Override Integer insert(Registration registration, Experiment experiment); @Override Experiment updateDetached(Registration registration, Experiment experiment); }
ExperimentServiceImpl implements ExperimentService { @Override public Experiment findBySWAccession(Integer swAccession) { Experiment experiment = null; if (swAccession != null) { try { experiment = experimentDAO.findBySWAccession(swAccession); } catch (Exception exception) { LOG.error("Cannot find Experiment by swAccession " + swAccession); LOG.error(exception.getMessage()); } } return experiment; } ExperimentServiceImpl(); @Override void setExperimentDAO(ExperimentDAO experimentDAO); void setFileDAO(FileDAO fileDAO); @Override Integer insert(Experiment experiment); @Override void update(Experiment experiment); @Override void merge(Experiment experiment); @Override void delete(Experiment experiment, boolean deleteRealFiles); @Override List<Experiment> list(Registration registration); @Override List<Experiment> list(Study study); @Override List<File> getFiles(Integer experimentId); @Override boolean isHasFile(Integer experimentId); @Override List<File> getFiles(Integer studyId, String metaType); @Override boolean isHasFile(Integer studyId, String metaType); @Override SortedSet<Experiment> setWithHasFile(SortedSet<Experiment> list); @Override SortedSet<Experiment> listWithHasFile(SortedSet<Experiment> list, String metaType); @Override Experiment findByTitle(String title); @Override Experiment findByID(Integer expID); @Override Experiment findBySWAccession(Integer swAccession); @Override boolean hasTitleBeenUsed(String oldTitle, String newTitle); @Override Experiment updateDetached(Experiment experiment); @Override List<Experiment> findByOwnerID(Integer registrationID); @Override List<Experiment> findByCriteria(String criteria, boolean isCaseSens); @Override List<Experiment> list(); @Override void update(Registration registration, Experiment experiment); @Override Integer insert(Registration registration, Experiment experiment); @Override Experiment updateDetached(Registration registration, Experiment experiment);  }