org.xerial.db
Interface Tuple

All Known Implementing Classes:
AbstractTuple, TupleImpl, TupleOnBuffer

public interface Tuple

Tuple interface represents an instance of a Relation.

Author:
leo

Method Summary
 int getByteSize()
          Gets the byte size of this tuple
 Relation getRelation()
          Gets the relational schema of this tuple
 Object getValue(int columnIndex)
          Gets the column value
 Object getValue(String columnName)
          Gets the column value
 int load(BufferReader reader)
          Loads the tuple from the buffer
 int save(BufferWriter writer)
          Saves the tuple to the buffer
 void setValue(int columnIndex, Object value)
          Sets the tuple value of the specified column
 void setValue(String columnName, Object value)
          Gets the tuple value of the specified column name
 

Method Detail

getRelation

Relation getRelation()
Gets the relational schema of this tuple

Returns:

setValue

void setValue(int columnIndex,
              Object value)
Sets the tuple value of the specified column

Parameters:
columnIndex - the column index to which the value is set
value - the column value to set

setValue

void setValue(String columnName,
              Object value)
Gets the tuple value of the specified column name

Parameters:
columnName - the column name to which the value is set
value - the column value to set

getValue

Object getValue(int columnIndex)
Gets the column value

Parameters:
columnIndex - the column index from which the value is read
Returns:
the column value of the specfied column index

getValue

Object getValue(String columnName)
Gets the column value

Parameters:
columnName - the column name from which the value is read
Returns:
the column value of the specfied column name

getByteSize

int getByteSize()
Gets the byte size of this tuple

Returns:
the byte size of this tuple

load

int load(BufferReader reader)
Loads the tuple from the buffer

Parameters:
reader - the BufferReader
Returns:
the byte size read (tuple size)

save

int save(BufferWriter writer)
Saves the tuple to the buffer

Parameters:
writer - the BufferWriter
Returns:
the byte size wrote (tuple size)


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.