Package dev.morphia.query
Class FindAndDeleteOptions
- java.lang.Object
-
- com.mongodb.client.model.FindOneAndDeleteOptions
-
- dev.morphia.query.FindAndDeleteOptions
-
- All Implemented Interfaces:
SessionConfigurable<FindAndDeleteOptions>
,WriteConfigurable<FindAndDeleteOptions>
public class FindAndDeleteOptions extends com.mongodb.client.model.FindOneAndDeleteOptions implements SessionConfigurable<FindAndDeleteOptions>, WriteConfigurable<FindAndDeleteOptions>
Defines options to use for find and delete operations
-
-
Constructor Summary
Constructors Constructor Description FindAndDeleteOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.mongodb.client.ClientSession
clientSession()
The client session to use for the insertion.FindAndDeleteOptions
clientSession(com.mongodb.client.ClientSession clientSession)
Set the client session to use for the insert.FindAndDeleteOptions
collation(com.mongodb.client.model.Collation collation)
FindAndDeleteOptions
hint(org.bson.conversions.Bson hint)
FindAndDeleteOptions
hint(org.bson.Document hint)
FindAndDeleteOptions
hintString(String hint)
FindAndDeleteOptions
maxTime(long maxTime, TimeUnit timeUnit)
FindAndDeleteOptions
projection(org.bson.conversions.Bson projection)
FindAndDeleteOptions
sort(org.bson.conversions.Bson sort)
FindAndDeleteOptions
sort(org.bson.Document sort)
com.mongodb.WriteConcern
writeConcern()
The write concern to use.FindAndDeleteOptions
writeConcern(com.mongodb.WriteConcern writeConcern)
Sets the write concern-
Methods inherited from class com.mongodb.client.model.FindOneAndDeleteOptions
getCollation, getHint, getHintString, getMaxTime, getProjection, getSort, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface dev.morphia.internal.WriteConfigurable
getWriteConcern, prepare
-
-
-
-
Method Detail
-
clientSession
public FindAndDeleteOptions clientSession(com.mongodb.client.ClientSession clientSession)
Description copied from interface:SessionConfigurable
Set the client session to use for the insert.- Specified by:
clientSession
in interfaceSessionConfigurable<FindAndDeleteOptions>
- Parameters:
clientSession
- the client session- Returns:
- this
-
clientSession
public com.mongodb.client.ClientSession clientSession()
Description copied from interface:SessionConfigurable
The client session to use for the insertion.- Specified by:
clientSession
in interfaceSessionConfigurable<FindAndDeleteOptions>
- Returns:
- the client session
-
hint
public FindAndDeleteOptions hint(org.bson.Document hint)
- Parameters:
hint
- the hint to apply- Returns:
- this
- Since:
- 2.2
- See Also:
hint(Bson)
-
projection
public FindAndDeleteOptions projection(@Nullable org.bson.conversions.Bson projection)
- Overrides:
projection
in classcom.mongodb.client.model.FindOneAndDeleteOptions
-
sort
public FindAndDeleteOptions sort(@Nullable org.bson.conversions.Bson sort)
- Overrides:
sort
in classcom.mongodb.client.model.FindOneAndDeleteOptions
-
maxTime
public FindAndDeleteOptions maxTime(long maxTime, TimeUnit timeUnit)
- Overrides:
maxTime
in classcom.mongodb.client.model.FindOneAndDeleteOptions
-
collation
public FindAndDeleteOptions collation(@Nullable com.mongodb.client.model.Collation collation)
- Overrides:
collation
in classcom.mongodb.client.model.FindOneAndDeleteOptions
-
hint
public FindAndDeleteOptions hint(@Nullable org.bson.conversions.Bson hint)
- Overrides:
hint
in classcom.mongodb.client.model.FindOneAndDeleteOptions
- Returns:
- this
- Since:
- 2.2
-
hintString
public FindAndDeleteOptions hintString(@Nullable String hint)
- Overrides:
hintString
in classcom.mongodb.client.model.FindOneAndDeleteOptions
- Returns:
- this
- Since:
- 2.2
-
sort
public FindAndDeleteOptions sort(org.bson.Document sort)
- Parameters:
sort
- the sort to apply- Returns:
- this
-
writeConcern
public FindAndDeleteOptions writeConcern(@Nullable com.mongodb.WriteConcern writeConcern)
Sets the write concern- Specified by:
writeConcern
in interfaceWriteConfigurable<FindAndDeleteOptions>
- Parameters:
writeConcern
- the write concern- Returns:
- this
-
writeConcern
@Nullable public com.mongodb.WriteConcern writeConcern()
Description copied from interface:WriteConfigurable
The write concern to use. By default the write concern configured for the MongoCollection instance will be used.- Specified by:
writeConcern
in interfaceWriteConfigurable<FindAndDeleteOptions>
- Returns:
- the write concern to use
-
-