public class FindOptions extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BATCH_SIZE
The default value of batchSize = 10.
|
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() |
JsonObject |
getFields()
Get the fields
|
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 |
setFields(JsonObject fields)
Set the fields
|
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
|
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 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 batchCopyright © 2021 Eclipse. All rights reserved.