Class FindAndReplaceOptions
java.lang.Object
org.springframework.data.mongodb.core.ReplaceOptions
org.springframework.data.mongodb.core.FindAndReplaceOptions
- Since:
- 2.1
- Author:
- Mark Paluch, Christoph Strobl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FindAndReplaceOptions
empty()
Static factory method to create aFindAndReplaceOptions
instance with returnNew false upsert falseboolean
Get the bit indicating to return the replacement document.static FindAndReplaceOptions
none()
Static factory method returning an unmodifiableFindAndReplaceOptions
instance.static FindAndReplaceOptions
options()
Static factory method to create aFindAndReplaceOptions
instance.Return the replacement document.upsert()
Insert a new document if not exists.Methods inherited from class org.springframework.data.mongodb.core.ReplaceOptions
isUpsert, replaceOptions
-
Constructor Details
-
FindAndReplaceOptions
public FindAndReplaceOptions()
-
-
Method Details
-
options
Static factory method to create aFindAndReplaceOptions
instance.- returnNew
- false
- upsert
- false
- Returns:
- new instance of
FindAndReplaceOptions
.
-
none
Static factory method returning an unmodifiableFindAndReplaceOptions
instance.- Returns:
- unmodifiable
FindAndReplaceOptions
instance. - Since:
- 2.2
-
empty
Static factory method to create aFindAndReplaceOptions
instance with- returnNew
- false
- upsert
- false
- Returns:
- new instance of
FindAndReplaceOptions
.
-
returnNew
Return the replacement document.- Returns:
- this.
-
upsert
Insert a new document if not exists.- Overrides:
upsert
in classReplaceOptions
- Returns:
- this.
-
isReturnNew
public boolean isReturnNew()Get the bit indicating to return the replacement document.- Returns:
- true if set.
-