|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataRecord
The DataRecord
defines identity and content of generic data record.
The DataRecord
contains a set of data fields in a form of a two
indexed lists of Int-fields and Obj-fields respectively. For determination,
whenever serial access to the data fields of a record is performed (iteration,
visiting, serialization), all Int-fields go first in their list order, then
all Obj-fields go in their list order.
Method Summary | |
---|---|
int |
getId()
Returns identifier of this record. |
DataIntField |
getIntField(int index)
Returns Int-field by its index within this record. |
int |
getIntFieldCount()
Returns a number of Int-fields in this record. |
java.lang.String |
getName()
Returns name of this record. |
DataObjField |
getObjField(int index)
Returns Obj-field by its index within this record. |
int |
getObjFieldCount()
Returns a number of Obj-fields in this record. |
DataScheme |
getScheme()
Returns parent DataScheme of this field. |
boolean |
hasTime()
Determines if this record contains time coordinate. |
boolean |
update(RecordCursor from,
RecordCursor to)
Updates this record's field values in to cusor by values from cursor. |
void |
writeFields(com.devexperts.io.BufferedOutput out,
RecordCursor cursor)
Writes this record's field values in a binary form into a specified output byte array. |
Methods inherited from interface com.devexperts.qd.ng.RecordReader |
---|
getResultingRecord, readRecord |
Method Detail |
---|
DataScheme getScheme()
DataScheme
of this field.
int getId()
DataScheme
.
It is also used for identification of data record in serialized form.
java.lang.String getName()
DataScheme
.
It is recommended that full names of record's fields contain record name
as a prefix like these: "FooRecord.Category", "FooRecord.Amount", etc.
boolean hasTime()
int getIntFieldCount()
DataIntField getIntField(int index)
java.lang.IndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= getIntFieldCount()).int getObjFieldCount()
DataObjField getObjField(int index)
java.lang.IndexOutOfBoundsException
- if the index if out of range
(index < 0 || index >= getObjFieldCount()).boolean update(RecordCursor from, RecordCursor to)
to
cusor by values from
cursor.
This method is used for implementation of ticker contract.
true
if any values were updated and listeners shall be notified on data change.void writeFields(com.devexperts.io.BufferedOutput out, RecordCursor cursor) throws java.io.IOException
DataIntField.writeInt(java.io.DataOutput, int)
and
DataObjField.writeObj(java.io.DataOutput, Object)
.
EXPERIMENTAL: This method is not actually used yet.
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |