DocumentIdUtil
open class DocumentIdUtil
| kotlin.Any | |
| ↳ | android.app.appsearch.util.DocumentIdUtil |
A util class with methods for working with document ids.
Summary
| Public methods | |
|---|---|
| open static String |
createQualifiedId(packageName: String, databaseName: String, document: GenericDocument)Generates a qualified id based on package, database, and a |
| open static String |
createQualifiedId(packageName: String, databaseName: String, namespace: String, id: String)Generates a qualified id based on package, database, namespace, and doc id. |
Public methods
createQualifiedId
open 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. This value cannot be null. |
databaseName |
String: The database containing the document. This value cannot be null. |
document |
GenericDocument: The document to generate a qualified id for. This value cannot be null. |
| Return | |
|---|---|
String |
the qualified id of a document. This value cannot be null. |
createQualifiedId
open 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 with JoinSpec.
| Parameters | |
|---|---|
packageName |
String: The package the document belongs to. This value cannot be null. |
databaseName |
String: The database containing the document. This value cannot be null. |
namespace |
String: The namespace of the document. This value cannot be null. |
id |
String: The id of the document. This value cannot be null. |
| Return | |
|---|---|
String |
the qualified id of a document This value cannot be null. |
See Also