Package com.mongodb.client.model
Class DBCollectionRemoveOptions
- java.lang.Object
-
- com.mongodb.client.model.DBCollectionRemoveOptions
-
public final class DBCollectionRemoveOptions extends Object
The options to apply when removing documents from the DBCollection- Since:
- 3.4
- MongoDB documentation
- Remove Documents
-
-
Constructor Summary
Constructors Constructor Description DBCollectionRemoveOptions()
Construct a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DBCollectionRemoveOptions
collation(Collation collation)
Sets the collationDBCollectionRemoveOptions
encoder(DBEncoder encoder)
Sets the encoderCollation
getCollation()
Returns the collation optionsDBEncoder
getEncoder()
Returns the encoderWriteConcern
getWriteConcern()
The write concern to use for the insertion.DBCollectionRemoveOptions
writeConcern(WriteConcern writeConcern)
Sets the write concern
-
-
-
Method Detail
-
getCollation
@Nullable public Collation getCollation()
Returns the collation options- Returns:
- the collation options
- Since server release
- 3.4
-
collation
public DBCollectionRemoveOptions collation(@Nullable Collation collation)
Sets the collation- Parameters:
collation
- the collation- Returns:
- this
- Since server release
- 3.4
-
getWriteConcern
@Nullable public WriteConcern getWriteConcern()
The write concern to use for the insertion. By default the write concern configured for the DBCollection instance will be used.- Returns:
- the write concern, or null if the default will be used.
-
writeConcern
public DBCollectionRemoveOptions writeConcern(@Nullable WriteConcern writeConcern)
Sets the write concern- Parameters:
writeConcern
- the write concern- Returns:
- this
-
encoder
public DBCollectionRemoveOptions encoder(@Nullable DBEncoder encoder)
Sets the encoder- Parameters:
encoder
- the encoder- Returns:
- this
-
-