org.firebirdsql.gds.ng.fields

## Class RowDescriptor

- java.lang.Object
- - org.firebirdsql.gds.ng.fields.RowDescriptor

- All Implemented Interfaces:
    java.lang.Iterable<FieldDescriptor>

      public final class RowDescriptor
      extends java.lang.Object
      implements java.lang.Iterable<FieldDescriptor>

  The class `RowDescriptor` is a java mapping of the XSQLDA server data structure used to describe the row metadata of one row for input or output.

  RowDescriptor is an immutable, values of a row are maintained separately in a collection of `FieldValue` instances.

  Version:
    3.0
  Author:
    Mark Rotteveel

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `RowValue` | `createDefaultFieldValues()` Creates a `List` with default `FieldValue` instances as returned by `FieldDescriptor.createDefaultFieldValue()`.
    `static RowDescriptor` | `createRowDescriptor(FieldDescriptor[] fieldDescriptors, DatatypeCoder datatypeCoder)` Creates an instance of `RowDescriptor` with the supplied `FieldDescriptor` instances.
    `static RowDescriptor` | `empty(DatatypeCoder datatypeCoder)` Returns an empty row descriptor with the specified datatype coder.
    `boolean` | `equals(java.lang.Object obj)`
    `int` | `getCount()`
    `DatatypeCoder` | `getDatatypeCoder()`
    `IEncodingFactory` | `getEncodingFactory()`
    `FieldDescriptor` | `getFieldDescriptor(int index)` Gets the `FieldDescriptor` at the specified (0-based) index.
    `java.util.List<FieldDescriptor>` | `getFieldDescriptors()`
    `int` | `hashCode()`
    `java.util.Iterator<FieldDescriptor>` | `iterator()`
    `java.lang.String` | `toString()`

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

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

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Method Detail

    - #### getDatatypeCoder

          public DatatypeCoder getDatatypeCoder()

      Returns:
        The `DatatypeCoder`.

    - #### getEncodingFactory

          public IEncodingFactory getEncodingFactory()

      Returns:
        The `IEncodingFactory`.

    - #### getCount

          public int getCount()

      Returns:
        The number of fields.

    - #### getFieldDescriptor

          public FieldDescriptor getFieldDescriptor(int index)

      Gets the `FieldDescriptor` at the specified (0-based) index.
      Parameters:
        `index` - 0-based index of the field
      Returns:
        FieldDescriptor
      Throws:
        `java.lang.IndexOutOfBoundsException` - if index is not `0 <= index < getCount`

    - #### getFieldDescriptors

          public java.util.List<FieldDescriptor> getFieldDescriptors()

      Returns:
        An unmodifiable List of the `FieldDescriptor` instances of this row.

    - #### createDefaultFieldValues

          public RowValue createDefaultFieldValues()

      Creates a `List` with default `FieldValue` instances as returned by `FieldDescriptor.createDefaultFieldValue()`.

      The (0-based) index of the FieldValue in the list corresponds with the (0-based) index of the `FieldDescriptor` within this `RowDescriptor`.

      Returns:
        Default `FieldValue` instances for the `FieldDescriptor` instance contained in this instance.

    - #### iterator

          public java.util.Iterator<FieldDescriptor> iterator()

      Specified by:
        `iterator` in interface `java.lang.Iterable<FieldDescriptor>`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### createRowDescriptor

          public static RowDescriptor createRowDescriptor(FieldDescriptor[] fieldDescriptors,
                                                          DatatypeCoder datatypeCoder)

      Creates an instance of `RowDescriptor` with the supplied `FieldDescriptor` instances.
      Parameters:
        `fieldDescriptors` - The field descriptors (array is cloned before use)
        `datatypeCoder` - he datatype code for the connection that uses this RowDescriptor.
      Returns:
        `RowDescriptor` instance

    - #### empty

          public static RowDescriptor empty(DatatypeCoder datatypeCoder)

      Returns an empty row descriptor with the specified datatype coder.
      Parameters:
        `datatypeCoder` - The datatype code for the connection that uses this RowDescriptor.
      Returns:
        Empty row descriptor

Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.