merge (DocumentCollection - Java)

Adds to a document collection any documents not already in the collection that are contained in a second collection.

Note: This method is new with Release 8.0.1.

Defined in

DocumentCollection

Syntax

public void viewEntryCollection.merge(String noteID)
    throws NotesException

public void merge(int noteID)
    throws NotesException
public void merge(Document document)
    throws NotesException
public void merge(DocumentCollection collection)
    throws NotesException

Parameters

int noteID

A single noteID belonging to the DocumentCollection's database.

Document document

A single document belonging to the DocumentCollection's database.

DocumentCollection collection

A documentCollection, all documents of which must belong to the DocumentCollection's database.

Usage

The document or documents being merged by this method must be in the same database as the original collection. Otherwise, the method will return the error "the specified note or notes do not exist in the database" or, if a noteID was passed to the method that matches a noteID in the original collection's database, the method will use the unintended document.

This method performs a union of the two document collections.