Package io.vertx.ext.mongo
Class CountOptions
- java.lang.Object
-
- io.vertx.ext.mongo.CountOptions
-
public class CountOptions extends Object
-
-
Constructor Summary
Constructors Constructor Description CountOptions()
CountOptions(JsonObject json)
CountOptions(CountOptions countOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
CollationOptions
getCollation()
JsonObject
getHint()
Gets the hint to apply.String
getHintString()
Gets the hint string to apply.Integer
getLimit()
Gets the limit to apply.Long
getMaxTime()
Gets the maximum execution time (in ms) on the server for this operation.Integer
getSkip()
Gets the number of documents to skip.int
hashCode()
CountOptions
setCollation(CollationOptions collation)
Sets the collation optionsCountOptions
setHint(JsonObject hint)
Optional.CountOptions
setHintString(String hint)
Sets the hint to apply.CountOptions
setLimit(Integer limit)
Sets the limit to apply.CountOptions
setMaxTime(Long maxTime)
Sets the maximum execution time (in ms) on the server for this operation.CountOptions
setSkip(Integer skip)
Optional.JsonObject
toJson()
com.mongodb.client.model.CountOptions
toMongoDriverObject()
Returns the mongo-java-driver specific object.String
toString()
-
-
-
Constructor Detail
-
CountOptions
public CountOptions()
-
CountOptions
public CountOptions(CountOptions countOptions)
-
CountOptions
public CountOptions(JsonObject json)
-
-
Method Detail
-
toJson
public JsonObject toJson()
-
toMongoDriverObject
public com.mongodb.client.model.CountOptions toMongoDriverObject()
Returns the mongo-java-driver specific object.- Returns:
- com.mongodb.client.model.CountOptions
-
getHint
public JsonObject getHint()
Gets the hint to apply.- Returns:
- the hint, which should describe an existing
-
setHint
public CountOptions setHint(JsonObject hint)
Optional. The index to use. Specify either the index name as a string or the index specification document.- Parameters:
hint
-- Returns:
- CountOptions
-
getHintString
public String getHintString()
Gets the hint string to apply.- Returns:
- the hint string, which should be the name of an existing index
-
setHintString
public CountOptions setHintString(String hint)
Sets the hint to apply. Note: If hint 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:
- CountOptions
-
getLimit
public Integer getLimit()
Gets the limit to apply. The default is 0, which means there is no limit.- Returns:
- the limit
-
setLimit
public CountOptions setLimit(Integer limit)
Sets the limit to apply.- Parameters:
limit
- the limit- Returns:
- CountOptions
-
getSkip
public Integer getSkip()
Gets the number of documents to skip. The default is 0.- Returns:
- the number of documents to skip
-
setSkip
public CountOptions setSkip(Integer skip)
Optional. The number of matching documents to skip before returning results.- Parameters:
skip
-- Returns:
-
getMaxTime
public Long getMaxTime()
Gets the maximum execution time (in ms) 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
-
setMaxTime
public CountOptions setMaxTime(Long maxTime)
Sets the maximum execution time (in ms) on the server for this operation.- Parameters:
maxTime
- the max time (in ms)- Returns:
- CountOptions
-
getCollation
public CollationOptions getCollation()
-
setCollation
public CountOptions setCollation(CollationOptions collation)
Sets the collation options- Returns:
- CollationOptions
-
-