Package org.mybatis.dynamic.sql
Class AbstractTwoValueCondition<T>
java.lang.Object
org.mybatis.dynamic.sql.AbstractTwoValueCondition<T>
- All Implemented Interfaces:
VisitableCondition<T>
- Direct Known Subclasses:
IsBetween,IsNotBetween
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<R> Raccept(ConditionVisitor<T, R> visitor) abstract AbstractTwoValueCondition<T>filter(BiPredicate<? super T, ? super T> predicate) If renderable and the values match the predicate, returns this condition.abstract AbstractTwoValueCondition<T>If renderable and both values match the predicate, returns this condition.protected <S extends AbstractTwoValueCondition<T>>
SfilterSupport(BiPredicate<? super T, ? super T> predicate, Supplier<S> emptySupplier, S self) protected <S extends AbstractTwoValueCondition<T>>
SfilterSupport(Predicate<? super T> predicate, Supplier<S> emptySupplier, S self) protected <R,S extends AbstractTwoValueCondition<R>>
SmapSupport(Function<? super T, ? extends R> mapper1, Function<? super T, ? extends R> mapper2, BiFunction<R, R, S> constructor, Supplier<S> emptySupplier) abstract StringrenderCondition(String columnName, String placeholder1, String placeholder2) value1()value2()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.mybatis.dynamic.sql.VisitableCondition
renderingSkipped, shouldRender
-
Field Details
-
value1
-
value2
-
-
Constructor Details
-
AbstractTwoValueCondition
-
-
Method Details
-
value1
-
value2
-
accept
- Specified by:
acceptin interfaceVisitableCondition<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
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
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.
-
renderCondition
-