public class FindOptions extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BATCH_SIZE
The default value of batchSize = 20.
|
static int |
DEFAULT_LIMIT
The default value of limit = -1, signifying no limit
|
static int |
DEFAULT_SKIP
The default value of skip = 0
|
Constructor and Description |
---|
FindOptions()
Default constructor
|
FindOptions(FindOptions options)
Copy constructor
|
FindOptions(JsonObject options)
Constructor from JSON
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
getBatchSize() |
CollationOptions |
getCollation() |
JsonObject |
getFields()
Get the fields
|
JsonObject |
getHint()
Get the hint.
|
String |
getHintString()
Get the hint string.
|
int |
getLimit()
Get the limit - this determines the max number of rows to return
|
int |
getSkip()
Get the skip.
|
JsonObject |
getSort()
Get the sort document
|
int |
hashCode() |
FindOptions |
setBatchSize(int batchSize)
Set the batch size for methods loading found data in batches.
|
FindOptions |
setCollation(CollationOptions collation)
Set the collation
|
FindOptions |
setFields(JsonObject fields)
Set the fields
|
FindOptions |
setHint(JsonObject hint)
Set the hint
|
FindOptions |
setHintString(String hintString)
Set the hint string
|
FindOptions |
setLimit(int limit)
Set the limit
|
FindOptions |
setSkip(int skip)
Set the skip
|
FindOptions |
setSort(JsonObject sort)
Set the sort document
|
JsonObject |
toJson()
Convert to JSON
|
String |
toString() |
public static final int DEFAULT_LIMIT
public static final int DEFAULT_SKIP
public static final int DEFAULT_BATCH_SIZE
public FindOptions()
public FindOptions(FindOptions options)
options
- the one to copypublic FindOptions(JsonObject options)
options
- the JSONpublic CollationOptions getCollation()
public FindOptions setCollation(CollationOptions collation)
collation
- public JsonObject toJson()
public JsonObject getFields()
public FindOptions setFields(JsonObject fields)
fields
- the fieldspublic JsonObject getSort()
public FindOptions setSort(JsonObject sort)
sort
- the sort documentpublic int getLimit()
public FindOptions setLimit(int limit)
limit
- the limitpublic int getSkip()
public FindOptions setSkip(int skip)
skip
- the skippublic int getBatchSize()
public FindOptions setBatchSize(int batchSize)
batchSize
- the number of documents in a batchpublic JsonObject getHint()
public FindOptions setHint(JsonObject hint)
hint
- the hintpublic String getHintString()
public FindOptions setHintString(String hintString)
hintString
- the hint stringCopyright © 2024 Eclipse. All rights reserved.