|
|||||||||
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. |
RecordMapping |
getMapping()
Returns mapping for this data record or null if there is no mapping for 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. |
void |
readFields(com.devexperts.io.BufferedInput in,
RecordCursor cursor)
Reads this record's field values in a binary from the specified buffered input. |
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 buffered output. |
Methods inherited from interface com.devexperts.qd.ng.RecordReader |
---|
getIncomingRecord, getResultingRecord, readRecord |
Method Detail |
---|
DataScheme getScheme()
DataScheme
of this field.
RecordMapping getMapping()
null
if there is no mapping for this record.
The result of invoking getRecord()
method on
the resulting record mapping (when it is non null) is equal to this data record.
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, java.lang.Object)
.
java.io.IOException
void readFields(com.devexperts.io.BufferedInput in, RecordCursor cursor) throws java.io.IOException
DataIntField.readInt(java.io.DataInput)
and DataObjField.readObj(java.io.DataInput)
.
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |