Enum MergeOptions.WhenNotMatched

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DISCARD
      Discard the document; i.e.
      FAIL
      Stop and fail the aggregation operation.
      INSERT
      Insert the document into the output collection.
    • Enum Constant Detail

      • DISCARD

        public static final MergeOptions.WhenNotMatched DISCARD
        Discard the document; i.e. $merge does not insert the document into the output collection.
      • FAIL

        public static final MergeOptions.WhenNotMatched FAIL
        Stop and fail the aggregation operation. Any changes to the output collection from previous documents are not reverted.
    • Method Detail

      • values

        public static MergeOptions.WhenNotMatched[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (MergeOptions.WhenNotMatched c : MergeOptions.WhenNotMatched.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static  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:
        - if this enum type has no constant with the specified name
        - if the argument is null