io.vertx.ext.mongo

## Class UpdateOptions

- java.lang.Object
- - io.vertx.ext.mongo.UpdateOptions

-     public class UpdateOptions
      extends Object

  Options for configuring updates.
  Author:
    Nick Scavelli

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `DEFAULT_MULTI` The default value of multi = false
    `static boolean` | `DEFAULT_UPSERT` The default value of upsert = false

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UpdateOptions()` Default constructor
    `UpdateOptions(boolean upsert)` Constructor specify upsert
    `UpdateOptions(boolean upsert, boolean multi)` Constructor specify upsert and multu
    `UpdateOptions(JsonObject json)` Constructor from JSON
    `UpdateOptions(UpdateOptions other)` Copy constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `WriteOption` | `getWriteOption()` Get the write option.
    `int` | `hashCode()`
    `boolean` | `isMulti()` Get whether multi is enabled.
    `boolean` | `isUpsert()` Get whether upsert is enabled
    `UpdateOptions` | `setMulti(boolean multi)` Set whether multi is enabled
    `UpdateOptions` | `setUpsert(boolean upsert)` Set whether upsert is enabled
    `UpdateOptions` | `setWriteOption(WriteOption writeOption)` Set the write option
    `JsonObject` | `toJson()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_UPSERT

          public static final boolean DEFAULT_UPSERT

      The default value of upsert = false
      See Also:
        Constant Field Values

    - #### DEFAULT_MULTI

          public static final boolean DEFAULT_MULTI

      The default value of multi = false
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### UpdateOptions

          public UpdateOptions()

      Default constructor

    - #### UpdateOptions

          public UpdateOptions(boolean upsert)

      Constructor specify upsert
      Parameters:
        `upsert` - the value of upsert

    - #### UpdateOptions

          public UpdateOptions(boolean upsert,
                               boolean multi)

      Constructor specify upsert and multu
      Parameters:
        `upsert` - the value of upsert
        `multi` - the value of multi

    - #### UpdateOptions

          public UpdateOptions(UpdateOptions other)

      Copy constructor
      Parameters:
        `other` - the one to copy

    - #### UpdateOptions

          public UpdateOptions(JsonObject json)

      Constructor from JSON
      Parameters:
        `json` - the json

  - ### Method Detail

    - #### getWriteOption

          public WriteOption getWriteOption()

      Get the write option.
      Returns:
        the write option

    - #### setWriteOption

          public UpdateOptions setWriteOption(WriteOption writeOption)

      Set the write option
      Parameters:
        `writeOption` - the write option
      Returns:
        reference to this, for fluency

    - #### isUpsert

          public boolean isUpsert()

      Get whether upsert is enabled
      Returns:
        upsert is enabled?

    - #### setUpsert

          public UpdateOptions setUpsert(boolean upsert)

      Set whether upsert is enabled
      Parameters:
        `upsert` - true if enabled
      Returns:
        reference to this, for fluency

    - #### isMulti

          public boolean isMulti()

      Get whether multi is enabled. Multi means more than one document can be updated.
      Returns:
        multi is enabled?

    - #### setMulti

          public UpdateOptions setMulti(boolean multi)

      Set whether multi is enabled
      Parameters:
        `multi` - true if enabled
      Returns:
        reference to this, for fluency

    - #### toJson

          public JsonObject toJson()

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2016. All rights reserved.