Package dev.morphia

Class UpdateDocument

  • All Implemented Interfaces:
    org.bson.conversions.Bson

    public class UpdateDocument
    extends Object
    implements org.bson.conversions.Bson
    Document used to send update statements to the driver.
    Since:
    2.0
    Developer note.
    This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
    • Constructor Detail

      • UpdateDocument

        public UpdateDocument​(T entity)
        Creates an UpdateDocument for the entity
        Type Parameters:
        T - the entity type
        Parameters:
        entity - the entity to update
    • Method Detail

      • toBsonDocument

        public <TDocument> org.bson.BsonDocument toBsonDocument​(Class<TDocument> tDocumentClass,
                                                                org.bson.codecs.configuration.CodecRegistry codecRegistry)
        Specified by:
        toBsonDocument in interface org.bson.conversions.Bson