Class FindOptions
java.lang.Object
io.vertx.ext.mongo.FindOptions
Options used to configure find operations.
- Author:
- Nick Scavelli
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default value of batchSize = 20.static final intThe default value of limit = -1, signifying no limitstatic final intThe default value of skip = 0 -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorFindOptions(JsonObject options) Constructor from JSONFindOptions(FindOptions options) Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionbooleanintGet the fieldsgetHint()Get the hint.Get the hint string.intgetLimit()Get the limit - this determines the max number of rows to returnintgetSkip()Get the skip.getSort()Get the sort documentinthashCode()setBatchSize(int batchSize) Set the batch size for methods loading found data in batches.setCollation(CollationOptions collation) Set the collationsetFields(JsonObject fields) Set the fieldssetHint(JsonObject hint) Set the hintsetHintString(String hintString) Set the hint stringsetLimit(int limit) Set the limitsetSkip(int skip) Set the skipsetSort(JsonObject sort) Set the sort documenttoJson()Convert to JSONtoString()
-
Field Details
-
DEFAULT_LIMIT
public static final int DEFAULT_LIMITThe default value of limit = -1, signifying no limit- See Also:
-
DEFAULT_SKIP
public static final int DEFAULT_SKIPThe default value of skip = 0- See Also:
-
DEFAULT_BATCH_SIZE
public static final int DEFAULT_BATCH_SIZEThe default value of batchSize = 20.- See Also:
-
-
Constructor Details
-
FindOptions
public FindOptions()Default constructor -
FindOptions
-
FindOptions
-
-
Method Details
-
getCollation
-
setCollation
Set the collation- Parameters:
collation-- Returns:
- reference to this, for fluency
-
toJson
-
getFields
-
setFields
Set the fields- Parameters:
fields- the fields- Returns:
- reference to this, for fluency
-
getSort
-
setSort
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
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
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
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
-
setHint
Set the hint- Parameters:
hint- the hint- Returns:
- reference to this, for fluency
-
getHintString
Get the hint string. This determines the index to use.- Returns:
- the hint string
-
setHintString
Set the hint string- Parameters:
hintString- the hint string- Returns:
- reference to this, for fluency
-
equals
-
hashCode
-
toString
-