DocumentIdUtil

public class DocumentIdUtil extends Object

A util class with methods for working with document ids.

Public Method Summary

static String
createQualifiedId(String packageName, String databaseName, GenericDocument document)
Generates a qualified id based on package, database, and a GenericDocument.
static String
createQualifiedId(String packageName, String databaseName, String namespace, String id)
Generates a qualified id based on package, database, namespace, and doc id.

Inherited Method Summary

Public Methods

public static String createQualifiedId (String packageName, String databaseName, GenericDocument document)

Generates a qualified id based on package, database, and a GenericDocument.

Parameters
packageName The package the document belongs to.
databaseName The database containing the document.
document The document to generate a qualified id for.
Returns
  • the qualified id of a document.

public static String createQualifiedId (String packageName, String databaseName, String namespace, String id)

Generates a qualified id based on package, database, namespace, and doc id.

A qualified id is a String referring to the combined package name, database name, namespace, and id of the document. It is useful for linking one document to another in order to perform a join operation.

Parameters
packageName The package the document belongs to.
databaseName The database containing the document.
namespace The namespace of the document.
id The id of the document.
Returns
  • the qualified id of a document