Enum Class MongoItemWriter.Mode

java.lang.Object
java.lang.Enum<MongoItemWriter.Mode>
org.springframework.batch.item.data.MongoItemWriter.Mode
All Implemented Interfaces:
Serializable, Comparable<MongoItemWriter.Mode>, Constable
Enclosing class:
MongoItemWriter<T>

public static enum MongoItemWriter.Mode extends Enum<MongoItemWriter.Mode>
Operation mode of the item writer.
Since:
5.1
  • Enum Constant Details

    • INSERT

      public static final MongoItemWriter.Mode INSERT
      Insert items into the target collection using BulkOperations.insert(Object).
    • UPSERT

      public static final MongoItemWriter.Mode UPSERT
      Insert or update items into the target collection using BulkOperations.replaceOne(Query, Object, FindAndReplaceOptions).
    • REMOVE

      public static final MongoItemWriter.Mode REMOVE
      Remove items from the target collection using BulkOperations.remove(Query).
  • Method Details

    • values

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

      public static MongoItemWriter.Mode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null