Interface TableWriter<R extends Row>

All Superinterfaces:
Row
All Known Implementing Classes:
DynamicTableWriter

public interface TableWriter<R extends Row>
extends Row
Interface for writing table data out.
  • Field Details

    • NULL_SETTER

      static final RowSetter NULL_SETTER
  • Method Details

    • getSetter

      RowSetter getSetter​(String name)
      Gets a setter for a column.

      The implementation is likely to delegate to Row.getSetter(String) in a default Row instance.

      Specified by:
      getSetter in interface Row
      Parameters:
      name - column name
      Returns:
      setter for the column.
    • getSetter

      default <T> RowSetter<T> getSetter​(@NotNull String name, @NotNull Class<T> tClass)
      Gets a typed setter for a column.

      The implementation is likely to delegate to Row.getSetter(String, Class) in a default Row instance.

      Specified by:
      getSetter in interface Row
      Parameters:
      name - column name
      tClass - the type for the typed RowSetter
      Returns:
      setter for the column.
    • setFlags

      void setFlags​(Row.Flags flags)

      The implementation is likely to delegate to Row.setFlags(Flags) in a default Row instance.

      Specified by:
      setFlags in interface Row
    • getRowWriter

      R getRowWriter()
      Get a writer for a Row entries. This is likely to be newly created, so callers should cache this value. In practice, TableWriter implementations generally cache the result of the first call to this method as a primary writer.
      Returns:
      a Row, likely newly created
    • writeRow

      void writeRow() throws IOException
      Writes out a new row (values set using setters).

      The implementation is likely to delegate to Row.writeRow() in a default Row instance.

      Specified by:
      writeRow in interface Row
      Throws:
      IOException - problem writing the row
      ImplNote:
      This method is used as part of the import portion of the table recording process in TableListeners
    • close

      void close() throws IOException
      Closes the writer.
      Throws:
      IOException - problem closing the writer.
    • getColumnTypes

      Class[] getColumnTypes()
      Gets the column types for the table.
      Returns:
      column types for the table.
    • getColumnNames

      String[] getColumnNames()
      Gets the column names for the table.
      Returns:
      column names for the table.
    • flush

      void flush() throws IOException
      Flushes data out.
      Throws:
      IOException - problem flushing data out.