Menu

how to get "All Documents"

2008-02-12
2013-06-03
  • Nobody/Anonymous

    How can i get all documents from the "All Documents" view?

     
    • Nobody/Anonymous

      DNotesFactory factory = DNotesFactory.getInstance();
      DSession session = factory.getSession();
      DDatabase database = session.getDatabase("", "mail/mymail.nsf");

      // get all documents in a database:
      Iterator iterator = database.getAllDocuments();

      // get all documents in view "All Documents":
      Iterator iterator = database.getView("($All)").getAllDocuments();

      while (iterator.hasNext()) {
          DDocument doc = (DDocument) iterator.next();
          System.out.println(doc.getUniversalId());
      }

       

Log in to post a comment.