public interface DataRecord
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.
Modifier and Type | Method and Description |
---|---|
DataField |
findFieldByName(String name)
Finds field by its full
name ,
or by its local name ,
or by its property name ,
or by its default property name that is created from its local name
using AbstractDataField.getDefaultPropertyName
method. |
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 such mapping for this record. |
<T extends RecordMapping> |
getMapping(Class<T> mappingClass)
Returns specified mapping for this data record or
null if there is no such mapping for this record. |
Map<Class<? extends RecordMapping>,RecordMapping> |
getMappings()
Returns all mappings for this data record.
|
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)
Deprecated.
Use
BinaryQTPParser class |
boolean |
update(RecordCursor from,
RecordCursor to)
Updates this record's field values in
to cursor by values from cursor. |
void |
writeFields(com.devexperts.io.BufferedOutput out,
RecordCursor cursor)
Deprecated.
Use
BinaryQTPComposer class |
DataScheme getScheme()
DataScheme
of this field.RecordMapping getMapping()
null
if there is no such mapping for this record.
If data record has multiple mappings then the first processed mapping will be returned.
The result of invoking getRecord()
method on
the resulting record mapping (when it is non null) is equal to this data record.<T extends RecordMapping> T getMapping(Class<T> mappingClass)
null
if there is no such 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.Map<Class<? extends RecordMapping>,RecordMapping> getMappings()
getRecord()
method on
any of the resulting record mappings is equal to this data record.int getId()
DataScheme
.
It is also used for identification of data record in serialized form.String getName()
DataScheme
.
The naming convention for record names is to use CapitalizedNames
without separators and to prefer one-word names,
like "Quote", "Trade", "TimeAndSales", etc.boolean hasTime()
int getIntFieldCount()
DataIntField getIntField(int index)
IndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= getIntFieldCount()).int getObjFieldCount()
DataObjField getObjField(int index)
IndexOutOfBoundsException
- if the index if out of range
(index < 0 || index >= getObjFieldCount()).DataField findFieldByName(String name)
name
,
or by its local name
,
or by its property name
,
or by its default property name that is created from its local name
using AbstractDataField.getDefaultPropertyName
method.null
if not found.boolean update(RecordCursor from, RecordCursor to)
to
cursor 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 IOException
BinaryQTPComposer
classDataIntField.writeInt(BufferedOutput, int)
and DataObjField.writeObj(BufferedOutput, Object)
.IOException
void readFields(com.devexperts.io.BufferedInput in, RecordCursor cursor) throws IOException
BinaryQTPParser
classDataIntField.readInt(BufferedInput)
and DataObjField.readObj(BufferedInput)
.IOException
Copyright © 2002–2025 Devexperts LLC. All rights reserved.