Package io.vertx.mongo.client.model
Class CountOptions
- java.lang.Object
-
- io.vertx.mongo.client.model.CountOptions
-
public class CountOptions extends java.lang.ObjectThe options for a count operation.- Since:
- 3.0
- MongoDB documentation
- Count
-
-
Constructor Summary
Constructors Constructor Description CountOptions()CountOptions(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.IntegergetLimit()Gets the limit to apply.java.lang.LonggetMaxTime()Gets the maximum execution time on the server for this operation.java.lang.IntegergetSkip()Gets the number of documents to skip.CountOptionssetCollation(Collation collation)Sets the collation optionsCountOptionssetHint(JsonObject hint)Sets the hint to apply.CountOptionssetHintString(java.lang.String hint)Sets the hint to apply.CountOptionssetLimit(java.lang.Integer limit)Sets the limit to apply.CountOptionssetMaxTime(java.lang.Long maxTime)Sets the maximum execution time on the server for this operation.CountOptionssetSkip(java.lang.Integer skip)Sets the number of documents to skip.JsonObjecttoJson()
-
-
-
Constructor Detail
-
CountOptions
public CountOptions()
-
CountOptions
public CountOptions(JsonObject json)
-
-
Method Detail
-
toJson
public JsonObject toJson()
-
setHint
public CountOptions setHint(JsonObject hint)
Sets the hint to apply.- Parameters:
hint- a document describing the index which should be used for this operation.- Returns:
- this
-
getHint
public JsonObject getHint()
Gets the hint to apply.- Returns:
- the hint, which should describe an existing
-
setHintString
public CountOptions 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
-
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
-
setLimit
public CountOptions setLimit(java.lang.Integer limit)
Sets the limit to apply.- Parameters:
limit- the limit- Returns:
- this
- MongoDB documentation
- Limit
-
getLimit
public java.lang.Integer getLimit()
Gets the limit to apply. The default is 0, which means there is no limit.- Returns:
- the limit
- MongoDB documentation
- Limit
-
setSkip
public CountOptions setSkip(java.lang.Integer skip)
Sets the number of documents to skip.- Parameters:
skip- the number of documents to skip- Returns:
- this
- MongoDB documentation
- Skip
-
getSkip
public java.lang.Integer getSkip()
Gets the number of documents to skip. The default is 0.- Returns:
- the number of documents to skip
- MongoDB documentation
- Skip
-
setMaxTime
public CountOptions 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 on the server for this operation. The default is 0, which places no limit on the execution time.- Returns:
- the maximum execution time (in milliseconds)
-
setCollation
public CountOptions 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
-
-