com.tibco.datagrid

## Interface Row

- All Superinterfaces:
    java.lang.Iterable<Column>

      public interface Row
      extends java.lang.Iterable<Column>

  Row objects contain columns with values.

  To create a row object, call `Table.createRow`.

  A program that creates a row must explicitly call `Row.destroy` to reclaim its resources.

  This interface is implemented internally. Applications do not implement this interface.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Clear all columns in a row.
    `Row` | `copy()` Copy a row
    `void` | `destroy()` Destroy a row object.
    `ColumnType` | `getColumnType(java.lang.String columnName)` Get the type of the column.
    `TibDateTime` | `getDateTime(java.lang.String columnName)` Get the value of a TibDateTime field from a row.
    `double` | `getDouble(java.lang.String columnName)` Get the value of a double floating-point field from a row.
    `long` | `getExpiration()` Get the expiration time for the row.
    `long` | `getLong(java.lang.String columnName)` Get the value of a long field from a row.
    `byte[]` | `getOpaque(java.lang.String columnName)` Get the value of an opaque field from a row.
    `java.lang.String` | `getString(java.lang.String columnName)` Get the value of a string column from a row.
    `Table` | `getTable()` Get the table associated with the row
    `boolean` | `isColumnSet(java.lang.String columnName)` Determine whether a column is set in a row.
    `RowIterator` | `iterator()` Returns a `RowIterator` to iterate over the columns of a row.
    `void` | `setDateTime(java.lang.String columnName, TibDateTime dateTime)` Set a TibDateTime field in a row.
    `void` | `setDouble(java.lang.String columnName, double value)` Set a double floating-point field in a row.
    `void` | `setLong(java.lang.String columnName, long value)` Set a long integer field in a row.
    `void` | `setOpaque(java.lang.String columnName, byte[] value)` Set an opaque (byte-array) field in a row.
    `void` | `setString(java.lang.String columnName, java.lang.String value)` Set a string field in a row.
    `void` | `setTTL(long value)` Set the time-to-live for this row, overriding the table's default value.

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

      `forEach, spliterator`

- - ### Method Detail

    - #### getColumnType

          ColumnType getColumnType(java.lang.String columnName)
                            throws DataGridException

      Get the type of the column.
      Parameters:
        `columnName` - The call gets the type of this column
      Returns:
        the column type
      Throws:
        `DataGridException` - in case of failures

    - #### isColumnSet

          boolean isColumnSet(java.lang.String columnName)
                       throws DataGridException

      Determine whether a column is set in a row.

      If it is not set, then getting the column value throws a DataGridException.

      Parameters:
        `columnName` - The method checks for a column with this name.
      Returns:
        `true` if the field is set; `false` otherwise
      Throws:
        `DataGridException` - in case of failures

    - #### getString

          java.lang.String getString(java.lang.String columnName)
                              throws DataGridException

      Get the value of a string column from a row.

      The string is valid only for the lifetime of the row. The string is part of the row object; the program must neither modify nor free it.

      Parameters:
        `columnName` - The method gets the value of the column with this name.
      Returns:
        the string value of a field
      Throws:
        `DataGridException` - The column is not defined in the table

    - #### getOpaque

          byte[] getOpaque(java.lang.String columnName)
                    throws DataGridException

      Get the value of an opaque field from a row.

      This method copies the bytes from the row.

      Parameters:
        `columnName` - The method gets the value of the column with this name.
      Returns:
        the bytes value of a opaque field
      Throws:
        `DataGridException` - The column is not defined in the table, or is not set in the row.

    - #### getLong

          long getLong(java.lang.String columnName)
                throws DataGridException

      Get the value of a long field from a row.
      Parameters:
        `columnName` - The method gets the value of the field with this name.
      Returns:
        the array value of the field
      Throws:
        `DataGridException` - The field is not defined in the table, or is not set in the row.

    - #### getDouble

          double getDouble(java.lang.String columnName)
                    throws DataGridException

      Get the value of a double floating-point field from a row.
      Parameters:
        `columnName` - The method gets the value of the column with this name.
      Returns:
        the double value of a field
      Throws:
        `DataGridException` - The field is not defined in the table, or is not set in the row.

    - #### getDateTime

          TibDateTime getDateTime(java.lang.String columnName)
                           throws DataGridException

      Get the value of a TibDateTime field from a row.
      Parameters:
        `columnName` - The method gets the value of the field with this name.
      Returns:
        the TibDateTime value of a field
      Throws:
        `DataGridException` - The field is not defined in the table, or is not set in the row.

    - #### setDateTime

          void setDateTime(java.lang.String columnName,
                           TibDateTime dateTime)
                    throws DataGridException

      Set a TibDateTime field in a row.

      The method copies the value into the row.

      Parameters:
        `columnName` - The method sets the value of the column with this name.
        `dateTime` - The method sets this TibDateTime as the column value. If null, this method clears the field.
      Throws:
        `DataGridException` - in case of failures

    - #### setDouble

          void setDouble(java.lang.String columnName,
                         double value)
                  throws DataGridException

      Set a double floating-point field in a row.
      Parameters:
        `columnName` - The method sets the value of the column with this name.
        `value` - The method sets this double as the column value.
      Throws:
        `DataGridException` - in case of failures

    - #### setString

          void setString(java.lang.String columnName,
                         java.lang.String value)
                  throws DataGridException

      Set a string field in a row.

      This method copies the string value into the row.

      Parameters:
        `columnName` - The method sets the value of the column with this name.
        `value` - The method sets this string as the column value. If null, this method clears the field.
      Throws:
        `DataGridException` - in case of failures

    - #### setLong

          void setLong(java.lang.String columnName,
                       long value)
                throws DataGridException

      Set a long integer field in a row.
      Parameters:
        `columnName` - The method sets the value of the column with this name.
        `value` - The method sets this long as the column value.
      Throws:
        `DataGridException` - in case of failures

    - #### setOpaque

          void setOpaque(java.lang.String columnName,
                         byte[] value)
                  throws DataGridException

      Set an opaque (byte-array) field in a row.

      This method copies the entire byte-array into the column.

      Parameters:
        `columnName` - The method sets the value of the column with this name.
        `value` - The method sets this byte-array as the column value. If null, this method clears the field.
      Throws:
        `DataGridException` - in case of failures

    - #### setTTL

          void setTTL(long value)
               throws DataGridException

      Set the time-to-live for this row, overriding the table's default value.

      An application can set this on a row before storing it in the table to override the table's default TTL value. It is an error to set this column on a row if the row's table does not have expiration enabled.

      Parameters:
        `value` - The number of seconds before the row becomes available for expiration.
      Throws:
        `DataGridException` - in case of failures

    - #### getExpiration

          long getExpiration()
                      throws DataGridException

      Get the expiration time for the row.

      It is an error to call this on a row if the row's table does not have expiration enabled or if the row was not retrieved from a table or iterator.

      Returns:
        the time, expressed as seconds since January 1st, 1970 (UTC), that the row becomes available for expiration.
      Throws:
        `DataGridException` - in case of failures

    - #### clear

          void clear()
              throws DataGridException

      Clear all columns in a row.

      After clearing all columns, you can re-use the row.

      This call is more efficient than creating a new empty row.

      Throws:
        `DataGridException` - in case of failures

    - #### getTable

          Table getTable()
                  throws DataGridException

      Get the table associated with the row
      Returns:
        the Table associated with the row
      Throws:
        `DataGridException` - in case of failures

    - #### copy

          Row copy()
            throws DataGridException

      Copy a row

      The row returned can be modified and is owned by the caller even if the row it was copies from was not.

      Returns:
        A copy of the row
      Throws:
        `DataGridException` - in case of failures

    - #### destroy

          void destroy()
                throws DataGridException

      Destroy a row object.

      Do not destroy a row if the program needs data that the row owns -- for example, a string (from `getString`), an opaque pointer (from `getOpaque`)

      Destroying a row frees all resources associated with it.

      Throws:
        `DataGridException` - in case of failures

    - #### iterator

          RowIterator iterator()

      Returns a `RowIterator` to iterate over the columns of a row.
      Specified by:
        `iterator` in interface `java.lang.Iterable<Column>`
      Returns:
        A `RowIterator` to iterate over the columns of a row.