// opening session
// opening database
// getting inbox view
// getting all entries from the current view
// how to get only a view with a minimal set of information?
ViewEntryCollection viewCollection = view.getAllEntries();
if (null != viewCollection) {
int viewCount = viewCollection.getCount();
int count = 0;
while (count <= viewCount) {
ViewEntry viewEntry = viewCollection.getNthEntry(count);
if (null != viewEntry) {
Document document = viewEntry.getDocument();
if (null != document ) {
System.out.println("printing infos for folder -> " + view.getName());
System.out.println("Created -> " + document.getCreated());
System.out.println("Last modified -> " + document.getLastModified());
}
} else {
System.out.println("viewEntry is null,...");
}
viewEntry = viewCollection.getNextEntry();
count++;
}
} else {
System.out.println("viewCollection is null...");
}
|