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 booleanequals(Object o)CollationOptionsgetCollation()JsonObjectgetHint()Gets the hint to apply.StringgetHintString()Gets the hint string to apply.IntegergetLimit()Gets the limit to apply.LonggetMaxTime()Gets the maximum execution time (in ms) on the server for this operation.IntegergetSkip()Gets the number of documents to skip.inthashCode()CountOptionssetCollation(CollationOptions collation)Sets the collation optionsCountOptionssetHint(JsonObject hint)Optional.CountOptionssetHintString(String hint)Sets the hint to apply.CountOptionssetLimit(Integer limit)Sets the limit to apply.CountOptionssetMaxTime(Long maxTime)Sets the maximum execution time (in ms) on the server for this operation.CountOptionssetSkip(Integer skip)Optional.JsonObjecttoJson()com.mongodb.client.model.CountOptionstoMongoDriverObject()Returns the mongo-java-driver specific object.StringtoString()
-
-
-
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
-
-