public final class DeleteRequest extends WriteRequest
WriteRequest.Type
Constructor and Description |
---|
DeleteRequest(BsonDocument filter)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
BsonDocument |
getFilter()
Gets the query Object filter.
|
WriteRequest.Type |
getType()
Gets the type of the write.
|
boolean |
isMulti()
Gets whether all documents matching the query filter will be removed.
|
DeleteRequest |
multi(boolean isMulti)
Sets whether all documents matching the query filter will be removed.
|
public DeleteRequest(BsonDocument filter)
filter
- the non-null query filterpublic BsonDocument getFilter()
public DeleteRequest multi(boolean isMulti)
isMulti
- true if all documents matching the query filter will be removedpublic boolean isMulti()
public WriteRequest.Type getType()
WriteRequest
getType
in class WriteRequest