getDocument (DocumentCollection - Java)

Gets a specified document in a collection.

Defined in

DocumentCollection

Syntax

public Document getDocument(Document doc)
    throws NotesException

Parameters

Document doc

The document to be retrieved. Cannot be null.

Return value

Document

The specified document. If the specified document is not in the collection, returns null.

Usage

This method gets a document in a document collection that is the same as a reference document that does not necessarily come from the collection (for example, a document retrieved from another collection). If the reference document is not in the collection, you get a null return.

This method throws an exception if the document collection is the result of a multi-database full-text search.

Example