Interface ConditionModel.SetCondition<T>

Type Parameters:
T - the value type
Enclosing interface:
ConditionModel<T>

public static interface ConditionModel.SetCondition<T>
Provides a way to set the condition.
  • Method Details

    • isNull

      boolean isNull()

      Sets the operator to Operator.EQUAL, the operand to null and enables this condition.

      Returns:
      true if the condition state changed
    • isNotNull

      boolean isNotNull()

      Sets the operator to Operator.NOT_EQUAL, the operand to null and enables this condition.

      Returns:
      true if the condition state changed
    • equalTo

      boolean equalTo(@Nullable T value)

      Sets the operator to Operator.EQUAL and the operand to value.

      Enables the condition if value is non-null, otherwise disables it.

      Parameters:
      value - the operand
      Returns:
      true if the condition state changed
    • notEqualTo

      boolean notEqualTo(@Nullable T value)

      Sets the operator to Operator.NOT_EQUAL and the operand to value.

      Enables the condition if value is non-null, otherwise disables it.

      Parameters:
      value - the operand
      Returns:
      true if the condition state changed
    • greaterThan

      boolean greaterThan(@Nullable T value)

      Sets the operator to Operator.GREATER_THAN and the operand to value.

      Enables the condition if value is non-null, otherwise disables it.

      Parameters:
      value - the operand
      Returns:
      true if the condition state changed
    • greaterThanOrEqualTo

      boolean greaterThanOrEqualTo(@Nullable T value)

      Sets the operator to Operator.GREATER_THAN_OR_EQUAL and the operand to value.

      Enables the condition if value is non-null, otherwise disables it.

      Parameters:
      value - the operand
      Returns:
      true if the condition state changed
    • lessThan

      boolean lessThan(@Nullable T value)

      Sets the operator to Operator.LESS_THAN and the operand to value.

      Enables the condition if value is non-null, otherwise disables it.

      Parameters:
      value - the operand
      Returns:
      true if the condition state changed
    • lessThanOrEqualTo

      boolean lessThanOrEqualTo(@Nullable T value)

      Sets the operator to Operator.LESS_THAN_OR_EQUAL and the operand to value.

      Enables the condition if value is non-null, otherwise disables it.

      Parameters:
      value - the operand
      Returns:
      true if the condition state changed
    • in

      boolean in(T... values)

      Sets the operator to Operator.IN and the operands to values.

      Enables the condition if values is not empty, otherwise disables it.

      Parameters:
      values - the operands
      Returns:
      true if the condition state changed
    • in

      boolean in(Collection<T> values)

      Sets the operator to Operator.IN and the operands to values.

      Enables the condition if values is not empty, otherwise disables it.

      Parameters:
      values - the operands
      Returns:
      true if the condition state changed
    • notIn

      boolean notIn(T... values)

      Sets the operator to Operator.IN and the operands to values.

      Enables the condition if values is not empty, otherwise disables it.

      Parameters:
      values - the operands
      Returns:
      true if the condition state changed
    • notIn

      boolean notIn(Collection<T> values)

      Sets the operator to Operator.NOT_IN and the operands to values.

      Enables the condition if values is not empty, otherwise disables it.

      Parameters:
      values - the operands
      Returns:
      true if the condition state changed
    • betweenExclusive

      boolean betweenExclusive(@Nullable T lower, @Nullable T upper)

      Sets the operator to Operator.BETWEEN_EXCLUSIVE and the operands to lower and upper.

      Enables the condition if both operands are non-null, otherwise disables it.

      Parameters:
      lower - the lower bound
      upper - the upper bound
      Returns:
      true if the condition state changed
    • notBetweenExclusive

      boolean notBetweenExclusive(@Nullable T lower, @Nullable T upper)

      Sets the operator to Operator.NOT_BETWEEN_EXCLUSIVE and the operands to lower and upper.

      Enables the condition if both operands are non-null, otherwise disables it.

      Parameters:
      lower - the lower bound
      upper - the upper bound
      Returns:
      true if the condition state changed
    • between

      boolean between(@Nullable T lower, @Nullable T upper)

      Sets the operator to Operator.BETWEEN and the operands to lower and upper.

      Enables the condition if both operands are non-null, otherwise disables it.

      Parameters:
      lower - the lower bound
      upper - the upper bound
      Returns:
      true if the condition state changed
    • notBetween

      boolean notBetween(@Nullable T lower, @Nullable T upper)

      Sets the operator to Operator.NOT_BETWEEN and the operands to lower and upper.

      Enables the condition if both operands are non-null, otherwise disables it.

      Parameters:
      lower - the lower bound
      upper - the upper bound
      Returns:
      true if the condition state changed