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 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 Summary

    Constructors
    Constructor and Description
    `FindOptions()` Default constructor
    `FindOptions(FindOptions options)` Copy constructor
    `FindOptions(JsonObject options)` Constructor from JSON

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### 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 = 10.
      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

    - #### 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

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2018 Eclipse. All rights reserved.