Package dev.morphia

Class UpdateOptions

  • java.lang.Object
    • com.mongodb.client.model.UpdateOptions
      • dev.morphia.UpdateOptions
    • Constructor Detail

      • UpdateOptions

        public UpdateOptions()
    • Method Detail

      • arrayFilter

        public UpdateOptions arrayFilter​(Filter filter)
        Adds a new array filter
        Parameters:
        filter - the new filter
        Returns:
        this
        Since:
        2.1
      • hint

        public UpdateOptions hint​(org.bson.Document hint)
        Parameters:
        hint - the hint to apply
        Returns:
        this
        Since:
        2.2
        See Also:
        hint(Bson)
      • isMulti

        public boolean isMulti()
        Returns:
        true if the update should affect all entities
      • multi

        public UpdateOptions multi​(boolean multi)
        If true, sets this update to affect all matched documents.
        Parameters:
        multi - true for multiple updates
        Returns:
        this
      • upsert

        public UpdateOptions upsert​(boolean upsert)
        Overrides:
        upsert in class com.mongodb.client.model.UpdateOptions
      • bypassDocumentValidation

        public UpdateOptions bypassDocumentValidation​(@Nullable
                                                      Boolean bypassDocumentValidation)
        Overrides:
        bypassDocumentValidation in class com.mongodb.client.model.UpdateOptions
      • collation

        public UpdateOptions collation​(@Nullable
                                       com.mongodb.client.model.Collation collation)
        Overrides:
        collation in class com.mongodb.client.model.UpdateOptions
      • arrayFilters

        public UpdateOptions arrayFilters​(@Nullable
                                          List<? extends org.bson.conversions.Bson> arrayFilters)
        Overrides:
        arrayFilters in class com.mongodb.client.model.UpdateOptions
      • hint

        public UpdateOptions hint​(@Nullable
                                  org.bson.conversions.Bson hint)
        Overrides:
        hint in class com.mongodb.client.model.UpdateOptions
        Returns:
        this
        Since:
        2.2
      • hintString

        public UpdateOptions hintString​(@Nullable
                                        String hint)
        Overrides:
        hintString in class com.mongodb.client.model.UpdateOptions
        Returns:
        this
        Since:
        2.2
      • writeConcern

        public com.mongodb.WriteConcern writeConcern()
        The write concern to use for the insertion. By default the write concern configured for the MongoCollection instance will be used.
        Specified by:
        writeConcern in interface WriteConfigurable<UpdateOptions>
        Returns:
        the write concern, or null if the default will be used.