Package com.illumon.iris.db.util.config
Class RemoteMutableInputTable
java.lang.Object
com.illumon.iris.db.util.config.RemoteMutableInputTable
- All Implemented Interfaces:
InputTableEnumGetter,InputTableRowSetter,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 Summary
Modifier and TypeMethodDescriptionvoidWrite newData to this table.voidaddRows(Map<String, Object>[] valueArray, boolean allowEdits, InputTableStatusListener listener) Add the specified rows to the table, optionally overwriting existing keys.booleancanEdit(Database database, UserContext userContext) Queries whether the given user may edit this MutableInputTable.voidDelete the keys contained in the parameter table from this input table.voidDelete the keys contained in the parameter table from this input table.com.illumon.iris.web.shared.data.InputTableDefinitionGet the key and value columns names for this table.Return a user-readable description of this MutableInputTable.Object[]getEnumsForColumn(String columnName) FieldEntry<?>getFieldEntry(Object defaultValue, boolean isEdit, String columnName) Create a proper FieldEntry for the specified column in the Deephaven Swing UI.getTable()Returns a Deephaven table that contains the current data for this MutableInputTable.Get the underlying Table definition (which includes the names and types of all of the columns).voidsetRows(Table table, int[] rowArray, Map<String, Object>[] valueArray, InputTableStatusListener listener) Set the values of the columns specified by the input, filling in missing data using the parameter 'table' as the previous value source.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.db.util.config.InputTableRowSetter
addRow, addRow, addRows, addRows, setRow, setRowsMethods inherited from interface com.illumon.iris.db.util.config.MutableInputTable
getDatabase, getKeyNames, hasColumn, isKey
-
Method Details
-
getTable
Description copied from interface:MutableInputTableReturns a Deephaven table that contains the current data for this MutableInputTable.- Specified by:
getTablein interfaceMutableInputTable- Returns:
- the current data in this MutableInputTable.
-
getFieldEntry
Description copied from interface:MutableInputTableCreate a proper FieldEntry for the specified column in the Deephaven Swing UI.- Specified by:
getFieldEntryin interfaceMutableInputTable- Parameters:
defaultValue- the default value of the fieldisEdit- 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:MutableInputTableGet the key and value columns names for this table.- Specified by:
getDefinitionin interfaceMutableInputTable- Returns:
- the InputTableDefinition.
-
getTableDefinition
Description copied from interface:MutableInputTableGet the underlying Table definition (which includes the names and types of all of the columns).- Specified by:
getTableDefinitionin interfaceMutableInputTable- Returns:
- the TableDefinition for our user-visible table
-
add
Description copied from interface:MutableInputTableWrite newData to this table.- Specified by:
addin interfaceMutableInputTable- Parameters:
newData- the data to write to this table- Throws:
IOException- if there is an error writing the data
-
delete
Description copied from interface:MutableInputTableDelete the keys contained in the parameter table from this input table. This method will block until rows are deleted.- Specified by:
deletein interfaceMutableInputTable- Parameters:
table- The rows to delete.- Throws:
IOException- If a problem occurred while deleting the rows.
-
delete
Description copied from interface:MutableInputTableDelete the keys contained in the parameter table from this input table. This method will block until rows are deleted.- Specified by:
deletein interfaceMutableInputTable- Parameters:
table- The rows to delete.- Throws:
IOException- If a problem occurred while deleting the rows.
-
getDescription
Description copied from interface:MutableInputTableReturn a user-readable description of this MutableInputTable.- Specified by:
getDescriptionin interfaceMutableInputTable- 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:InputTableRowSetterSet 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:
setRowsin interfaceInputTableRowSetter- Parameters:
table- The table to use as the previous value sourcerowArray- 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:InputTableRowSetterAdd 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:
addRowsin interfaceInputTableRowSetter- Parameters:
valueArray- The values to write.allowEdits- Should pre-existing keys be overwritten?listener- The listener to report asynchronous results to.
-
getEnumsForColumn
- Specified by:
getEnumsForColumnin interfaceInputTableEnumGetter
-
canEdit
Description copied from interface:MutableInputTableQueries whether the given user may edit this MutableInputTable.- Specified by:
canEditin interfaceMutableInputTable- Parameters:
database- the Database object for this MutableInputTableuserContext- the UserContext representing the user that would edit the table- Returns:
- true if the specified user may edit this MutableInputTable, false otherwise
-