JAVA/CORBA CLASSES


DocumentCollection class
Example

Represents a collection of documents from a database, selected according to specific criteria.

Syntax

public class DocumentCollection extends NotesBase

Containment

Contained by: AgentContext, Database, View

Contains: Document

Properties

Count through getCount

IsSorted through isSorted

Parent through getParent

Query through getQuery

UntilTime through getUntilTime

Methods

addDocument

deleteDocument

FTSearch

getDocument

getFirstDocument

getLastDocument

getNextDocument

getNthDocument

getPrevDocument

markAllRead

markAllUnread

putAllInFolder

recycle

removeAll

removeAllFromFolder

stampAll

updateAll

Access

A DocumentCollection represents a subset of all the documents in a database. The documents in the subset are determined by the method or property you use to search the database, which can be any of the following:


Usage

DocumentCollection, ViewEntryCollection, and ViewNavigator objects provide access to documents in a database. Use a DocumentCollection object if:


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. ViewEntryCollection and ViewNavigator provide access to view entries, which contain ViewEntry as well as Document information. ViewNavigator provides access to categories and totals as well as documents.

Sorted collections

The documents in a collection are not sorted unless the collection results from a search. By contrast, documents accessed through ViewEntryCollection and ViewNavigator are in view order.

Current pointer

A current pointer is maintained for document collections. All navigation methods set the current pointer to the retrieved document with the following exceptions: add and delete methods do not move the current pointer. The following methods set the current pointer to the first document: FTSearch, removeAll (remote IIOP only), putAllInFolder, removeAllFromFolder, and stampAll.

Deletion stubs

A deletion stub is returned for a document deleted after creation of the collection or for a document to which you do not have Reader access. Use isValid in Document to check whether a document is real (true) or a deletion stub (false).

Example
See Also