Enum OverwriteMode

java.lang.Object
java.lang.Enum<OverwriteMode>
com.arangodb.model.OverwriteMode
All Implemented Interfaces:
Serializable, Comparable<OverwriteMode>

public enum OverwriteMode extends Enum<OverwriteMode>
Since:
ArangoDB 3.7
Author:
Michele Rastelli
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    if a document with the specified _key value exists already, return a unique constraint violation error so that the insert operation fails.
    if a document with the specified _key value exists already, nothing will be done and no write operation will be carried out.
    if a document with the specified _key value exists already, it will be overwritten with the specified document value.
    if a document with the specified _key value exists already, it will be patched (partially updated) with the specified document value.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    Returns the enum constant of this type with the specified name.
    static OverwriteMode[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • ignore

      public static final OverwriteMode ignore
      if a document with the specified _key value exists already, nothing will be done and no write operation will be carried out. The insert operation will return success in this case. This mode does not support returning the old document version using RETURN OLD. When using RETURN NEW, null will be returned in case the document already existed.
    • replace

      public static final OverwriteMode replace
      if a document with the specified _key value exists already, it will be overwritten with the specified document value. This mode will also be used when no overwrite mode is specified but the overwrite flag is set to true.
    • update

      public static final OverwriteMode update
      if a document with the specified _key value exists already, it will be patched (partially updated) with the specified document value. The overwrite mode can be further controlled via the keepNull and mergeObjects parameters.
    • conflict

      public static final OverwriteMode conflict
      if a document with the specified _key value exists already, return a unique constraint violation error so that the insert operation fails. This is also the default behavior in case the overwrite mode is not set, and the overwrite flag is false or not set either.
  • Method Details

    • values

      public static OverwriteMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static OverwriteMode valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()