NotesViewEntryCollection 和 NotesDocumentCollection 的区别

Difference in NotesViewEntryCollection and NotesDocumentCollection

我已经阅读了文档,也对这两件事进行了一些练习。

但只是想清楚地了解这两个术语在重复控制数据中返回时实际存储的内容。

愚蠢的问题,但想要一些清晰的细节。

欢迎任何建议。

一个是 NotesViewEntryObject 的集合,另一个是 NotesDocuments 的集合。

视图条目可以包含 NotesDocument,但不一定(类别、总计...)。 视图条目具有文档所没有的特殊属性/方法(ColumnValues、Level 等)。

NotesViewEntryCollection 已按视图中的显示排序,NotesDocumentCollection 未排序。

对于重复控件:您处理不同的对象,您必须区别对待这些对象才能从中获取值...

but just want to get some clear working of both the term internally what actually it stores

XPages 无法将 Domino 对象从一个请求存储到下一个请求。 ViewEntryCollection 不能存储 ViewEntry 个对象,DocumentCollection 不能存储 Document 个对象。所有 可以 存储的是您分配给组件的值(Java 数据类型,因此日期是 java.util.Date,而不是 DateTime)。所以存储的内容没有区别。

NotesDocumentCollection、NotesViewEntryCollection 和 NotesViewNavigator 对象提供对数据库中文档的访问。

在以下情况下使用 NotesDocumentCollection 对象:

您想对满足特定条件的一组特定文档执行操作。 数据库中没有包含您需要搜索的每个文档的视图。 您不需要浏览文档的响应层次结构。

视图是一种更有效的访问文档的方式,因为它们已经被数据库本身编入索引。但是,它们不一定提供对您想要的文档的访问权限。 NotesViewEntryCollection 和 NotesViewNavigator 对象提供对视图条目的访问,其中包含 NotesViewEntry 和 NotesDocument 信息。 NotesViewNavigator 提供对类别和总计以及文档的访问。

ViewEntryCollections 的用法:

ViewEntryCollections 从不包含类别或总计,仅包含与文档相对应的条目。 NotesViewEntryCollection 中的方法和属性与 NotesDocumentCollection 中的方法和属性相同,但 IsSorted 除外,因为此 属性 对于 NotesViewEntryCollection 始终为 True。