DocumentIdUtil


class DocumentIdUtil


A util class with methods for working with document ids.

Summary

Public functions

java-static String
createQualifiedId(
    packageName: String,
    databaseName: String,
    document: GenericDocument
)

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

java-static String
createQualifiedId(
    packageName: String,
    databaseName: String,
    namespace: String,
    id: String
)

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

Public functions

createQualifiedId

Added in 1.1.0-alpha06
java-static fun createQualifiedId(
    packageName: String,
    databaseName: String,
    document: GenericDocument
): String

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

Parameters
packageName: String

The package the document belongs to.

databaseName: String

The database containing the document.

document: GenericDocument

The document to generate a qualified id for.

Returns
String

the qualified id of a document.

createQualifiedId

Added in 1.1.0-alpha06
java-static fun createQualifiedId(
    packageName: String,
    databaseName: String,
    namespace: String,
    id: String
): String

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: String

The package the document belongs to.

databaseName: String

The database containing the document.

namespace: String

The namespace of the document.

id: String

The id of the document.

Returns
String

the qualified id of a document