@Test public void testFindByCriteria() { SampleService sampleService = BeanFactory.getSampleServiceBean(); List<Sample> foundSamples = sampleService.findByCriteria("Sample", false); assertEquals(2, foundSamples.size()); foundSamples = sampleService.findByCriteria("sample", true); assertEquals(1, foundSamples.size()); foundSamples = sampleService.findByCriteria("sample", false); assertEquals(2, foundSamples.size()); foundSamples = sampleService.findByCriteria("4760", false); assertEquals(1, foundSamples.size()); foundSamples = sampleService.findByCriteria("24377eauoeaua", false); assertEquals(0, foundSamples.size()); }
@Override public List<Sample> findByCriteria(String criteria, boolean isCaseSens) { return sampleDAO.findByCriteria(criteria, isCaseSens); }
SampleServiceImpl implements SampleService { @Override public List<Sample> findByCriteria(String criteria, boolean isCaseSens) { return sampleDAO.findByCriteria(criteria, isCaseSens); } }
SampleServiceImpl implements SampleService { @Override public List<Sample> findByCriteria(String criteria, boolean isCaseSens) { return sampleDAO.findByCriteria(criteria, isCaseSens); } SampleServiceImpl(); }
SampleServiceImpl implements SampleService { @Override public List<Sample> findByCriteria(String criteria, boolean isCaseSens) { return sampleDAO.findByCriteria(criteria, isCaseSens); } SampleServiceImpl(); @Override void setSampleDAO(SampleDAO sampleDAO); void setFileDAO(FileDAO fileDAO); @Override Integer insert(Sample sample); @Override void update(Sample sample); @Override void delete(Sample sample, boolean deleteRealFiles); @Override List<File> getFiles(Integer sampleId); @Override boolean isHasFile(Integer sampleId); @Override List<File> getFiles(Integer studyId, String metaType); @Override boolean isHasFile(Integer studyId, String metaType); @Override SortedSet<Sample> setWithHasFile(Integer expId, SortedSet<Sample> list); @Override SortedSet<Sample> listWithHasFile(Integer expId, SortedSet<Sample> list, String metaType); @Override Sample findByTitle(String title); @Override Sample findByName(String name); @Override List<Sample> matchName(String name); @Override Sample findByID(Integer sampleId); @Override Sample findBySWAccession(Integer swAccession); @Override List<Sample> findByOwnerID(Integer registrationId); @Override List<Sample> findByCriteria(String criteria, boolean isCaseSens); @Override boolean hasNameBeenUsed(String oldName, String newName); @Override List<Sample> listComplete(); @Override List<Sample> listIncomplete(); @Override List<Sample> listSample(Registration registration); @Override Sample updateDetached(Sample sample); @Override List<Sample> getRootSamples(Study study); @Override Sample getRootSample(Sample childSample); @Override List<Sample> list(); @Override void update(Registration registration, Sample sample); @Override Integer insert(Registration registration, Sample sample); @Override Sample updateDetached(Registration registration, Sample sample); }
SampleServiceImpl implements SampleService { @Override public List<Sample> findByCriteria(String criteria, boolean isCaseSens) { return sampleDAO.findByCriteria(criteria, isCaseSens); } SampleServiceImpl(); @Override void setSampleDAO(SampleDAO sampleDAO); void setFileDAO(FileDAO fileDAO); @Override Integer insert(Sample sample); @Override void update(Sample sample); @Override void delete(Sample sample, boolean deleteRealFiles); @Override List<File> getFiles(Integer sampleId); @Override boolean isHasFile(Integer sampleId); @Override List<File> getFiles(Integer studyId, String metaType); @Override boolean isHasFile(Integer studyId, String metaType); @Override SortedSet<Sample> setWithHasFile(Integer expId, SortedSet<Sample> list); @Override SortedSet<Sample> listWithHasFile(Integer expId, SortedSet<Sample> list, String metaType); @Override Sample findByTitle(String title); @Override Sample findByName(String name); @Override List<Sample> matchName(String name); @Override Sample findByID(Integer sampleId); @Override Sample findBySWAccession(Integer swAccession); @Override List<Sample> findByOwnerID(Integer registrationId); @Override List<Sample> findByCriteria(String criteria, boolean isCaseSens); @Override boolean hasNameBeenUsed(String oldName, String newName); @Override List<Sample> listComplete(); @Override List<Sample> listIncomplete(); @Override List<Sample> listSample(Registration registration); @Override Sample updateDetached(Sample sample); @Override List<Sample> getRootSamples(Study study); @Override Sample getRootSample(Sample childSample); @Override List<Sample> list(); @Override void update(Registration registration, Sample sample); @Override Integer insert(Registration registration, Sample sample); @Override Sample updateDetached(Registration registration, Sample sample);  }