DocumentIdUtil
public
class
DocumentIdUtil
extends Object
| java.lang.Object | |
| ↳ | android.app.appsearch.util.DocumentIdUtil |
A util class with methods for working with document ids.
Summary
Public methods | |
|---|---|
static
String
|
createQualifiedId(String packageName, String databaseName, GenericDocument document)
Generates a qualified id based on package, database, and a |
static
String
|
createQualifiedId(String packageName, String databaseName, String namespace, String id)
Generates a qualified id based on package, database, namespace, and doc id. |
Inherited methods | |
|---|---|
Public methods
createQualifiedId
public static String createQualifiedId (String packageName, String databaseName, GenericDocument document)
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. |
| Returns | |
|---|---|
String |
the qualified id of a document.
This value cannot be null. |
createQualifiedId
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 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. |
| Returns | |
|---|---|
String |
the qualified id of a document
This value cannot be null. |