com.alarexgroup.m2mplf.db
Class TableRecord

java.lang.Object
  extended by com.alarexgroup.m2mplf.db.TableRecord
public final class TableRecord
extends java.lang.Object

This class represents row of table. This class is used from class "Table" and serves to access to individual items - columns in table.

Field Summary
static byte TYPE_BINARY
          Type BINARY - byte array
static byte TYPE_BYTE
          Type BYTE
static byte TYPE_DOUBLE
          Type DOUBLE
static byte TYPE_FLOAT
          Type FLOAT
static byte TYPE_INT
          Type INT
static byte TYPE_LONG
          TYPe DOUBLE
static byte TYPE_SHORT
          Type SHORT
static byte TYPE_STRING
          Type String
 
Method Summary
 byte[] getColumnAsBinary(int id)
          Reads column as a BINARY value - array of bytes
 byte getColumnAsByte(int id)
          Reads column as a BYTE value
 double getColumnAsDouble(int id)
          Reads column as a DOUBLE value
 float getColumnAsFloat(int id)
          Reads column as a FLOAT value
 int getColumnAsInt(int id)
          Reads column as a INT value
 long getColumnAsLong(int id)
          Reads column as a LONG value
 int getColumnAsShort(int id)
          Reads column as a SHORT value
 java.lang.String getColumnAsString(int id)
          Reads column as a String value
 void setColumnAsBinary(int id, byte[] value)
          Saves into column of byte's array
 void setColumnAsByte(int id, byte value)
          Saves BYTE value into column
 void setColumnAsDouble(int id, double value)
          Saves FLOAT value into column
 void setColumnAsFloat(int id, float value)
          Saves FLOAT value into column
 void setColumnAsInt(int id, int value)
          Saves INT value into column
 void setColumnAsLong(int id, long value)
          Saves LONG value into column
 void setColumnAsShort(int id, short value)
          Saves SHORT value into column
 void setColumnAsString(int id, java.lang.String value)
          Saves String value into column as String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_STRING

public static final byte TYPE_STRING
Type String

See Also:
Constant Field Values

TYPE_INT

public static final byte TYPE_INT
Type INT

See Also:
Constant Field Values

TYPE_FLOAT

public static final byte TYPE_FLOAT
Type FLOAT

See Also:
Constant Field Values

TYPE_LONG

public static final byte TYPE_LONG
TYPe DOUBLE

See Also:
Constant Field Values

TYPE_BYTE

public static final byte TYPE_BYTE
Type BYTE

See Also:
Constant Field Values

TYPE_BINARY

public static final byte TYPE_BINARY
Type BINARY - byte array

See Also:
Constant Field Values

TYPE_DOUBLE

public static final byte TYPE_DOUBLE
Type DOUBLE

See Also:
Constant Field Values

TYPE_SHORT

public static final byte TYPE_SHORT
Type SHORT

See Also:
Constant Field Values
Method Detail

setColumnAsString

public void setColumnAsString(int id,
                              java.lang.String value)
Saves String value into column as String

Parameters:
id - number of column
value -

setColumnAsLong

public void setColumnAsLong(int id,
                            long value)
Saves LONG value into column

Parameters:
id - clumn number
value -

setColumnAsInt

public void setColumnAsInt(int id,
                           int value)
Saves INT value into column

Parameters:
id - clumn number
value -

setColumnAsShort

public void setColumnAsShort(int id,
                             short value)
Saves SHORT value into column

Parameters:
id - clumn number
value -

setColumnAsFloat

public void setColumnAsFloat(int id,
                             float value)
Saves FLOAT value into column

Parameters:
id - clumn number
value -

setColumnAsDouble

public void setColumnAsDouble(int id,
                              double value)
Saves FLOAT value into column

Parameters:
id - clumn number
value -

setColumnAsByte

public void setColumnAsByte(int id,
                            byte value)
Saves BYTE value into column

Parameters:
id - clumn number
value -

setColumnAsBinary

public void setColumnAsBinary(int id,
                              byte[] value)
Saves into column of byte's array

Parameters:
id - column number
value -

getColumnAsString

public java.lang.String getColumnAsString(int id)
Reads column as a String value

Parameters:
id - column number
Returns:
value

getColumnAsInt

public int getColumnAsInt(int id)
Reads column as a INT value

Parameters:
id - column number
Returns:
value

getColumnAsShort

public int getColumnAsShort(int id)
Reads column as a SHORT value

Parameters:
id - column number
Returns:
value

getColumnAsLong

public long getColumnAsLong(int id)
Reads column as a LONG value

Parameters:
id - column number
Returns:
value

getColumnAsFloat

public float getColumnAsFloat(int id)
Reads column as a FLOAT value

Parameters:
id - column number
Returns:
value

getColumnAsDouble

public double getColumnAsDouble(int id)
Reads column as a DOUBLE value

Parameters:
id - column number
Returns:
value

getColumnAsByte

public byte getColumnAsByte(int id)
Reads column as a BYTE value

Parameters:
id - column number
Returns:
value

getColumnAsBinary

public byte[] getColumnAsBinary(int id)
Reads column as a BINARY value - array of bytes

Parameters:
id - column number
Returns:
value