@Test public void testFindByCriteria() { FileService fileService = BeanFactory.getFileServiceBean(); List<File> foundFiles = fileService.findByCriteria("https", false); assertEquals(0, foundFiles.size()); foundFiles = fileService.findByCriteria("ABC015068", true); assertEquals(11, foundFiles.size()); foundFiles = fileService.findByCriteria("abc015068", true); assertEquals(0, foundFiles.size()); foundFiles = fileService.findByCriteria("abc015068", false); assertEquals(11, foundFiles.size()); foundFiles = fileService.findByCriteria("1963", false); assertEquals(1, foundFiles.size()); }
@Override public List<File> findByCriteria(String criteria, boolean isCaseSens) { return fileDAO.findByCriteria(criteria, isCaseSens); }
FileServiceImpl implements FileService { @Override public List<File> findByCriteria(String criteria, boolean isCaseSens) { return fileDAO.findByCriteria(criteria, isCaseSens); } }
FileServiceImpl implements FileService { @Override public List<File> findByCriteria(String criteria, boolean isCaseSens) { return fileDAO.findByCriteria(criteria, isCaseSens); } FileServiceImpl(); }
FileServiceImpl implements FileService { @Override public List<File> findByCriteria(String criteria, boolean isCaseSens) { return fileDAO.findByCriteria(criteria, isCaseSens); } FileServiceImpl(); @Override void setFileDAO(FileDAO dao); @Override Integer insert(File file); @Override void update(File file); @Override void delete(File file, boolean deleteRealFiles); @Override void deleteAll(List<File> files, boolean deleteRealFiles); @Override boolean isExists(String fileName, String folderStore); @Override List<File> getFiles(Integer fileId); @Override List<File> getFiles(Integer fileId, String metaType); @Override Set<File> setWithHasFile(Set<File> list, String metaType); @Override File findByPath(String path); @Override File findByID(Integer fileId); @Override File findBySWAccession(Integer swAccession); @Override List<File> findByCriteria(String criteria, boolean isCaseSens); @Override File updateDetached(File file); @Override List<File> findByOwnerId(Integer registrationId); @Override List<File> list(); @Override void update(Registration registration, File file); @Override Integer insert(Registration registration, File file); @Override File updateDetached(Registration registration, File file); }
FileServiceImpl implements FileService { @Override public List<File> findByCriteria(String criteria, boolean isCaseSens) { return fileDAO.findByCriteria(criteria, isCaseSens); } FileServiceImpl(); @Override void setFileDAO(FileDAO dao); @Override Integer insert(File file); @Override void update(File file); @Override void delete(File file, boolean deleteRealFiles); @Override void deleteAll(List<File> files, boolean deleteRealFiles); @Override boolean isExists(String fileName, String folderStore); @Override List<File> getFiles(Integer fileId); @Override List<File> getFiles(Integer fileId, String metaType); @Override Set<File> setWithHasFile(Set<File> list, String metaType); @Override File findByPath(String path); @Override File findByID(Integer fileId); @Override File findBySWAccession(Integer swAccession); @Override List<File> findByCriteria(String criteria, boolean isCaseSens); @Override File updateDetached(File file); @Override List<File> findByOwnerId(Integer registrationId); @Override List<File> list(); @Override void update(Registration registration, File file); @Override Integer insert(Registration registration, File file); @Override File updateDetached(Registration registration, File file);  }