## org.h2.result
Class Row

    java.lang.Object
      org.h2.util.CacheObject
          org.h2.store.Record
              org.h2.result.Row

All Implemented Interfaces:
  SearchRow

    public class Row

extends Record
implements SearchRow

Represents a row in a table.

Field Summary
`static int` `MEMORY_CALCULATE`

Fields inherited from class org.h2.util.CacheObject
`blockCount, cacheChained, cacheNext, cachePrevious, cacheQueue`

Constructor Summary
`Row(Value[] data, int memory)`

Method Summary
`int` `getByteCount(DataPage dummy)` Get the number of bytes required for the data if the given data page would be used.
`int` `getColumnCount()` Get the column count.
`long` `getKey()` Get the unique key of the row.
`int` `getMemorySize()` Get the estimated memory size.
`Value` `getValue(int i)` Get the value for the column
`int` `getVersion()` Get the version of the row.
`boolean` `isEmpty()` Check if this record is empty.
`void` `setKey(long key)` Set the unique key of the row.
`void` `setKeyAndVersion(SearchRow row)` Set the position and version to match another row.
`void` `setPos(int pos)`
`void` `setValue(int i, Value v)` Set the value for given column
`void` `setVersion(int version)`
`java.lang.String` `toString()`
`void` `write(DataPage buff)` Write the record to the data page.

Methods inherited from class org.h2.store.Record
`canRemove, commit, getSessionId, getStorageId, isDeleted, isLogWritten, prepareWrite, setDeleted, setLastLog, setLogWritten, setSessionId, setStorageId`

Methods inherited from class org.h2.util.CacheObject
`getBlockCount, getPos, isChanged, isPinned, setBlockCount, setChanged, sort`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### MEMORY_CALCULATE

    public static final int MEMORY_CALCULATE

See Also:
  Constant Field Values

Constructor Detail

### Row

    public Row(Value[] data,
               int memory)

Method Detail

### setKeyAndVersion

    public void setKeyAndVersion(SearchRow row)

  Description copied from interface: `SearchRow`
  Set the position and version to match another row.

  Specified by:
    `setKeyAndVersion` in interface `SearchRow`
  Parameters:
    `row` - the other row.

### getVersion

    public int getVersion()

  Description copied from interface: `SearchRow`
  Get the version of the row.

  Specified by:
    `getVersion` in interface `SearchRow`
  Returns:
    the version

### setVersion

    public void setVersion(int version)

### getKey

    public long getKey()

  Description copied from interface: `SearchRow`
  Get the unique key of the row.

  Specified by:
    `getKey` in interface `SearchRow`
  Returns:
    the key

### setKey

    public void setKey(long key)

  Description copied from interface: `SearchRow`
  Set the unique key of the row.

  Specified by:
    `setKey` in interface `SearchRow`
  Parameters:
    `key` - the key

### setPos

    public void setPos(int pos)

  Overrides:
    `setPos` in class `CacheObject`

### getValue

    public Value getValue(int i)

  Description copied from interface: `SearchRow`
  Get the value for the column

  Specified by:
    `getValue` in interface `SearchRow`
  Parameters:
    `i` - the column number (starting with 0)
  Returns:
    the value

### write

    public void write(DataPage buff)
               throws java.sql.SQLException

  Description copied from class: `Record`
  Write the record to the data page.

  Specified by:
    `write` in class `Record`
  Parameters:
    `buff` - the data page
  Throws:
    `java.sql.SQLException`

### getByteCount

    public int getByteCount(DataPage dummy)
                     throws java.sql.SQLException

  Description copied from class: `Record`
  Get the number of bytes required for the data if the given data page would be used.

  Specified by:
    `getByteCount` in class `Record`
  Parameters:
    `dummy` - the template data page
  Returns:
    the number of bytes
  Throws:
    `java.sql.SQLException`

### setValue

    public void setValue(int i,
                         Value v)

  Description copied from interface: `SearchRow`
  Set the value for given column

  Specified by:
    `setValue` in interface `SearchRow`
  Parameters:
    `i` - the column number (starting with 0)
    `v` - the new value

### isEmpty

    public boolean isEmpty()

  Description copied from class: `Record`
  Check if this record is empty.

  Overrides:
    `isEmpty` in class `Record`
  Returns:
    false

### getColumnCount

    public int getColumnCount()

  Description copied from interface: `SearchRow`
  Get the column count.

  Specified by:
    `getColumnCount` in interface `SearchRow`
  Returns:
    the column count

### getMemorySize

    public int getMemorySize()

  Description copied from class: `CacheObject`
  Get the estimated memory size.

  Overrides:
    `getMemorySize` in class `CacheObject`
  Returns:
    number of double words (4 bytes)

### toString

    public java.lang.String toString()

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