Class GenericRow

java.lang.Object
com.exasol.parquetio.data.GenericRow
All Implemented Interfaces:
Row

public final class GenericRow extends Object implements Row
An implementation of Row that uses unmodifiable list for storing values.
  • Constructor Details

    • GenericRow

      public GenericRow(List<Object> values)
      A constructor to create a new instance.
      Parameters:
      values - list of values
    • GenericRow

      public GenericRow(org.apache.parquet.schema.MessageType schema, List<Object> values)
      A constructor to create a new instance with MessageType schema.
      Parameters:
      schema - schema of a row
      values - list of values
  • Method Details

    • of

      public static GenericRow of(Object... values)
      A factory method to create a new instance.
      Parameters:
      values - list of values
      Returns:
      an instance of GenericRow
    • of

      public static GenericRow of(org.apache.parquet.schema.MessageType schema, Object... values)
      A factory method to create a new instance with MessageType schema.
      Parameters:
      schema - schema of a row
      values - list of values
      Returns:
      an instance of GenericRow
    • hasFieldName

      public boolean hasFieldName(String fieldName)
      Description copied from interface: Row
      Checks if a column with a given name exists.
      Specified by:
      hasFieldName in interface Row
      Parameters:
      fieldName - field name in a row
      Returns:
      true if column with a name exists; otherwise false
    • getFieldNames

      public List<String> getFieldNames()
      Description copied from interface: Row
      Returns list of field names.
      Specified by:
      getFieldNames in interface Row
      Returns:
      list of field names
    • getValue

      public Object getValue(int position)
      Description copied from interface: Row
      Returns a value at the given position.
      Specified by:
      getValue in interface Row
      Parameters:
      position - position of a value in the row
      Returns:
      Java object
    • getValue

      public Object getValue(String fieldName)
      Description copied from interface: Row
      Returns a value that corresponds to field name.
      Specified by:
      getValue in interface Row
      Parameters:
      fieldName - field name of a value in the row
      Returns:
      Java object
    • getValues

      public List<Object> getValues()
      Description copied from interface: Row
      Returns the list of values this Row represents.
      Specified by:
      getValues in interface Row
      Returns:
      list of values
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object