Package db

# Class SparseRecord

java.lang.Object
db.DBRecord
db.SparseRecord

All Implemented Interfaces:
  `Comparable<DBRecord>`

public class SparseRecord extends DBRecord

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `read(Buffer buf, int offset)`
  Read the record field data from the specified buffer and offset
  `void`
  `setBinaryData(int colIndex, byte[] bytes)`
  Set the binary data array for the specified field.
  `void`
  `setBooleanValue(int colIndex, boolean value)`
  Set the boolean value for the specified field.
  `void`
  `setByteValue(int colIndex, byte value)`
  Set the byte value for the specified field.
  `void`
  `setField(int colIndex, Field value)`
  Set the field value for the specified field.
  `void`
  `setIntValue(int colIndex, int value)`
  Set the integer value for the specified field.
  `void`
  `setLongValue(int colIndex, long value)`
  Set the long value for the specified field.
  `void`
  `setNull(int colIndex)`
  Set the field to a null state.
  `void`
  `setShortValue(int colIndex, short value)`
  Set the short value for the specified field.
  `void`
  `write(Buffer buf, int offset)`
  Write the record fields to the specified buffer and offset.

  ### Methods inherited from class db.DBRecord

  `compareFieldTo, compareTo, copy, equals, fieldEquals, getBinaryData, getBooleanValue, getByteValue, getColumnCount, getFieldValue, getIntValue, getKey, getKeyField, getLongValue, getShortValue, getString, hashCode, hasSameSchema, hasSameSchema, invalidateLength, isDirty, length, setKey, setKey, setString, toString`

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

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

- ## Method Details

  - ### write

    public void write(Buffer buf, int offset) throws IndexOutOfBoundsException, IOException
    Description copied from class: `DBRecord`
    Write the record fields to the specified buffer and offset.
    Overrides:
      `write` in class `DBRecord`
    Parameters:
      `buf` - data buffer
      `offset` - buffer offset
    Throws:
      `IndexOutOfBoundsException` - if invalid offset is specified
      `IOException` - thrown if IO error occurs

  - ### read

    public void read(Buffer buf, int offset) throws IndexOutOfBoundsException, IOException
    Description copied from class: `DBRecord`
    Read the record field data from the specified buffer and offset
    Overrides:
      `read` in class `DBRecord`
    Parameters:
      `buf` - data buffer
      `offset` - buffer offset
    Throws:
      `IndexOutOfBoundsException` - if invalid offset is specified
      `IOException` - thrown if IO error occurs

  - ### setField

    public void setField(int colIndex, Field value)
    Description copied from class: `DBRecord`
    Set the field value for the specified field.
    Overrides:
      `setField` in class `DBRecord`
    Parameters:
      `colIndex` - field index
      `value` - field value (null permitted for sparse column only)

  - ### setLongValue

    public void setLongValue(int colIndex, long value)
    Description copied from class: `DBRecord`
    Set the long value for the specified field.
    Overrides:
      `setLongValue` in class `DBRecord`
    Parameters:
      `colIndex` - field index
      `value` - field value

  - ### setIntValue

    public void setIntValue(int colIndex, int value)
    Description copied from class: `DBRecord`
    Set the integer value for the specified field.
    Overrides:
      `setIntValue` in class `DBRecord`
    Parameters:
      `colIndex` - field index
      `value` - field value

  - ### setShortValue

    public void setShortValue(int colIndex, short value)
    Description copied from class: `DBRecord`
    Set the short value for the specified field.
    Overrides:
      `setShortValue` in class `DBRecord`
    Parameters:
      `colIndex` - field index
      `value` - field value

  - ### setByteValue

    public void setByteValue(int colIndex, byte value)
    Description copied from class: `DBRecord`
    Set the byte value for the specified field.
    Overrides:
      `setByteValue` in class `DBRecord`
    Parameters:
      `colIndex` - field index
      `value` - field value

  - ### setBooleanValue

    public void setBooleanValue(int colIndex, boolean value)
    Description copied from class: `DBRecord`
    Set the boolean value for the specified field.
    Overrides:
      `setBooleanValue` in class `DBRecord`
    Parameters:
      `colIndex` - field index
      `value` - field value

  - ### setBinaryData

    public void setBinaryData(int colIndex, byte[] bytes)
    Description copied from class: `DBRecord`
    Set the binary data array for the specified field.
    Overrides:
      `setBinaryData` in class `DBRecord`
    Parameters:
      `colIndex` - field index
      `bytes` - field value

  - ### setNull

    public void setNull(int colIndex)
    Description copied from class: `DBRecord`
    Set the field to a null state. For a non-sparse fixed-length column field this will set the the value to zero and the null state will not be persisted when stored.
    Overrides:
      `setNull` in class `DBRecord`
    Parameters:
      `colIndex` - field index