Top Description Fields Constructors Methods
org.h2.result

public Class DefaultRow

extends Row
Class Inheritance
Known Direct Subclasses
org.h2.result.Sparse
Imports
org.h2.engine.Constants, org.h2.value.Value, .ValueBigint

The default implementation of a row in a table.

Field Summary

Modifier and TypeField and Description
protected final Value[]
data

The values of the row (one entry per column).

private int
public static final int
MEMORY_CALCULATE

Hides org.h2.result.SearchRow.MEMORY_CALCULATE.

The constant that means "memory usage is unknown and needs to be calculated first".

Constructor Summary

AccessConstructor and Description
pack-priv
DefaultRow(int columnCount)

public
DefaultRow(Value[] data)

public
DefaultRow(Value[] data, int memory)

Method Summary

Modifier and TypeMethod and Description
protected int

Returns:

the memory
calculateMemory
()

Calculate the estimated memory used for this row, in bytes.

public void
copyFrom(SearchRow
source of column values
source
)

Implements abstract org.h2.result.SearchRow.copyFrom.

Copy all relevant values from the source to this row.

public int
getColumnCount()

Implements abstract org.h2.result.SearchRow.getColumnCount.

Get the column count.

public int
getMemory()

Implements abstract org.h2.result.SearchRow.getMemory.

Get the estimated memory used for this row, in bytes.

public Value
getValue(int
the column number (starting with 0)
i
)

Implements abstract org.h2.result.SearchRow.getValue.

Get the value for the column

public Value[]
getValueList()

Implements abstract org.h2.result.Row.getValueList.

Get values.

public boolean
hasSharedData(Row
the other row
other
)

Overrides org.h2.result.Row.hasSharedData.

Check whether this row and the specified row share the same underlying data with values.

public void
setValue(int
the column number (starting with 0)
i
,
Value
the new value
v
)

Implements abstract org.h2.result.SearchRow.setValue.

Set the value for given column

public String
toString()

Overrides org.h2.value.Value.toString.

Returns a string representation of the object.

Inherited from org.h2.result.Row:
getgethasSameValues

Field Detail

databack to summary
protected final Value[] data

The values of the row (one entry per column).

memoryback to summary
private int memory
MEMORY_CALCULATEback to summary
public static final int MEMORY_CALCULATE

Hides org.h2.result.SearchRow.MEMORY_CALCULATE.

The constant that means "memory usage is unknown and needs to be calculated first".

Constructor Detail

DefaultRowback to summary
pack-priv DefaultRow(int columnCount)
DefaultRowback to summary
public DefaultRow(Value[] data)
DefaultRowback to summary
public DefaultRow(Value[] data, int memory)

Method Detail

calculateMemoryback to summary
protected int calculateMemory()

Calculate the estimated memory used for this row, in bytes.

Returns:int

the memory

copyFromback to summary
public void copyFrom(SearchRow source)

Implements abstract org.h2.result.SearchRow.copyFrom.

Doc from org.h2.result.SearchRow.copyFrom.

Copy all relevant values from the source to this row.

Parameters
source:SearchRow

source of column values

Annotations
@Override
getColumnCountback to summary
public int getColumnCount()

Implements abstract org.h2.result.SearchRow.getColumnCount.

Doc from org.h2.result.SearchRow.getColumnCount.

Get the column count.

Returns:int

the column count

Annotations
@Override
getMemoryback to summary
public int getMemory()

Implements abstract org.h2.result.SearchRow.getMemory.

Doc from org.h2.result.SearchRow.getMemory.

Get the estimated memory used for this row, in bytes.

Returns:int

the memory

Annotations
@Override
getValueback to summary
public Value getValue(int i)

Implements abstract org.h2.result.SearchRow.getValue.

Doc from org.h2.result.SearchRow.getValue.

Get the value for the column

Parameters
i:int

the column number (starting with 0)

Returns:Value

the value

Annotations
@Override
getValueListback to summary
public Value[] getValueList()

Implements abstract org.h2.result.Row.getValueList.

Doc from org.h2.result.Row.getValueList.

Get values.

Returns:Value[]

values

Annotations
@Override
hasSharedDataback to summary
public boolean hasSharedData(Row other)

Overrides org.h2.result.Row.hasSharedData.

Doc from org.h2.result.Row.hasSharedData.

Check whether this row and the specified row share the same underlying data with values. This method must return false when values are not equal and may return either true or false when they are equal. This method may be used only for optimizations and should not perform any slow checks, such as equality checks for all pairs of values.

Parameters
other:Row

the other row

Returns:boolean

true if rows share the same underlying data, false otherwise or when unknown

Annotations
@Override
setValueback to summary
public void setValue(int i, Value v)

Implements abstract org.h2.result.SearchRow.setValue.

Doc from org.h2.result.SearchRow.setValue.

Set the value for given column

Parameters
i:int

the column number (starting with 0)

v:Value

the new value

Annotations
@Override
toStringback to summary
public String toString()

Overrides org.h2.value.Value.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override