- java.lang.Object
-
- org.mybatis.dynamic.sql.AbstractTwoValueCondition<T>
-
- org.mybatis.dynamic.sql.where.condition.IsBetween<T>
-
- All Implemented Interfaces:
VisitableCondition<T>
public class IsBetween<T> extends AbstractTwoValueCondition<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIsBetween.Builder<T>static classIsBetween.WhenPresentBuilder<T>
-
Field Summary
-
Fields inherited from class org.mybatis.dynamic.sql.AbstractTwoValueCondition
value1, value2
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <T> IsBetween<T>empty()IsBetween<T>filter(BiPredicate<? super T,? super T> predicate)If renderable and the values match the predicate, returns this condition.IsBetween<T>filter(Predicate<? super T> predicate)If renderable and both values match the predicate, returns this condition.static <T> IsBetween.Builder<T>isBetween(T value1)static <T> IsBetween.WhenPresentBuilder<T>isBetweenWhenPresent(T value1)<R> IsBetween<R>map(Function<? super T,? extends R> mapper)If renderable, apply the mapping to both values and return a new condition with the new values.<R> IsBetween<R>map(Function<? super T,? extends R> mapper1, Function<? super T,? extends R> mapper2)If renderable, apply the mappings to the values and return a new condition with the new values.StringrenderCondition(String columnName, String placeholder1, String placeholder2)IsBetween<T>then(UnaryOperator<T> mapper1, UnaryOperator<T> mapper2)Deprecated.replaced bymap(Function, Function)IsBetween<T>when(BiPredicate<T,T> predicate)Deprecated.replaced byfilter(BiPredicate)-
Methods inherited from class org.mybatis.dynamic.sql.AbstractTwoValueCondition
accept, filterSupport, filterSupport, mapSupport, 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
renderingSkipped, shouldRender
-
-
-
-
Method Detail
-
empty
public static <T> IsBetween<T> empty()
-
renderCondition
public String renderCondition(String columnName, String placeholder1, String placeholder2)
- Specified by:
renderConditionin classAbstractTwoValueCondition<T>
-
when
@Deprecated public IsBetween<T> when(BiPredicate<T,T> predicate)
Deprecated.replaced byfilter(BiPredicate)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.
-
then
@Deprecated public IsBetween<T> then(UnaryOperator<T> mapper1, UnaryOperator<T> mapper2)
Deprecated.replaced bymap(Function, Function)If renderable, apply the mappings to the values and return a new condition with the new values. Else return a condition that will not render (this).- Parameters:
mapper1- a mapping function to apply to the first value, if renderablemapper2- a mapping function to apply to the second value, if renderable- Returns:
- a new condition with the result of applying the mappers to the values of this condition, if renderable, otherwise a condition that will not render.
-
filter
public IsBetween<T> filter(BiPredicate<? super T,? super T> predicate)
Description copied from class:AbstractTwoValueConditionIf renderable and the values match the predicate, returns this condition. Else returns a condition that will not render.- Specified by:
filterin classAbstractTwoValueCondition<T>- 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 IsBetween<T> filter(Predicate<? super T> predicate)
Description copied from class:AbstractTwoValueConditionIf 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.- Specified by:
filterin classAbstractTwoValueCondition<T>- 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.
-
map
public <R> IsBetween<R> map(Function<? super T,? extends R> mapper1, Function<? super T,? extends R> mapper2)
If renderable, apply the mappings to the values and return a new condition with the new values. Else return a condition that will not render (this).- Type Parameters:
R- type of the new condition- Parameters:
mapper1- a mapping function to apply to the first value, if renderablemapper2- a mapping function to apply to the second value, if renderable- Returns:
- a new condition with the result of applying the mappers to the values of this condition, if renderable, otherwise a condition that will not render.
-
map
public <R> IsBetween<R> map(Function<? super T,? extends R> mapper)
If renderable, apply the mapping to both values and return a new condition with the new values. Else return a condition that will not render (this).- Type Parameters:
R- type of the new condition- Parameters:
mapper- a mapping function to apply to both values, if renderable- Returns:
- a new condition with the result of applying the mappers to the values of this condition, if renderable, otherwise a condition that will not render.
-
isBetween
public static <T> IsBetween.Builder<T> isBetween(T value1)
-
isBetweenWhenPresent
public static <T> IsBetween.WhenPresentBuilder<T> isBetweenWhenPresent(T value1)
-
-