All Superinterfaces:
Bytes

public interface RecordV2 extends Bytes
An immutable value representing a list of records.
Since:
6.0
Author:
DiffusionData Limited
See Also:
  • Method Details

    • diff

      RecordV2Delta diff(RecordV2 original)
      Compare this value with an earlier version to calculate a structural delta.
      Parameters:
      original - the original value to compare with this value
      Returns:
      a structural delta representing the difference between the original and this value
    • asModel

      RecordModel asModel(Schema schema)
      Parses the value into a model based upon a specified 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.

      Parameters:
      schema - the schema to use for parsing the data
      Returns:
      an immutable model derived from the data value
    • asValidatedModel

      RecordModel asValidatedModel(Schema schema) throws InvalidDataException
      Parses the value into a model based upon a specified schema.
      Parameters:
      schema - the schema to use for parsing the data
      Returns:
      a model derived from the value
      Throws:
      InvalidDataException - if the data value is incompatible with the supplied schema
    • asRecords

      List<List<String>> asRecords()
      Returns the data value as a list of lists of strings.
      Returns:
      new mutable list where each entry represents a record within the data
    • asFields

      List<String> asFields()
      Returns the data value as a list of fields.

      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.

      Returns:
      new mutable list of all of the fields