Package io.vertx.ext.mongo
Class FindOptions
- java.lang.Object
-
- io.vertx.ext.mongo.FindOptions
-
public class FindOptions extends Object
Options used to configure find operations.- Author:
- Nick Scavelli
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_BATCH_SIZE
The default value of batchSize = 20.static int
DEFAULT_LIMIT
The default value of limit = -1, signifying no limitstatic int
DEFAULT_SKIP
The default value of skip = 0
-
Constructor Summary
Constructors Constructor Description FindOptions()
Default constructorFindOptionsβ(JsonObject options)
Constructor from JSONFindOptionsβ(FindOptions options)
Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equalsβ(Object o)
int
getBatchSize()
CollationOptions
getCollation()
JsonObject
getFields()
Get the fieldsJsonObject
getHint()
Get the hint.String
getHintString()
Get the hint string.int
getLimit()
Get the limit - this determines the max number of rows to returnint
getSkip()
Get the skip.JsonObject
getSort()
Get the sort documentint
hashCode()
FindOptions
setBatchSizeβ(int batchSize)
Set the batch size for methods loading found data in batches.FindOptions
setCollationβ(CollationOptions collation)
Set the collationFindOptions
setFieldsβ(JsonObject fields)
Set the fieldsFindOptions
setHintβ(JsonObject hint)
Set the hintFindOptions
setHintStringβ(String hintString)
Set the hint stringFindOptions
setLimitβ(int limit)
Set the limitFindOptions
setSkipβ(int skip)
Set the skipFindOptions
setSortβ(JsonObject sort)
Set the sort documentJsonObject
toJson()
Convert to JSONString
toString()
-
-
-
Field Detail
-
DEFAULT_LIMIT
public static final int DEFAULT_LIMIT
The default value of limit = -1, signifying no limit- See Also:
- Constant Field Values
-
DEFAULT_SKIP
public static final int DEFAULT_SKIP
The default value of skip = 0- See Also:
- Constant Field Values
-
DEFAULT_BATCH_SIZE
public static final int DEFAULT_BATCH_SIZE
The default value of batchSize = 20.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FindOptions
public FindOptions()
Default constructor
-
FindOptions
public FindOptionsβ(FindOptions options)
Copy constructor- Parameters:
options
- the one to copy
-
FindOptions
public FindOptionsβ(JsonObject options)
Constructor from JSON- Parameters:
options
- the JSON
-
-
Method Detail
-
getCollation
public CollationOptions getCollation()
-
setCollation
public FindOptions setCollationβ(CollationOptions collation)
Set the collation- Parameters:
collation
-- Returns:
- reference to this, for fluency
-
toJson
public JsonObject toJson()
Convert to JSON- Returns:
- the JSON
-
getFields
public JsonObject getFields()
Get the fields- Returns:
- the fields
-
setFields
public FindOptions setFieldsβ(JsonObject fields)
Set the fields- Parameters:
fields
- the fields- Returns:
- reference to this, for fluency
-
getSort
public JsonObject getSort()
Get the sort document- Returns:
- the sort document
-
setSort
public FindOptions setSortβ(JsonObject sort)
Set the sort document- Parameters:
sort
- the sort document- Returns:
- reference to this, for fluency
-
getLimit
public int getLimit()
Get the limit - this determines the max number of rows to return- Returns:
- the limit
-
setLimit
public FindOptions setLimitβ(int limit)
Set the limit- Parameters:
limit
- the limit- Returns:
- reference to this, for fluency
-
getSkip
public int getSkip()
Get the skip. This determines how many results to skip before returning results.- Returns:
- the skip
-
setSkip
public FindOptions setSkipβ(int skip)
Set the skip- Parameters:
skip
- the skip- Returns:
- reference to this, for fluency
-
getBatchSize
public int getBatchSize()
- Returns:
- the batch size for methods loading found data in batches
-
setBatchSize
public FindOptions setBatchSizeβ(int batchSize)
Set the batch size for methods loading found data in batches.- Parameters:
batchSize
- the number of documents in a batch- Returns:
- reference to this, for fluency
-
getHint
public JsonObject getHint()
Get the hint. This determines the index to use.- Returns:
- the hint
-
setHint
public FindOptions setHintβ(JsonObject hint)
Set the hint- Parameters:
hint
- the hint- Returns:
- reference to this, for fluency
-
getHintString
public String getHintString()
Get the hint string. This determines the index to use.- Returns:
- the hint string
-
setHintString
public FindOptions setHintStringβ(String hintString)
Set the hint string- Parameters:
hintString
- the hint string- Returns:
- reference to this, for fluency
-
-