示例#1
0
  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;
  }
示例#2
0
  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;
  }