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 DeleteOptionscollation(Collation collation)Stringcollection()Returns the alternate collection to use for the operation.DeleteOptionscollection(String collection)Sets the alternate collection to use for the operation.DeleteOptionscomment(String comment)DeleteOptionscomment(BsonValue comment)DeleteOptionshint(Bson hint)DeleteOptionshint(Document hint)DeleteOptionshintString(String hint)booleanisMulti()Deprecated, for removal: This API element is subject to removal in a future version.DeleteOptionslet(Bson variables)booleanmulti()DeleteOptionsmulti(boolean multi)WriteConcernwriteConcern()The write concern to use for the delete.DeleteOptionswriteConcern(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:
collationin classDeleteOptions
-
collection
public DeleteOptions collection(String collection)
Sets the alternate collection to use for the operation.- Specified by:
collectionin 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.CollectionConfigurableReturns the alternate collection to use for the operation. Might return null.- Specified by:
collectionin interfacedev.morphia.internal.CollectionConfigurable<DeleteOptions>- Returns:
- the collection name or null
-
hint
public DeleteOptions hint(@Nullable Bson hint)
- Overrides:
hintin classDeleteOptions- Returns:
- this
- Since:
- 2.2
-
hintString
public DeleteOptions hintString(@Nullable String hint)
- Overrides:
hintStringin classDeleteOptions- Returns:
- this
- Since:
- 2.2
-
comment
public DeleteOptions comment(String comment)
- Overrides:
commentin classDeleteOptions
-
comment
public DeleteOptions comment(BsonValue comment)
- Overrides:
commentin 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:
letin 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:
writeConcernin 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:
writeConcernin interfacedev.morphia.internal.WriteConfigurable<DeleteOptions>- Returns:
- the write concern, or null if the default will be used.
-
-