Package db
Class SparseRecord
java.lang.Object
db.DBRecord
db.SparseRecord
- All Implemented Interfaces:
Comparable<DBRecord>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Read the record field data from the specified buffer and offsetvoid
setBinaryData
(int colIndex, byte[] bytes) Set the binary data array for the specified field.void
setBooleanValue
(int colIndex, boolean value) Set the boolean value for the specified field.void
setByteValue
(int colIndex, byte value) Set the byte value for the specified field.void
Set the field value for the specified field.void
setIntValue
(int colIndex, int value) Set the integer value for the specified field.void
setLongValue
(int colIndex, long value) Set the long value for the specified field.void
setNull
(int colIndex) Set the field to a null state.void
setShortValue
(int colIndex, short value) Set the short value for the specified field.void
Write the record fields to the specified buffer and offset.Methods inherited from class db.DBRecord
compareFieldTo, compareTo, copy, equals, fieldEquals, getBinaryData, getBooleanValue, getByteValue, getColumnCount, getFieldValue, getIntValue, getKey, getKeyField, getLongValue, getShortValue, getString, hashCode, hasSameSchema, hasSameSchema, invalidateLength, isDirty, length, setKey, setKey, setString, toString
-
Method Details
-
write
Description copied from class:DBRecord
Write the record fields to the specified buffer and offset.- Overrides:
write
in classDBRecord
- Parameters:
buf
- data bufferoffset
- buffer offset- Throws:
IndexOutOfBoundsException
- if invalid offset is specifiedIOException
- thrown if IO error occurs
-
read
Description copied from class:DBRecord
Read the record field data from the specified buffer and offset- Overrides:
read
in classDBRecord
- Parameters:
buf
- data bufferoffset
- buffer offset- Throws:
IndexOutOfBoundsException
- if invalid offset is specifiedIOException
- thrown if IO error occurs
-
setField
Description copied from class:DBRecord
Set the field value for the specified field. -
setLongValue
public void setLongValue(int colIndex, long value) Description copied from class:DBRecord
Set the long value for the specified field.- Overrides:
setLongValue
in classDBRecord
- Parameters:
colIndex
- field indexvalue
- field value
-
setIntValue
public void setIntValue(int colIndex, int value) Description copied from class:DBRecord
Set the integer value for the specified field.- Overrides:
setIntValue
in classDBRecord
- Parameters:
colIndex
- field indexvalue
- field value
-
setShortValue
public void setShortValue(int colIndex, short value) Description copied from class:DBRecord
Set the short value for the specified field.- Overrides:
setShortValue
in classDBRecord
- Parameters:
colIndex
- field indexvalue
- field value
-
setByteValue
public void setByteValue(int colIndex, byte value) Description copied from class:DBRecord
Set the byte value for the specified field.- Overrides:
setByteValue
in classDBRecord
- Parameters:
colIndex
- field indexvalue
- field value
-
setBooleanValue
public void setBooleanValue(int colIndex, boolean value) Description copied from class:DBRecord
Set the boolean value for the specified field.- Overrides:
setBooleanValue
in classDBRecord
- Parameters:
colIndex
- field indexvalue
- field value
-
setBinaryData
public void setBinaryData(int colIndex, byte[] bytes) Description copied from class:DBRecord
Set the binary data array for the specified field.- Overrides:
setBinaryData
in classDBRecord
- Parameters:
colIndex
- field indexbytes
- field value
-
setNull
public void setNull(int colIndex) Description copied from class:DBRecord
Set the field to a null state. For a non-sparse fixed-length column field this will set the the value to zero and the null state will not be persisted when stored.
-