org.h2.result

## Class RowImpl

- java.lang.Object
- - org.h2.result.RowImpl

All Implemented Interfaces:
  Row, SearchRow

    public class RowImpl
    extends java.lang.Object
    implements Row

Default row implementation.

### Field Summary

### Fields inherited from interface org.h2.result.Row

`EMPTY_ARRAY, MEMORY_CALCULATE`

### Constructor Summary

Constructors
Constructor and Description
`RowImpl(Value[] data, int memory)`

### Method Summary

Methods
`void` `commit()` This record has been committed.
`int` `getByteCount(Data dummy)` Get the number of bytes required for the data.
`int` `getColumnCount()` Get the column count.
`Row` `getCopy()` Get a copy of the row that is distinct from (not equal to) this row.
`long` `getKey()` Get the unique key of the row.
`int` `getMemory()` Get the estimated memory used for this row, in bytes.
`int` `getSessionId()` Get session id.
`Value` `getValue(int i)` Get the value for the column
`Value[]` `getValueList()` Get values.
`int` `getVersion()` Get the version of the row.
`boolean` `isDeleted()` Check if the row is deleted.
`boolean` `isEmpty()` Check if this is an empty row.
`void` `setDeleted(boolean deleted)` Mark the row as deleted.
`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` `setSessionId(int sessionId)` Set session id.
`void` `setValue(int i, Value v)` Set the value for given column
`void` `setVersion(int version)` Set version.
`java.lang.String` `toString()`

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

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

### Constructor Detail

#### RowImpl

    public RowImpl(Value[] data,
           int memory)

### Method Detail

#### getCopy

    public Row getCopy()

Get a copy of the row that is distinct from (not equal to) this row. This is used for FOR UPDATE to allow pseudo-updating a row.

Specified by:
  `getCopy` in interface `Row`
Returns:
  a new row with the same data

#### 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)

Description copied from interface: `Row`
Set version.

Specified by:
  `setVersion` in interface `Row`
Parameters:
  `version` - row 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

#### 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

#### getByteCount

    public int getByteCount(Data dummy)

Get the number of bytes required for the data.

Specified by:
  `getByteCount` in interface `Row`
Parameters:
  `dummy` - the template buffer
Returns:
  the number of bytes

#### 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 interface: `Row`
Check if this is an empty row.

Specified by:
  `isEmpty` in interface `Row`
Returns:
  `true` if the row is empty

#### getColumnCount

    public int getColumnCount()

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

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

#### getMemory

    public int getMemory()

Description copied from interface: `SearchRow`
Get the estimated memory used for this row, in bytes.

Specified by:
  `getMemory` in interface `SearchRow`
Returns:
  the memory

#### toString

    public java.lang.String toString()

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

#### setDeleted

    public void setDeleted(boolean deleted)

Description copied from interface: `Row`
Mark the row as deleted.

Specified by:
  `setDeleted` in interface `Row`
Parameters:
  `deleted` - deleted flag

#### setSessionId

    public void setSessionId(int sessionId)

Description copied from interface: `Row`
Set session id.

Specified by:
  `setSessionId` in interface `Row`
Parameters:
  `sessionId` - the session id

#### getSessionId

    public int getSessionId()

Description copied from interface: `Row`
Get session id.

Specified by:
  `getSessionId` in interface `Row`
Returns:
  the session id

#### commit

    public void commit()

This record has been committed. The session id is reset.

Specified by:
  `commit` in interface `Row`

#### isDeleted

    public boolean isDeleted()

Description copied from interface: `Row`
Check if the row is deleted.

Specified by:
  `isDeleted` in interface `Row`
Returns:
  `true` if the row is deleted

#### getValueList

    public Value[] getValueList()

Description copied from interface: `Row`
Get values.

Specified by:
  `getValueList` in interface `Row`
Returns:
  values