Search code examples
xpageslotus-domino

Difference in NotesViewEntryCollection and NotesDocumentCollection


I have gone through the documentation, Done some practices too on both the things.

but just want to get some clear working of both the term internally what actually it stores, when returned in a repeat control data.

Silly question but want some clean details on it.

Any kind of suggesion would be appretiated.


Solution

  • NotesDocumentCollection, NotesViewEntryCollection, and NotesViewNavigator objects provide access to documents in a database.

    Use a NotesDocumentCollection object if:

    You want to act on a specific set of documents that meet certain criteria. There is no view in the database that contains every document you need to search. You do not need to navigate the documents' response hierarchies.

    Views are a more efficient means of accessing documents because they are already indexed by the database itself. However, they do not necessarily provide access to the documents that you want. NotesViewEntryCollection and NotesViewNavigator objects provide access to view entries, which contain NotesViewEntry as well as NotesDocument information. NotesViewNavigator provides access to categories and totals as well as documents.

    Usage of ViewEntryCollections :

    ViewEntryCollections never contain categories or totals, only entries that correspond to documents. The methods and properties in NotesViewEntryCollection are the same as those for NotesDocumentCollection, except for IsSorted, because this property is always True for NotesViewEntryCollection.