DocumentChangeInfo


class DocumentChangeInfo


Contains information about an individual change detected by an ObserverCallback.

This class reports information about document changes, that is, when documents were added, updated or removed.

Changes are grouped by package, database, schema type and namespace. Each unique combination of these items will generate a unique DocumentChangeInfo.

Notifications are only sent for documents whose schema type matches an observer's schema filters (as determined by getFilterSchemas).

Note that document changes that happen during schema migration from calling setSchemaAsync are not reported via this class. Such changes are reported through SchemaChangeInfo.

Summary

Public constructors

DocumentChangeInfo(
    packageName: String,
    database: String,
    namespace: String,
    schemaName: String,
    changedDocumentIds: (Mutable)Set<String!>
)

Constructs a new DocumentChangeInfo.

Public functions

Boolean
equals(o: Any?)
(Mutable)Set<String!>

Returns the set of document IDs that have been changed as part of this notification.

String

Returns the database in which the documents that was changed reside.

String

Returns the namespace of the documents that changed.

String

Returns the package name of the app which owns the documents that changed.

String

Returns the name of the schema type that contains the changed documents.

Int
String

Public constructors

DocumentChangeInfo

Added in 1.1.0-alpha07
DocumentChangeInfo(
    packageName: String,
    database: String,
    namespace: String,
    schemaName: String,
    changedDocumentIds: (Mutable)Set<String!>
)

Constructs a new DocumentChangeInfo.

Parameters
packageName: String

The package name of the app which owns the documents that changed.

database: String

The database in which the documents that changed reside.

namespace: String

The namespace in which the documents that changed reside.

schemaName: String

The name of the schema type that contains the changed documents.

changedDocumentIds: (Mutable)Set<String!>

The set of document IDs that have been changed as part of this notification.

Public functions

equals

fun equals(o: Any?): Boolean

getChangedDocumentIds

Added in 1.1.0-alpha07
fun getChangedDocumentIds(): (Mutable)Set<String!>

Returns the set of document IDs that have been changed as part of this notification.

This will never be empty.

getDatabaseName

Added in 1.1.0-alpha07
fun getDatabaseName(): String

Returns the database in which the documents that was changed reside.

getNamespace

Added in 1.1.0-alpha07
fun getNamespace(): String

Returns the namespace of the documents that changed.

getPackageName

Added in 1.1.0-alpha07
fun getPackageName(): String

Returns the package name of the app which owns the documents that changed.

getSchemaName

Added in 1.1.0-alpha07
fun getSchemaName(): String

Returns the name of the schema type that contains the changed documents.

hashCode

fun hashCode(): Int

toString

fun toString(): String