Package com.illumon.iris.db.util.config
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 Summary
Modifier and Type Method Description void
add(Table newData)
Write newData to this table.boolean
canEdit(Database database, com.fishlib.auth.UserContext userContext)
Queries whether the given user may edit this MutableInputTable.default void
delete(Table table)
Delete the keys contained in the parameter table from this input table.void
delete(Table table, Index index)
Delete the keys contained in the parameter table from this input table.default Database
getDatabase()
com.illumon.iris.web.shared.data.InputTableDefinition
getDefinition()
Get the key and value columns names for this table.String
getDescription()
Return a user-readable description of this MutableInputTable.FieldEntry<?>
getFieldEntry(Object defaultValue, boolean isEdit, String columnName)
Create a proper FieldEntry for the specified column in the Deephaven Swing UI.static FieldEntry<?>
getFieldEntry(Object defaultValue, boolean isEdit, String columnName, MutableInputTable mutableInputTable)
default String[]
getKeyNames()
Get the names of the key columnsTable
getTable()
Returns a Deephaven table that contains the current data for this MutableInputTable.TableDefinition
getTableDefinition()
Get the underlying Table definition (which includes the names and types of all of the columns).default boolean
hasColumn(String columnName)
Returns true if the specified column exists in this MutableInputTable.default boolean
isKey(String columnName)
Returns true if the specified column is a key.static Table
makeSnapshotForRemoteQuery(Table table)
static Table
makeSnapshotForRemoteQuery(Table table, String[] viewColumns, Index index, RemoteTableHandle handle)
Methods inherited from interface com.illumon.iris.db.util.config.InputTableEnumGetter
getEnumsForColumn
-
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
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
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
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
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
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
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
Queries whether the given user may edit this MutableInputTable.- 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
-
getFieldEntry
Create a proper FieldEntry for the specified column in the Deephaven Swing UI.- 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
-
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
- Throws:
IOException
-
getDatabase
-