public static List<Document> search(String userId, SearchFilter filter) { DocumentDaoImpl dao = DB.getDocumentDao(); List<DocumentModel> models = dao.search(userId, filter); List<Document> docs = new ArrayList<>(); for (DocumentModel doc : models) { docs.add(getDoc(doc)); } return docs; }
public static List<Document> search(String subject) { DocumentDaoImpl dao = DB.getDocumentDao(); List<DocumentModel> models = dao.search(subject); List<Document> docs = new ArrayList<>(); for (DocumentModel doc : models) { docs.add(getDoc(doc)); } return docs; }