接口 Filterable

所有已知子接口:
FieldFilterArgs<T>, FieldFilterArgsImplementor<T>, FilterableImplementor, FilterArgs<P>, MutableDelete, MutableQuery, MutableRootQuery<T>, MutableSubQuery, MutableUpdate, Sortable
所有已知实现类:
AbstractMutableQueryImpl, AbstractMutableStatementImpl, FieldFilterArgsImpl, FilterArgsImpl, MutableDeleteImpl, MutableRootQueryImpl, MutableSubQueryImpl, MutableUpdateImpl

public interface Filterable
  • 方法详细资料

    • where

      @OldChain Filterable where(Predicate... predicates)
      Add some predicates(logical and)
      参数:
      predicates - Predicates, everything one can be null
      返回:
      Return the current object to support chain programming style
    • whereIf

      @OldChain default Filterable whereIf(boolean condition, Predicate predicate)
      If the condition is true, add a predicate

      Please look at this example about predicate is not `eq`, `ne`, `like` or `ilike`

      
           whereIf(minPrice != null, table.price().ge(minPrice))
       
      The predicate `ge` which is not `eq`, `ne`, `like` or `ilike` cannot be created by null because `NullPointerException` will be thrown. At this time, you can use whereIf(boolean, Supplier)
      参数:
      condition - The condition
      predicate - The predicate to be added, can be null
      返回:
      Return the current object to support chain programming style
    • whereIf

      @OldChain default Filterable whereIf(boolean condition, Supplier<Predicate> block)
      If the condition is true, add a predicate
      参数:
      condition - The condition
      block - A lambda to create predicate when condition is true
      返回:
      Return the current object to support chain programming style