Class TableToJSON

java.lang.Object
com.illumon.iris.db.tables.utils.TableToJSON

public final class TableToJSON extends Object
this was copied from solace, combined abstract and concrete classes into one here.
  • Constructor Details

  • Method Details

    • storeCustomFunctionFieldProcessor

      protected <T> void storeCustomFunctionFieldProcessor(String fieldName, TableToJSON.CustomFunction<T> customFunction)
    • makeFieldProcessor

      protected void makeFieldProcessor(String fieldName, String columnName)
      Create a field processor that translates a given column from its Deephaven row number to JSON.
      Parameters:
      fieldName - The name of the field in the output (if needed).
      columnName - The Deephaven column to be translated into String format
    • makeTimestampProcessor

      protected TableToJSON.FieldProcessor makeTimestampProcessor(String fieldName)
    • parseUpdate

      public List<String> parseUpdate(Index toProcess, boolean isRemoval)
      Convert the specified 'modified' rows from the update into JSON
      Parameters:
      toProcess - An Index indicating which rows were involved in this operation
      isRemoval - Whether the Index is of removed rows
      Returns:
      A List of Strings, each representing one modification
    • parseUpdateToJsonNodes

      public List<io.deephaven.shadow.jackson.com.fasterxml.jackson.databind.node.ObjectNode> parseUpdateToJsonNodes(Index toProcess, boolean isRemoval)
      Convert the specified 'modified' rows from the update into JSON ObjectNodes.
      Parameters:
      toProcess - An Index indicating which rows were involved in this operation
      isRemoval - Whether the Index is of removed rows
      Returns:
      A List of ObjectNodes, each representing one modification
    • parseUpdate

      public <T> List<T> parseUpdate(Index toProcess, boolean isRemoval, Function<io.deephaven.shadow.jackson.com.fasterxml.jackson.databind.node.ObjectNode,T> conversionFunction)
      Convert the specified 'modified' rows from the update into JSON ObjectNodes, then transform into type T with the given conversionFunction.
      Type Parameters:
      T - The data type into which the JSON ObjectNodes are converted.
      Parameters:
      toProcess - An Index indicating which rows were involved in this operation
      isRemoval - Whether the Index is of removed rows
      conversionFunction - A function to
      Returns:
      A List of ObjectNodes, each representing one modification