Interface MutableInputTable

All Superinterfaces:
InputTableEnumGetter, InputTableRowSetter
All Known Implementing Classes:
InputTable, RemoteMutableInputTable

public interface MutableInputTable
extends InputTableRowSetter, InputTableEnumGetter
A minimal interface for mutable tables that can be changed over the OpenAPI.
  • Method Details

    • getDefinition

      com.illumon.iris.web.shared.data.InputTableDefinition getDefinition()
      Get the key and value columns names for this table.
      Returns:
      the InputTableDefinition.
    • getKeyNames

      default String[] getKeyNames()
      Get the names of the key columns
      Returns:
      an array with the names of our key columns
    • getTableDefinition

      TableDefinition getTableDefinition()
      Get the underlying Table definition (which includes the names and types of all of the columns).
      Returns:
      the TableDefinition for our user-visible table
    • add

      void add​(Table newData) throws IOException
      Write newData to this table.
      Parameters:
      newData - the data to write to this table
      Throws:
      IOException - if there is an error writing the data
    • delete

      default void delete​(Table table) throws IOException
      Delete the keys contained in the parameter table from this input table. This method will block until rows are deleted.
      Parameters:
      table - The rows to delete.
      Throws:
      IOException - If a problem occurred while deleting the rows.
    • delete

      void delete​(Table table, Index index) throws IOException
      Delete the keys contained in the parameter table from this input table. This method will block until rows are deleted.
      Parameters:
      table - The rows to delete.
      Throws:
      IOException - If a problem occurred while deleting the rows.
    • getDescription

      String getDescription()
      Return a user-readable description of this MutableInputTable.
      Returns:
      a description of this input table
    • getTable

      Table getTable()
      Returns a Deephaven table that contains the current data for this MutableInputTable.
      Returns:
      the current data in this MutableInputTable.
    • isKey

      default boolean isKey​(String columnName)
      Returns true if the specified column is a key.
      Parameters:
      columnName - the column to interrogate
      Returns:
      true if columnName is a key column, false otherwise
    • hasColumn

      default boolean hasColumn​(String columnName)
      Returns true if the specified column exists in this MutableInputTable.
      Parameters:
      columnName - the column to interrogate
      Returns:
      true if columnName exists in this MutableInputTable
    • canEdit

      boolean canEdit​(Database database, com.fishlib.auth.UserContext userContext)
      Queries whether the given user may edit this MutableInputTable.
      Parameters:
      database - the Database object for this MutableInputTable
      userContext - the UserContext representing the user that would edit the table
      Returns:
      true if the specified user may edit this MutableInputTable, false otherwise
    • getFieldEntry

      FieldEntry<?> getFieldEntry​(Object defaultValue, boolean isEdit, String columnName)
      Create a proper FieldEntry for the specified column in the Deephaven Swing UI.
      Parameters:
      defaultValue - the default value of the field
      isEdit - is this an edit (vs. an addition)
      columnName - the name of the column.
      Returns:
      a FieldEntry object for use in the swing UI
    • getFieldEntry

      static FieldEntry<?> getFieldEntry​(Object defaultValue, boolean isEdit, String columnName, MutableInputTable mutableInputTable)
    • makeSnapshotForRemoteQuery

      static Table makeSnapshotForRemoteQuery​(@NotNull Table table, String[] viewColumns, Index index, RemoteTableHandle handle) throws IOException
      Throws:
      IOException
    • makeSnapshotForRemoteQuery

      static Table makeSnapshotForRemoteQuery​(@NotNull Table table) throws IOException
      Throws:
      IOException
    • getDatabase

      @Nullable default Database getDatabase()