Interface ConstraintContainer<T>

All Known Implementing Classes:
WebQuery, WQConstraints, WQGroup

public interface ConstraintContainer<T>
  • Method Details

    • add

      T add(WQConstraintLine line)
    • eq

      default T eq(String field, Object... values)
      Assert that a field equals one of the provided values. Implicitly creates a new OR group if multiple values are supplied
      Parameters:
      field -
      values -
      Returns:
    • eq

      default T eq(String field, Collection<?> values)
      Assert that a field equals one of the provided values. Implicitly creates a new OR group if multiple values are supplied. At least one value must be supplied.
      Parameters:
      field -
      values -
      Returns:
    • in

      default T in(String field, Object... values)
    • in

      default T in(String field, Collection<?> values)
    • notIn

      default T notIn(String field, Object... values)
    • notIn

      default T notIn(String field, Collection<?> values)
    • neq

      default T neq(String field, Object value)
    • isNull

      default T isNull(String field)
    • isNotNull

      default T isNotNull(String field)
    • lt

      default T lt(String field, Object value)
    • le

      default T le(String field, Object value)
    • gt

      default T gt(String field, Object value)
    • ge

      default T ge(String field, Object value)
    • contains

      default T contains(String field, Object value)
    • notContains

      default T notContains(String field, Object value)
    • startsWith

      default T startsWith(String field, Object value)
    • notStartsWith

      default T notStartsWith(String field, Object value)
    • range

      default T range(String field, Object from, Object to)
    • eqRef

      default T eqRef(String field, String field2)
    • neqRef

      default T neqRef(String field, String field2)
    • leRef

      default T leRef(String field, String field2)
    • ltRef

      default T ltRef(String field, String field2)
    • geRef

      default T geRef(String field, String field2)
    • gtRef

      default T gtRef(String field, String field2)
    • and

      default WQGroup and()
      Construct a new OR group and return it for method chaining
      Returns:
    • or

      default WQGroup or()
      Construct a new OR group and return it for method chaining
      Returns:
    • none

      default WQGroup none()
    • and

      default T and(Consumer<WQGroup> consumer)
      Construct a new AND group, using the supplier to add the constraints to the group. Returns the original WQGroup for method chaining
      Parameters:
      consumer -
      Returns:
    • or

      default T or(Consumer<WQGroup> consumer)
      Construct a new OR group, using the supplier to add the constraints to the group. Returns the original WQGroup for method chaining
      Parameters:
      consumer -
      Returns: