Package oracle.nosql.driver

## Class FieldRange

- java.lang.Object
- - oracle.nosql.driver.FieldRange

-     public class FieldRange
      extends Object

  FieldRange defines a range of values to be used in a `NoSQLHandle.multiDelete(oracle.nosql.driver.ops.MultiDeleteRequest)` operation, as specified in `MultiDeleteRequest.setRange(oracle.nosql.driver.FieldRange)`. FieldRange is used as the least significant component in a partially specified key value in order to create a value range for an operation that returns multiple rows or keys. The data types supported by FieldRange are limited to the atomic types which are valid for primary keys.

  The least significant component of a key is the first component of the key that is not fully specified. For example, if the primary key for a table is defined as the tuple <a, b, c> a FieldRange can be specified for a if the primary key supplied is empty. A FieldRange can be specified for b if the primary key supplied to the operation has a concrete value for a but not for b or c.

  This object is used to scope a `NoSQLHandle.multiDelete(oracle.nosql.driver.ops.MultiDeleteRequest)` operation. The fieldPath specified must name a field in a table's primary key. The values used must be of the same type and that type must match the type of the field specified.

  Validation of this object is performed when is it used in an operation. Validation includes verifying that the field is in the required key and, in the case of a composite key, that the field is in the proper order relative to the key used in the operation.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FieldRange​(String fieldPath)` | Create a value based on a specific field

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `FieldValue` | `getEnd()` | Returns the FieldValue that defines upper bound of the range, or null if no upper bound is enforced.
    `boolean` | `getEndInclusive()` | Returns whether end is included in the range, i.e., end is greater than or equal to the last FieldValue in the range.
    `String` | `getFieldPath()` | Returns the name for the field used in the range.
    `FieldValue` | `getStart()` | Returns the FieldValue that defines lower bound of the range, or null if no lower bound is enforced.
    `boolean` | `getStartInclusive()` | Returns whether start is included in the range, i.e., start is less than or equal to the first FieldValue in the range.
    `FieldRange` | `setEnd​(FieldValue value, boolean isInclusive)` | Sets the end value of the range to the specified value.
    `FieldRange` | `setStart​(FieldValue value, boolean isInclusive)` | Sets the start value of the range to the specified value.
    `String` | `toString()` |
    `void` | `validate()` | Internal use only Ensures that the object is self-consistent and if not, throws IllegalArgumentException.

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

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### FieldRange

          public FieldRange​(String fieldPath)

      Create a value based on a specific field
      Parameters:
        `fieldPath` - the path to the field used in the range

  - ### Method Detail

    - #### getStart

          public FieldValue getStart()

      Returns the FieldValue that defines lower bound of the range, or null if no lower bound is enforced.
      Returns:
        the start FieldValue

    - #### getStartInclusive

          public boolean getStartInclusive()

      Returns whether start is included in the range, i.e., start is less than or equal to the first FieldValue in the range. This value is valid only if the start value is not null.
      Returns:
        true if the start value is inclusive

    - #### getEnd

          public FieldValue getEnd()

      Returns the FieldValue that defines upper bound of the range, or null if no upper bound is enforced.
      Returns:
        the end FieldValue

    - #### getEndInclusive

          public boolean getEndInclusive()

      Returns whether end is included in the range, i.e., end is greater than or equal to the last FieldValue in the range. This value is valid only if the end value is not null.
      Returns:
        true if the end value is inclusive

    - #### getFieldPath

          public String getFieldPath()

      Returns the name for the field used in the range.
      Returns:
        the name of the field

    - #### setStart

          public FieldRange setStart​(FieldValue value,
                                     boolean isInclusive)

      Sets the start value of the range to the specified value.
      Parameters:
        `value` - the value to set
        `isInclusive` - set to true if the range is inclusive of the value, false if it is exclusive.
      Returns:
        this

    - #### setEnd

          public FieldRange setEnd​(FieldValue value,
                                   boolean isInclusive)

      Sets the end value of the range to the specified value.
      Parameters:
        `value` - the value to set
        `isInclusive` - set to true if the range is inclusive of the value, false if it is exclusive.
      Returns:
        this

    - #### validate

          public void validate()

      Internal use only Ensures that the object is self-consistent and if not, throws IllegalArgumentException. Validation of the range values themselves is done remotely.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`