Package org.dizitart.no2.collection
Class UpdateOptions
java.lang.Object
org.dizitart.no2.collection.UpdateOptions
Represents options to configure update operation.
- Since:
- 1.0
- Author:
- Anindya Chatterjee
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()booleanIndicates if the update operation will insert a new document if it does not find any existing document to update.booleanIndicates if only one document will be updated or all of them.voidsetInsertIfAbsent(boolean insertIfAbsent) Indicates if the update operation will insert a new document if it does not find any existing document to update.voidsetJustOnce(boolean justOnce) Indicates if only one document will be updated or all of them.toString()static UpdateOptionsupdateOptions(boolean insertIfAbsent) Creates a newUpdateOptions.static UpdateOptionsupdateOptions(boolean insertIfAbsent, boolean justOnce) Creates a newUpdateOptions.
-
Constructor Details
-
UpdateOptions
public UpdateOptions()
-
-
Method Details
-
updateOptions
Creates a newUpdateOptions.- Parameters:
insertIfAbsent- the insertIfAbsent flag- Returns:
- the
UpdateOptions.
-
updateOptions
Creates a newUpdateOptions.- Parameters:
insertIfAbsent- the insertIfAbsent flagjustOnce- the justOnce flag- Returns:
- the
UpdateOptions.
-
isInsertIfAbsent
public boolean isInsertIfAbsent()Indicates if the update operation will insert a new document if it does not find any existing document to update. -
toString
-
equals
-
hashCode
public int hashCode() -
setInsertIfAbsent
public void setInsertIfAbsent(boolean insertIfAbsent) Indicates if the update operation will insert a new document if it does not find any existing document to update. -
isJustOnce
public boolean isJustOnce()Indicates if only one document will be updated or all of them. -
setJustOnce
public void setJustOnce(boolean justOnce) Indicates if only one document will be updated or all of them.
-