Package io.vertx.mongo.client.model
Class FindOneAndDeleteOptions
- java.lang.Object
-
- io.vertx.mongo.client.model.FindOneAndDeleteOptions
-
public class FindOneAndDeleteOptions extends java.lang.ObjectThe options to apply to an operation that atomically finds a document and deletes it.- Since:
- 3.0
- MongoDB documentation
- reference/command/findAndModify/
-
-
Constructor Summary
Constructors Constructor Description FindOneAndDeleteOptions()FindOneAndDeleteOptions(JsonObject json)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CollationgetCollation()Returns the collation optionsJsonObjectgetHint()Gets the hint to apply.java.lang.StringgetHintString()Gets the hint string to apply.java.lang.LonggetMaxTime()Gets the maximum execution time for the find one and delete operation.JsonObjectgetProjection()Gets a document describing the fields to return for all matching documents.JsonObjectgetSort()Gets the sort criteria to apply to the query.FindOneAndDeleteOptionssetCollation(Collation collation)Sets the collation optionsFindOneAndDeleteOptionssetHint(JsonObject hint)Sets the hint to apply.FindOneAndDeleteOptionssetHintString(java.lang.String hint)Sets the hint to apply.FindOneAndDeleteOptionssetMaxTime(java.lang.Long maxTime)Sets the maximum execution time on the server for this operation.FindOneAndDeleteOptionssetProjection(JsonObject projection)Sets a document describing the fields to return for all matching documents.FindOneAndDeleteOptionssetSort(JsonObject sort)Sets the sort criteria to apply to the query.JsonObjecttoJson()
-
-
-
Constructor Detail
-
FindOneAndDeleteOptions
public FindOneAndDeleteOptions()
-
FindOneAndDeleteOptions
public FindOneAndDeleteOptions(JsonObject json)
-
-
Method Detail
-
toJson
public JsonObject toJson()
-
setProjection
public FindOneAndDeleteOptions setProjection(JsonObject projection)
Sets a document describing the fields to return for all matching documents.- Parameters:
projection- the project document, which may be null.- Returns:
- this
- MongoDB documentation
- Projection
-
getProjection
public JsonObject getProjection()
Gets a document describing the fields to return for all matching documents.- Returns:
- the project document, which may be null
- MongoDB documentation
- Projection
-
setSort
public FindOneAndDeleteOptions setSort(JsonObject sort)
Sets the sort criteria to apply to the query.- Parameters:
sort- the sort criteria, which may be null.- Returns:
- this
- MongoDB documentation
- Sort
-
getSort
public JsonObject getSort()
Gets the sort criteria to apply to the query. The default is null, which means that the documents will be returned in an undefined order.- Returns:
- a document describing the sort criteria
- MongoDB documentation
- Sort
-
setMaxTime
public FindOneAndDeleteOptions setMaxTime(java.lang.Long maxTime)
Sets the maximum execution time on the server for this operation.- Parameters:
maxTime- the max time (in milliseconds)- Returns:
- this
-
getMaxTime
public java.lang.Long getMaxTime()
Gets the maximum execution time for the find one and delete operation.- Returns:
- the max time
-
setCollation
public FindOneAndDeleteOptions setCollation(Collation collation)
Sets the collation optionsA null value represents the server default.
- Parameters:
collation- the collation options to use- Returns:
- this
- Since:
- 3.4
- Since server release
- 3.4
-
getCollation
public Collation getCollation()
Returns the collation options- Returns:
- the collation options
- Since:
- 3.4
- Since server release
- 3.4
-
setHint
public FindOneAndDeleteOptions setHint(JsonObject hint)
Sets the hint to apply.- Parameters:
hint- a document describing the index which should be used for this operation.- Returns:
- this
- Since:
- 4.1
- Since server release
- 4.4
-
getHint
public JsonObject getHint()
Gets the hint to apply.- Returns:
- the hint, which should describe an existing index
- Since:
- 4.1
- Since server release
- 4.4
-
setHintString
public FindOneAndDeleteOptions setHintString(java.lang.String hint)
Sets the hint to apply.Note: If
setHint(JsonObject)is set that will be used instead of any hint string.- Parameters:
hint- the name of the index which should be used for the operation- Returns:
- this
- Since:
- 4.1
- Since server release
- 4.4
-
getHintString
public java.lang.String getHintString()
Gets the hint string to apply.- Returns:
- the hint string, which should be the name of an existing index
- Since:
- 4.1
- Since server release
- 4.4
-
-