Class RowWithGetters<T extends @NonNull Object>

java.lang.Object
org.apache.beam.sdk.values.Row
org.apache.beam.sdk.values.RowWithGetters<T>
All Implemented Interfaces:
Serializable

public class RowWithGetters<T extends @NonNull Object> extends Row
A Concrete subclass of Row that delegates to a set of provided FieldValueGetters.

This allows us to have Row objects for which the actual storage is in another object. For example, the user's type may be a POJO, in which case the provided getters will simple read the appropriate fields from the POJO.

See Also:
  • Method Details

    • getValue

      public <W> W getValue(int fieldIdx)
      Description copied from class: Row
      Get value by field index, ClassCastException is thrown if schema doesn't match.
      Specified by:
      getValue in class Row
    • getFieldCount

      public int getFieldCount()
      Description copied from class: Row
      Return the size of data fields.
      Specified by:
      getFieldCount in class Row
    • getValues

      @Internal public List<@Nullable Object> getValues()
      Return the list of raw unmodified data values to enable 0-copy code.
      Specified by:
      getValues in class Row
    • getGetters

      public List<FieldValueGetter<T,Object>> getGetters()
    • getGetterTarget

      public Object getGetterTarget()
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Row
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Row