public class CountOptions extends Object
| Constructor and Description |
|---|
CountOptions() |
CountOptions(CountOptions countOptions) |
CountOptions(JsonObject json) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
CollationOptions |
getCollation() |
JsonObject |
getHint()
Gets the hint to apply.
|
String |
getHintString()
Gets the hint string to apply.
|
int |
getLimit()
Gets the limit to apply.
|
long |
getMaxTime()
Gets the maximum execution time in milliseconds on the server for this operation.
|
long |
getMaxTime(TimeUnit timeUnit)
Gets the maximum execution time on the server for this operation.
|
int |
getSkip()
Gets the number of documents to skip.
|
int |
hashCode() |
CountOptions |
setCollation(CollationOptions collation)
Sets the collation options
|
CountOptions |
setHint(JsonObject hint)
Optional.
|
CountOptions |
setHintString(String hint)
Sets the hint to apply.
|
CountOptions |
setLimit(int limit)
Sets the limit to apply.
|
CountOptions |
setMaxTime(long maxTimeMS)
Sets the maximum execution time in milliseconds on the server for this operation.
|
CountOptions |
setMaxTime(long maxTime,
TimeUnit timeUnit)
Sets the maximum execution time on the server for this operation.
|
CountOptions |
setSkip(int skip)
Optional.
|
JsonObject |
toJson() |
com.mongodb.client.model.CountOptions |
toMongoDriverObject()
Returns the mongo-java-driver specific object.
|
String |
toString() |
public CountOptions()
public CountOptions(CountOptions countOptions)
public CountOptions(JsonObject json)
public JsonObject toJson()
public com.mongodb.client.model.CountOptions toMongoDriverObject()
public JsonObject getHint()
public String getHintString()
public CountOptions setHint(JsonObject hint)
hint - public CountOptions setHintString(String hint)
hint - the name of the index which should be used for the operationpublic int getLimit()
public CountOptions setLimit(int limit)
limit - the limitpublic int getSkip()
public CountOptions setSkip(int skip)
skip - public long getMaxTime()
public CountOptions setMaxTime(long maxTimeMS)
maxTimeMS - the max time in millisecondspublic long getMaxTime(TimeUnit timeUnit)
timeUnit - the time unit to return the result inpublic CountOptions setMaxTime(long maxTime, TimeUnit timeUnit)
maxTime - the max timetimeUnit - the time unit, which may not be nullpublic CollationOptions getCollation()
public CountOptions setCollation(CollationOptions collation)
Copyright © 2022 Eclipse. All rights reserved.