Class BaseChangeEvent<DocumentT>

  • Type Parameters:
    DocumentT - The type of the full document in the change event.

    public abstract class BaseChangeEvent<DocumentT>
    extends Object
    Represents the set of properties that exist on all MongoDB realm change events produced by watch streams in this SDK. Other change event types inherit from this type.
    • Method Detail

      • getOperationType

        public BaseChangeEvent.OperationType getOperationType()
        Returns the operation type of the change that triggered the change event.
        the operation type of this change event.
      • getFullDocument

        public DocumentT getFullDocument()
        The full document at some point after the change has been applied.
        the full document.
      • getDocumentKey

        public BsonDocument getDocumentKey()
        The unique identifier for the document that was actually changed.
        the document key.
      • getUpdateDescription

        public UpdateDescription getUpdateDescription()
        In the case of an update, the description of which fields have been added, removed or updated.
        the update description.
      • hasUncommittedWrites

        public boolean hasUncommittedWrites()
        Indicates a local change event that has not yet been synchronized with a remote data store. Used only for the sync use case.
        whether or not this change event represents uncommitted writes.
      • toBsonDocument

        public abstract BsonDocument toBsonDocument()
        Converts the change event to a BSON representation, as it would look on a MongoDB realm change stream, or a Realm compact watch stream.
        The BSON document representation of the change event.