How can i get all documents from the "All Documents" view?
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.
How can i get all documents from the "All Documents" view?
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());
}