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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<R> R
accept
(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 String
abstract String
value1()
value2()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.mybatis.dynamic.sql.VisitableCondition
isEmpty, overrideRenderedLeftColumn, renderingSkipped, shouldRender
-
Field Details
-
value1
-
value2
-
-
Constructor Details
-
AbstractTwoValueCondition
-
-
Method Details
-
value1
-
value2
-
accept
- Specified by:
accept
in 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.
-
operator1
-
operator2
-