Package com.onec.ui

Class ListSpec.FilterBuilder

java.lang.Object
com.onec.ui.ListSpec.FilterBuilder
Enclosing class:
ListSpec

public static final class ListSpec.FilterBuilder extends Object
Fluent builder for one filter; options/multiOptions(java.lang.String...)/contains()/ startsWith()/dateRange() pick the control type.
  • Method Details

    • label

      public ListSpec.FilterBuilder label(String label)
      Override the control's label (defaults to the field name).
    • options

      public ListSpec.FilterBuilder options(String... options)
      A SELECT filter: pick one of options, matched for equality on the field.
    • multiOptions

      public ListSpec.FilterBuilder multiOptions(String... options)
      A multi-select filter: pick any number of options, matched as field IN (…) over the chosen values (an empty selection adds no constraint).
    • contains

      public ListSpec.FilterBuilder contains()
      A field-scoped typeahead: a debounced text input matched case-insensitively as field LIKE %text%. The high-cardinality answer where a SELECT of every value would be unusable (e.g. filter a roster by a ~1.4k-name doctor column).
    • startsWith

      public ListSpec.FilterBuilder startsWith()
      Like contains() but anchored at the start: matched as field LIKE text%.
    • dateRange

      public ListSpec.FilterBuilder dateRange()
      A from/to date-range filter (two date pickers) over the field.