Package com.mongodb.client.model.bulk
Interface ClientReplaceOneOptions
The options to apply when replacing a document.
- Since:
- 5.3
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClientReplaceOneOptions
Creates the default options.Sets the collation.Sets the index specification,null
-ifies hint string.hintString
(String hintString) Sets the index name,null
-ifies hint.Enables or disables creation of a document if no documents match the filter.
-
Method Details
-
clientReplaceOneOptions
Creates the default options.- Returns:
- The default options.
-
collation
Sets the collation.- Parameters:
collation
- The collation.null
represents the server default.- Returns:
this
.
-
hint
Sets the index specification,null
-ifies hint string.- Parameters:
hint
- The index specification.null
represents the server default.- Returns:
this
.
-
hintString
Sets the index name,null
-ifies hint.- Parameters:
hintString
- The index name.null
represents the server default.- Returns:
this
.
-
upsert
Enables or disables creation of a document if no documents match the filter.- Parameters:
upsert
- The upsert flag.null
represents the server default.- Returns:
this
.
-