Class GenericRecordData

    • Constructor Detail

      • GenericRecordData

        public GenericRecordData​(int arity)
        Creates an instance of GenericRecordData with given number of fields.

        Initially, all fields are set to null.

        Note: All fields of the row must be internal data structures.

        Parameters:
        arity - number of fields
    • Method Detail

      • setField

        public void setField​(int pos,
                             Object value)
        Sets the field value at the given position.

        Note: The given field value must be an internal data structures. Otherwise the GenericRecordData is corrupted and may throw exception when processing. See RecordData for more information about internal data structures.

        The field value can be null for representing nullability.

      • getField

        public Object getField​(int pos)
        Returns the field value at the given position.

        Note: The returned value is in internal data structure. See RecordData for more information about internal data structures.

        The returned field value can be null for representing nullability.

      • getArity

        public int getArity()
        Description copied from interface: RecordData
        Returns the number of fields in this record.
        Specified by:
        getArity in interface RecordData
      • isNullAt

        public boolean isNullAt​(int pos)
        Description copied from interface: RecordData
        Returns true if the field is null at the given position.
        Specified by:
        isNullAt in interface RecordData
      • getBoolean

        public boolean getBoolean​(int pos)
        Description copied from interface: RecordData
        Returns the boolean value at the given position.
        Specified by:
        getBoolean in interface RecordData
      • getByte

        public byte getByte​(int pos)
        Description copied from interface: RecordData
        Returns the byte value at the given position.
        Specified by:
        getByte in interface RecordData
      • getShort

        public short getShort​(int pos)
        Description copied from interface: RecordData
        Returns the short value at the given position.
        Specified by:
        getShort in interface RecordData
      • getInt

        public int getInt​(int pos)
        Description copied from interface: RecordData
        Returns the integer value at the given position.
        Specified by:
        getInt in interface RecordData
      • getLong

        public long getLong​(int pos)
        Description copied from interface: RecordData
        Returns the long value at the given position.
        Specified by:
        getLong in interface RecordData
      • getFloat

        public float getFloat​(int pos)
        Description copied from interface: RecordData
        Returns the float value at the given position.
        Specified by:
        getFloat in interface RecordData
      • getDouble

        public double getDouble​(int pos)
        Description copied from interface: RecordData
        Returns the double value at the given position.
        Specified by:
        getDouble in interface RecordData
      • getString

        public StringData getString​(int pos)
        Description copied from interface: RecordData
        Returns the string value at the given position.
        Specified by:
        getString in interface RecordData
      • getDecimal

        public DecimalData getDecimal​(int pos,
                                      int precision,
                                      int scale)
        Description copied from interface: RecordData
        Returns the decimal value at the given position.

        The precision and scale are required to determine whether the decimal value was stored in a compact representation (see DecimalData).

        Specified by:
        getDecimal in interface RecordData
      • getTimestamp

        public TimestampData getTimestamp​(int pos,
                                          int precision)
        Description copied from interface: RecordData
        Returns the timestamp value at the given position.

        The precision is required to determine whether the timestamp value was stored in a compact representation (see TimestampData).

        Specified by:
        getTimestamp in interface RecordData
      • getZonedTimestamp

        public ZonedTimestampData getZonedTimestamp​(int pos,
                                                    int precision)
        Description copied from interface: RecordData
        Returns the zoned timestamp value at the given position.

        The precision is required to determine whether the zoned timestamp value was stored in a compact representation (see ZonedTimestampData).

        Specified by:
        getZonedTimestamp in interface RecordData
      • getBinary

        public byte[] getBinary​(int pos)
        Description copied from interface: RecordData
        Returns the binary value at the given position.
        Specified by:
        getBinary in interface RecordData
      • getArray

        public ArrayData getArray​(int pos)
        Description copied from interface: RecordData
        Returns the array value at the given position.
        Specified by:
        getArray in interface RecordData
      • getMap

        public MapData getMap​(int pos)
        Description copied from interface: RecordData
        Returns the map value at the given position.
        Specified by:
        getMap in interface RecordData
      • getRow

        public RecordData getRow​(int pos,
                                 int numFields)
        Description copied from interface: RecordData
        Returns the row value at the given position.

        The number of fields is required to correctly extract the record.

        Specified by:
        getRow in interface RecordData
      • getDate

        public DateData getDate​(int pos)
        Description copied from interface: RecordData
        Returns the Date data at the given position.
        Specified by:
        getDate in interface RecordData
      • getTime

        public TimeData getTime​(int pos)
        Description copied from interface: RecordData
        Returns the Time data at the given position.
        Specified by:
        getTime in interface RecordData
      • getVariant

        public Variant getVariant​(int pos)
        Description copied from interface: RecordData
        Returns the variant value at the given position.
        Specified by:
        getVariant in interface RecordData
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object