Class AbstractTwoValueCondition<T>

java.lang.Object
org.mybatis.dynamic.sql.AbstractTwoValueCondition<T>
All Implemented Interfaces:
VisitableCondition<T>
Direct Known Subclasses:
IsBetween, IsNotBetween

public abstract class AbstractTwoValueCondition<T> extends Object implements VisitableCondition<T>
  • Field Details

    • value1

      protected final T value1
    • value2

      protected final T value2
  • Constructor Details

    • AbstractTwoValueCondition

      protected AbstractTwoValueCondition(T value1, T value2)
  • Method Details

    • value1

      public T value1()
    • value2

      public T value2()
    • accept

      public <R> R accept(ConditionVisitor<T,R> visitor)
      Specified by:
      accept in interface VisitableCondition<T>
    • filterSupport

      protected <S extends AbstractTwoValueCondition<T>> S filterSupport(BiPredicate<? super T,? super T> predicate, Supplier<S> emptySupplier, S self)
    • filterSupport

      protected <S extends AbstractTwoValueCondition<T>> S filterSupport(Predicate<? super T> predicate, Supplier<S> emptySupplier, S self)
    • mapSupport

      protected <R, S extends AbstractTwoValueCondition<R>> S mapSupport(Function<? super T,? extends R> mapper1, Function<? super T,? extends R> mapper2, BiFunction<R,R,S> constructor, Supplier<S> emptySupplier)
    • filter

      public abstract AbstractTwoValueCondition<T> filter(BiPredicate<? super T,? super T> predicate)
      If renderable and the values match the predicate, returns this condition. Else returns a condition that will not render.
      Parameters:
      predicate - predicate applied to the values, if renderable
      Returns:
      this condition if renderable and the values match the predicate, otherwise a condition that will not render.
    • filter

      public abstract AbstractTwoValueCondition<T> filter(Predicate<? super T> predicate)
      If renderable and both values match the predicate, returns this condition. Else returns a condition that will not render. This function implements a short-circuiting test. If the first value does not match the predicate, then the second value will not be tested.
      Parameters:
      predicate - predicate applied to both values, if renderable
      Returns:
      this condition if renderable and the values match the predicate, otherwise a condition that will not render.
    • operator1

      public abstract String operator1()
    • operator2

      public abstract String operator2()