Interface AbstractNoValueCondition.Filterable

All Known Implementing Classes:
IsNotNull, IsNull
Enclosing class:
AbstractNoValueCondition<T>

public static interface AbstractNoValueCondition.Filterable
Conditions may implement Filterable to add optionality to rendering.

If a condition is Filterable, then a user may add a filter to the usage of the condition that makes a decision whether to render the condition at runtime. Conditions that fail the filter will be dropped from the rendered SQL.

Implementations of Filterable may call AbstractNoValueCondition.filterSupport(BooleanSupplier, Supplier, AbstractNoValueCondition) as a common implementation of the filtering algorithm.

  • Method Summary

    Modifier and Type
    Method
    Description
    filter(BooleanSupplier booleanSupplier)
    If renderable and the supplier returns true, returns this condition.
  • Method Details

    • filter

      <S> AbstractNoValueCondition<S> filter(BooleanSupplier booleanSupplier)
      If renderable and the supplier returns true, returns this condition. Else returns a condition that will not render.
      Type Parameters:
      S - condition type - not used except for compilation compliance
      Parameters:
      booleanSupplier - function that specifies whether the condition should render
      Returns:
      this condition if renderable and the supplier returns true, otherwise a condition that will not render.