Class FindAndReplaceOptions
java.lang.Object
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.booleanisUpsert()Get the bit indicating if to create a new document if not exists.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.
-
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.- Returns:
- this.
-
isReturnNew
public boolean isReturnNew()Get the bit indicating to return the replacement document.- Returns:
- true if set.
-
isUpsert
public boolean isUpsert()Get the bit indicating if to create a new document if not exists.- Returns:
- true if set.
-