Class ColumnRestriction

java.lang.Object
io.deephaven.web.client.api.ColumnRestriction
Direct Known Subclasses:
DoubleRangeColumnRestriction, IntegerRangeColumnRestriction, NonEmptyColumnRestriction, NotNullColumnRestriction, StringListColumnRestriction

@TsName(namespace="dh") public abstract class ColumnRestriction extends Object
Abstract base class representing a restriction on an input table column. Each restriction has a type string identifying what kind of restriction it is, and a validate(Any) method for client-side validation.

Built-in restriction types are exposed as typed subclasses with strongly-typed fields:

Custom restriction types can be registered via ColumnRestrictionRegistry.register. The converter must return a concrete subclass of ColumnRestriction that overrides validate(Any) as needed.

  • Constructor Details

    • ColumnRestriction

      protected ColumnRestriction(String type)
  • Method Details

    • getType

      @JsProperty public String getType()
      The fully-qualified protobuf type name of this restriction (e.g., "io.deephaven.proto.backplane.grpc.IntegerRangeRestriction").
      Returns:
      The restriction type name
    • validate

      @JsMethod public abstract @JsNullable String validate(@JsNullable jsinterop.base.Any value)
      Validates a proposed value against this restriction.
      Parameters:
      value - The proposed column value to validate
      Returns:
      An error message if the value violates the restriction, or null if the value is valid
    • toString

      public String toString()
      Overrides:
      toString in class Object