Package io.deephaven.web.client.api
Class ColumnRestriction
java.lang.Object
io.deephaven.web.client.api.ColumnRestriction
- Direct Known Subclasses:
DoubleRangeColumnRestriction,IntegerRangeColumnRestriction,NonEmptyColumnRestriction,NotNullColumnRestriction,StringListColumnRestriction
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:
IntegerRangeColumnRestriction("io.deephaven.proto.backplane.grpc.IntegerRangeRestriction")DoubleRangeColumnRestriction("io.deephaven.proto.backplane.grpc.DoubleRangeRestriction")NotNullColumnRestriction("io.deephaven.proto.backplane.grpc.NotNullRestriction")NonEmptyColumnRestriction("io.deephaven.proto.backplane.grpc.NonEmptyRestriction")StringListColumnRestriction("io.deephaven.proto.backplane.grpc.StringListRestriction")
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetType()The fully-qualified protobuf type name of this restriction (e.g.,"io.deephaven.proto.backplane.grpc.IntegerRangeRestriction").toString()abstract @JsNullable Stringvalidate(@JsNullable jsinterop.base.Any value) Validates a proposed value against this restriction.
-
Constructor Details
-
ColumnRestriction
-
-
Method Details
-
getType
The fully-qualified protobuf type name of this restriction (e.g.,"io.deephaven.proto.backplane.grpc.IntegerRangeRestriction").- Returns:
- The restriction type name
-
validate
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
nullif the value is valid
-
toString
-