save (Document - Java)

Saves any changes you have made to a document.

Defined in

Document

Syntax

public boolean save()
    throws NotesException
public boolean save(boolean force)
    throws NotesException
public boolean save(boolean force, boolean makeresponse)
    throws NotesException
public boolean save(boolean force, boolean makeresponse, boolean markread)
    throws NotesException

Parameters

boolean force

If true, the document is saved even if someone else edits and saves the document while the program is running. The last version of the document that was saved wins; the earlier version is discarded.

If false, and someone else edits the document while the program is running, the makeresponse argument determines what happens.

boolean makeresponse

If true, the current document becomes a response to the original document (this is what the replicator does when there's a replication conflict). If false, the save is canceled. If the force parameter is true, the makeresponse parameter has no effect.

boolean markread

If true, the document is marked as read on behalf of the current user ID. If false (default), the document is not marked as read.

Note: If the database does not track unread marks, all documents are considered read, and this parameter has no effect.

Return value

  • true if the document is successfully saved
  • false if the document is not saved

Example