Package dev.morphia
Class DeleteOptions
- java.lang.Object
-
- com.mongodb.client.model.DeleteOptions
-
- dev.morphia.DeleteOptions
-
- All Implemented Interfaces:
dev.morphia.internal.CollectionConfigurable<DeleteOptions>
,dev.morphia.internal.CollectionConfiguration
,dev.morphia.internal.WriteConfigurable<DeleteOptions>
public final class DeleteOptions extends DeleteOptions implements dev.morphia.internal.WriteConfigurable<DeleteOptions>, dev.morphia.internal.CollectionConfigurable<DeleteOptions>
The options to apply when removing documents from the MongoCollection- Since:
- 1.3
-
-
Constructor Summary
Constructors Constructor Description DeleteOptions()
Creates a new options instanceDeleteOptions(DeleteOptions that)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description DeleteOptions
collation(Collation collation)
String
collection()
Returns the alternate collection to use for the operation.DeleteOptions
collection(String collection)
Sets the alternate collection to use for the operation.DeleteOptions
comment(String comment)
DeleteOptions
comment(BsonValue comment)
DeleteOptions
hint(Bson hint)
DeleteOptions
hint(Document hint)
DeleteOptions
hintString(String hint)
boolean
isMulti()
Deprecated, for removal: This API element is subject to removal in a future version.DeleteOptions
let(Bson variables)
boolean
multi()
DeleteOptions
multi(boolean multi)
WriteConcern
writeConcern()
The write concern to use for the delete.DeleteOptions
writeConcern(WriteConcern writeConcern)
Sets the write concern-
Methods inherited from class com.mongodb.client.model.DeleteOptions
getCollation, getComment, getHint, getHintString, getLet, toString
-
-
-
-
Constructor Detail
-
DeleteOptions
public DeleteOptions()
Creates a new options instance
-
DeleteOptions
@MorphiaInternal public DeleteOptions(DeleteOptions that)
- Parameters:
that
- the options to copy- Since:
- 2.0
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
-
Method Detail
-
collation
public DeleteOptions collation(@Nullable Collation collation)
- Overrides:
collation
in classDeleteOptions
-
collection
public DeleteOptions collection(String collection)
Sets the alternate collection to use for the operation.- Specified by:
collection
in interfacedev.morphia.internal.CollectionConfigurable<DeleteOptions>
- Parameters:
collection
- the name of the collection to use- Returns:
- this
- Since:
- 2.3
-
collection
public String collection()
Description copied from interface:dev.morphia.internal.CollectionConfigurable
Returns the alternate collection to use for the operation. Might return null.- Specified by:
collection
in interfacedev.morphia.internal.CollectionConfigurable<DeleteOptions>
- Returns:
- the collection name or null
-
hint
public DeleteOptions hint(@Nullable Bson hint)
- Overrides:
hint
in classDeleteOptions
- Returns:
- this
- Since:
- 2.2
-
hintString
public DeleteOptions hintString(@Nullable String hint)
- Overrides:
hintString
in classDeleteOptions
- Returns:
- this
- Since:
- 2.2
-
comment
public DeleteOptions comment(String comment)
- Overrides:
comment
in classDeleteOptions
-
comment
public DeleteOptions comment(BsonValue comment)
- Overrides:
comment
in classDeleteOptions
- Returns:
- this
- Since:
- 2.3
-
hint
public DeleteOptions hint(Document hint)
- Parameters:
hint
- the hint to apply- Returns:
- this
- Since:
- 2.2
- See Also:
hint(Bson)
-
let
public DeleteOptions let(Bson variables)
- Overrides:
let
in classDeleteOptions
- Returns:
- this
- Since:
- 2.3
-
isMulti
@Deprecated(forRemoval=true, since="2.3") public boolean isMulti()
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- is this delete for multiple documents
-
multi
@MorphiaInternal public boolean multi()
- Returns:
- is this delete for multiple documents
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
multi
public DeleteOptions multi(boolean multi)
- Parameters:
multi
- true if this delete should affect multiple documents- Returns:
- this
-
writeConcern
public DeleteOptions writeConcern(@Nullable WriteConcern writeConcern)
Sets the write concern- Specified by:
writeConcern
in interfacedev.morphia.internal.WriteConfigurable<DeleteOptions>
- Parameters:
writeConcern
- the write concern- Returns:
- this
-
writeConcern
@Nullable public WriteConcern writeConcern()
The write concern to use for the delete.- Specified by:
writeConcern
in interfacedev.morphia.internal.WriteConfigurable<DeleteOptions>
- Returns:
- the write concern, or null if the default will be used.
-
-