public interface RecordV2 extends Bytes
RecordV2DataType
Modifier and Type | Method and Description |
---|---|
List<String> |
asFields()
Returns the data value as a list of fields.
|
RecordModel |
asModel(Schema schema)
Parses the value into a model based upon a specified schema.
|
List<List<String>> |
asRecords()
Returns the data value as a list of lists of strings.
|
RecordModel |
asValidatedModel(Schema schema)
Parses the value into a model based upon a specified schema.
|
RecordV2Delta |
diff(RecordV2 original)
Compare this value with an earlier version to calculate a structural
delta.
|
asInputStream, copyTo, length, toByteArray
RecordV2Delta diff(RecordV2 original)
original
- the original value to compare with this valueRecordModel asModel(Schema schema)
This assumes that data is compatible with the schema and does not do any validation. There is no need to validate the data if this has been done on entry or at the server. However, if the data is invalid then issues may occur when attempting to access it.
If it is not certain that the data is valid then the
asValidatedModel(Schema)
method may be used instead.
schema
- the schema to use for parsing the dataRecordModel asValidatedModel(Schema schema) throws InvalidDataException
schema
- the schema to use for parsing the dataInvalidDataException
- if the data value is incompatible with the
supplied schemaList<List<String>> asRecords()
List<String> asFields()
This disregards record boundaries. If there is more than one record, they are concatenated to produce a list of all of the fields.
This method would normally only be used when it is known that there is only one record.
Copyright © 2022 Push Technology Ltd. All Rights Reserved.