Enum Class FullDocumentBeforeChange
java.lang.Object
java.lang.Enum<FullDocumentBeforeChange>
com.mongodb.client.model.changestream.FullDocumentBeforeChange
- All Implemented Interfaces:
Serializable
,Comparable<FullDocumentBeforeChange>
,java.lang.constant.Constable
Change Stream fullDocumentBeforeChange configuration.
Determines what to return for update operations when using a Change Stream. Defaults to DEFAULT
.
- Since:
- 4.7
- Since server release
- 6.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe default valueConfigures the change stream to not include the pre-image of the modified document.The same behavior asWHEN_AVAILABLE
except that an error is raised by the server if the pre-image is not available.Configures the change stream to return the pre-image of the modified document for replace, update, and delete change events if it is available. -
Method Summary
Modifier and TypeMethodDescriptionstatic FullDocumentBeforeChange
fromString
(String value) Returns the FullDocumentBeforeChange from the string value.getValue()
The string value.static FullDocumentBeforeChange
Returns the enum constant of this class with the specified name.static FullDocumentBeforeChange[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
The default value -
OFF
Configures the change stream to not include the pre-image of the modified document. -
WHEN_AVAILABLE
Configures the change stream to return the pre-image of the modified document for replace, update, and delete change events if it is available. -
REQUIRED
The same behavior asWHEN_AVAILABLE
except that an error is raised by the server if the pre-image is not available.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getValue
The string value.- Returns:
- the string value
-
fromString
Returns the FullDocumentBeforeChange from the string value.- Parameters:
value
- the string value.- Returns:
- the full document before change
-