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 FindAndReplaceOptionsempty()Static factory method to create aFindAndReplaceOptionsinstance with returnNew false upsert falsebooleanGet the bit indicating to return the replacement document.static FindAndReplaceOptionsnone()Static factory method returning an unmodifiableFindAndReplaceOptionsinstance.static FindAndReplaceOptionsoptions()Static factory method to create aFindAndReplaceOptionsinstance.Return the replacement document.upsert()Insert a new document if not exists.Methods inherited from class ReplaceOptions
isUpsert, replaceOptions
-
Constructor Details
-
FindAndReplaceOptions
public FindAndReplaceOptions()
-
-
Method Details
-
options
Static factory method to create aFindAndReplaceOptionsinstance.- returnNew
- false
- upsert
- false
- Returns:
- new instance of
FindAndReplaceOptions.
-
none
Static factory method returning an unmodifiableFindAndReplaceOptionsinstance.- Returns:
- unmodifiable
FindAndReplaceOptionsinstance. - Since:
- 2.2
-
empty
Static factory method to create aFindAndReplaceOptionsinstance 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:
upsertin classReplaceOptions- Returns:
- this.
-
isReturnNew
public boolean isReturnNew()Get the bit indicating to return the replacement document.- Returns:
- true if set.
-