Package dev.morphia
Class DeleteOptions
- java.lang.Object
-
- dev.morphia.DeleteOptions
-
public final class DeleteOptions extends java.lang.Object
The options to apply when removing documents from the DBCollection- Since:
- 1.3
- MongoDB documentation
- tutorial/remove-documents/ Remove Documents
-
-
Constructor Summary
Constructors Constructor Description DeleteOptions()
Creates a new options instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeleteOptions
collation(com.mongodb.client.model.Collation collation)
Sets the collationDeleteOptions
copy()
Copies this instance to a new one.com.mongodb.client.model.Collation
getCollation()
Returns the collation optionscom.mongodb.WriteConcern
getWriteConcern()
The write concern to use for the delete.DeleteOptions
writeConcern(com.mongodb.WriteConcern writeConcern)
Sets the write concern
-
-
-
Method Detail
-
copy
public DeleteOptions copy()
Copies this instance to a new one.- Returns:
- the new instance
-
getCollation
public com.mongodb.client.model.Collation getCollation()
Returns the collation options- Returns:
- the collation options
- Since server release
- 3.4
-
collation
public DeleteOptions collation(com.mongodb.client.model.Collation collation)
Sets the collation- Parameters:
collation
- the collation- Returns:
- this
- Since server release
- 3.4
-
getWriteConcern
public com.mongodb.WriteConcern getWriteConcern()
The write concern to use for the delete.- Returns:
- the write concern, or null if the default will be used.
-
writeConcern
public DeleteOptions writeConcern(com.mongodb.WriteConcern writeConcern)
Sets the write concern- Parameters:
writeConcern
- the write concern- Returns:
- this
-
-