getDocumentByUNID (Database - Java)

Finds a document in a database, given the document universal ID (UNID).

Defined in

Database

Syntax

public Document getDocumentByUNID(String unid)
    throws NotesException

Parameters

String unid

The universal ID of a document.

Return Values


Document

The document whose universal ID matches the parameter.

Usage

For an explanation of universal IDs, see getUniversalID in Document. You can obtain the universal ID from getUniversalID or getParentDocumentUNID in Document.

Not matching the UNID to a document in the database throws NotesError.NOTES_ERR_BAD_UNID (4091).

Example