Class RowValueBuilder

    • Constructor Detail

      • RowValueBuilder

        public RowValueBuilder​(RowDescriptor rowDescriptor)
        Creates instance of RowValueBuilder.
        Parameters:
        rowDescriptor - The RowDescriptor for the row(s) to be created
    • Method Detail

      • setFieldIndex

        public RowValueBuilder setFieldIndex​(int index)
        Sets the index of the current field to populate.
        Parameters:
        index - Index of the field
        Returns:
        this builder
        Throws:
        java.lang.IndexOutOfBoundsException - When index is not between 0 (inclusive) and getSize() (exclusive)
      • set

        public RowValueBuilder set​(byte[] fieldData)
        Sets the field data of the current field.
        Parameters:
        fieldData - Data
        Returns:
        this builder
      • setInt

        public RowValueBuilder setInt​(int value)
        Sets the field data by encoding the provided int.
        Parameters:
        value - value
        Returns:
        this builder
        Since:
        5
      • setInt

        public RowValueBuilder setInt​(java.lang.Number value)
        Sets the field data by encoding the provided Number or null.
        Parameters:
        value - value
        Returns:
        this builder
        Since:
        5
      • setShort

        public RowValueBuilder setShort​(int value)
        Sets the field data by encoding the provided int as a short.
        Parameters:
        value - value
        Returns:
        this builder
        Since:
        5
        See Also:
        setShort(short)
      • setShort

        public RowValueBuilder setShort​(java.lang.Number value)
        Sets the field data by encoding the provided Number as a short or null.
        Parameters:
        value - value
        Returns:
        this builder
        Since:
        5
        See Also:
        setShort(short)
      • setShort

        public RowValueBuilder setShort​(short value)
        Sets the field data by encoding the provided short.
        Parameters:
        value - value
        Returns:
        this builder
        Since:
        5
        See Also:
        setShort(int)
      • setString

        public RowValueBuilder setString​(java.lang.String value)
        Sets the field data by encoding the provided String.
        Parameters:
        value - value
        Returns:
        this builder
        Since:
        5
      • get

        public byte[] get​(int index)
        Retrieves the field data set at the specified index.
        Parameters:
        index - Index
        Returns:
        The field data
        Throws:
        java.lang.IndexOutOfBoundsException - When @{code index} is not between 0 (inclusive) and getSize() (exclusive)
      • reset

        public RowValueBuilder reset()
        Resets this builder to a new RowValue. All previous values set are cleared.
        Returns:
        this builder.
      • getSize

        public int getSize()
        Returns:
        Number of fields in the row
      • toRowValue

        public RowValue toRowValue​(boolean initialize)
        Returns the populated RowValue and resets the RowValueBuilder.
        Parameters:
        initialize - true set field data to null for all uninitialized fields, false leaves fields uninitialized. In most cases you want to use true.
        Returns:
        The row value object
        See Also:
        reset()