org.h2.result
Class Row

java.lang.Object
  extended by org.h2.result.Row
All Implemented Interfaces:
SearchRow

public class Row
extends java.lang.Object
implements SearchRow

Represents a row in a table.


Field Summary
static Row[] EMPTY_ARRAY
           
static int MEMORY_CALCULATE
           
 
Constructor Summary
Row(Value[] data, int memory)
           
 
Method Summary
 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.
 long getKey()
          Get the unique key of the row.
 int getMemory()
          Get the estimated memory used for this row, in bytes.
 int getSessionId()
           
 Value getValue(int i)
          Get the value for the column
 int getVersion()
          Get the version of the row.
 boolean isDeleted()
           
 boolean isEmpty()
           
 void setDeleted(boolean 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)
           
 void setValue(int i, Value v)
          Set the value for given column
 void setVersion(int version)
           
 java.lang.String toString()
           
 
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

EMPTY_ARRAY

public static final Row[] EMPTY_ARRAY
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

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.

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

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)

setSessionId

public void setSessionId(int sessionId)

getSessionId

public int getSessionId()

commit

public void commit()
This record has been committed. The session id is reset.


isDeleted

public boolean isDeleted()