Class DoubleRangeValidatingInputTable
java.lang.Object
io.deephaven.server.table.inputtables.AbstractBaseValidatingInputTable
io.deephaven.server.table.inputtables.DoubleRangeValidatingInputTable
- All Implemented Interfaces:
InputTableUpdater
This is an example of an
InputTableUpdater that validates that the values in a Double column are within a
given range.
This class wraps an existing input table, and before performing the underlying validation performs its own validation on the range of the column.
This class is intended for testing and demonstrating validation functionality, it is not production ready and may be changed or removed at any time.
-
Field Summary
Fields inherited from class io.deephaven.server.table.inputtables.AbstractBaseValidatingInputTable
wrapped -
Method Summary
Modifier and TypeMethodDescription@Nullable List<com.google.protobuf.Any> getColumnRestrictions(String columnName) If there are client-side defined restrictions on this column, return them as a list of protobuf Any messages.static TableWrapinput, which must be an input table into a new input table that validates that the values incolumnare within the range([min, max].voidvalidateAddOrModify(Table tableToApply) Helper to check if a table is compatible with this table, so that it could be added as contents.Methods inherited from class io.deephaven.server.table.inputtables.AbstractBaseValidatingInputTable
add, addAsync, delete, deleteAsync, getKeyNames, getTableDefinition, getValueNames, hasColumn, isKey, validateDelete, wrapUpdater
-
Method Details
-
make
Wrapinput, which must be an input table into a new input table that validates that the values incolumnare within the range([min, max].- Parameters:
input- the table to wrapcolumn- the column to validate, must be a double typemin- the minimum value allowed, inclusivemax- the maximum value allowed, inclusive- Returns:
- a new input table that validates the range of
column
-
getColumnRestrictions
Description copied from interface:InputTableUpdaterIf there are client-side defined restrictions on this column, return them as a list of protobuf Any messages. These restrictions are used by the client for properly displaying and validating the edit field.The restrictions are packed as
google.protobuf.Anymessages, which allows for different restriction types (e.g.,IntegerRangeRestriction,DoubleRangeRestriction,StringListRestriction, etc.) to be sent to the client. The client is responsible for unpacking and interpreting these restrictions.- Specified by:
getColumnRestrictionsin interfaceInputTableUpdater- Specified by:
getColumnRestrictionsin classAbstractBaseValidatingInputTable- Parameters:
columnName- the column name to query- Returns:
- a list of protobuf Any messages representing the restrictions for this column, or null if no client-side restrictions are supplied for this column
-
validateAddOrModify
Description copied from interface:InputTableUpdaterHelper to check if a table is compatible with this table, so that it could be added as contents.- Specified by:
validateAddOrModifyin interfaceInputTableUpdater- Specified by:
validateAddOrModifyin classAbstractBaseValidatingInputTable- Parameters:
tableToApply- the table to check if it can used to add or modify this input table
-