Class RemoteMutableInputTable

java.lang.Object
com.illumon.iris.db.util.config.RemoteMutableInputTable
All Implemented Interfaces:
InputTableEnumGetter, InputTableRowSetter, MutableInputTable

public class RemoteMutableInputTable
extends Object
implements MutableInputTable
The RemoteMutableInputTable is a client side object that has enough information about the definition of the input table to answer definitional questions locally; and a handle to the remote Table. Editing operations are applied as remote queries to the handle on the server.
  • Method Details

    • getTable

      public Table getTable()
      Description copied from interface: MutableInputTable
      Returns a Deephaven table that contains the current data for this MutableInputTable.
      Specified by:
      getTable in interface MutableInputTable
      Returns:
      the current data in this MutableInputTable.
    • getFieldEntry

      public FieldEntry<?> getFieldEntry​(Object defaultValue, boolean isEdit, String columnName)
      Description copied from interface: MutableInputTable
      Create a proper FieldEntry for the specified column in the Deephaven Swing UI.
      Specified by:
      getFieldEntry in interface MutableInputTable
      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
    • getDefinition

      public com.illumon.iris.web.shared.data.InputTableDefinition getDefinition()
      Description copied from interface: MutableInputTable
      Get the key and value columns names for this table.
      Specified by:
      getDefinition in interface MutableInputTable
      Returns:
      the InputTableDefinition.
    • getTableDefinition

      public TableDefinition getTableDefinition()
      Description copied from interface: MutableInputTable
      Get the underlying Table definition (which includes the names and types of all of the columns).
      Specified by:
      getTableDefinition in interface MutableInputTable
      Returns:
      the TableDefinition for our user-visible table
    • add

      public void add​(Table newData) throws IOException
      Description copied from interface: MutableInputTable
      Write newData to this table.
      Specified by:
      add in interface MutableInputTable
      Parameters:
      newData - the data to write to this table
      Throws:
      IOException - if there is an error writing the data
    • delete

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

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

      public String getDescription()
      Description copied from interface: MutableInputTable
      Return a user-readable description of this MutableInputTable.
      Specified by:
      getDescription in interface MutableInputTable
      Returns:
      a description of this input table
    • setRows

      public void setRows​(Table table, int[] rowArray, Map<String,​Object>[] valueArray, InputTableStatusListener listener)
      Description copied from interface: InputTableRowSetter
      Set the values of the columns specified by the input, filling in missing data using the parameter 'table' as the previous value source. This method will be invoked asynchronously. The input listener will be notified on success/failure
      Specified by:
      setRows in interface InputTableRowSetter
      Parameters:
      table - The table to use as the previous value source
      rowArray - The row indices to update.
      valueArray - The new values.
      listener - The listener to notify on asynchronous results.
    • addRows

      public void addRows​(Map<String,​Object>[] valueArray, boolean allowEdits, InputTableStatusListener listener)
      Description copied from interface: InputTableRowSetter
      Add the specified rows to the table, optionally overwriting existing keys. This method will execute asynchronously, the input listener will be notified on success/failure.
      Specified by:
      addRows in interface InputTableRowSetter
      Parameters:
      valueArray - The values to write.
      allowEdits - Should pre-existing keys be overwritten?
      listener - The listener to report asynchronous results to.
    • getEnumsForColumn

      public Object[] getEnumsForColumn​(String columnName)
      Specified by:
      getEnumsForColumn in interface InputTableEnumGetter
    • canEdit

      public boolean canEdit​(Database database, com.fishlib.auth.UserContext userContext)
      Description copied from interface: MutableInputTable
      Queries whether the given user may edit this MutableInputTable.
      Specified by:
      canEdit in interface 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