Class UpdateOptions

java.lang.Object
org.dizitart.no2.collection.UpdateOptions

public class UpdateOptions extends Object
Represents options to configure update operation.
Since:
1.0
Author:
Anindya Chatterjee
See Also:
  • Constructor Details

    • UpdateOptions

      public UpdateOptions()
  • Method Details

    • updateOptions

      public static UpdateOptions updateOptions(boolean insertIfAbsent)
      Creates a new UpdateOptions.
      Parameters:
      insertIfAbsent - the insertIfAbsent flag
      Returns:
      the UpdateOptions.
    • updateOptions

      public static UpdateOptions updateOptions(boolean insertIfAbsent, boolean justOnce)
      Creates a new UpdateOptions.
      Parameters:
      insertIfAbsent - the insertIfAbsent flag
      justOnce - the justOnce flag
      Returns:
      the UpdateOptions.
    • isInsertIfAbsent

      public boolean isInsertIfAbsent()
      Indicates if the update operation will insert a new document if it does not find any existing document to update.
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • setInsertIfAbsent

      public void setInsertIfAbsent(boolean insertIfAbsent)
      Indicates if the update operation will insert a new document if it does not find any existing document to update.
      See Also:
    • isJustOnce

      public boolean isJustOnce()
      Indicates if only one document will be updated or all of them.
    • setJustOnce

      public void setJustOnce(boolean justOnce)
      Indicates if only one document will be updated or all of them.