Class IsBetween<T>
java.lang.Object
org.mybatis.dynamic.sql.AbstractTwoValueCondition<@NonNull T>
org.mybatis.dynamic.sql.where.condition.IsBetween<T>
- All Implemented Interfaces:
AbstractTwoValueCondition.Filterable<T>,AbstractTwoValueCondition.Mappable<T>,RenderableCondition<T>
public class IsBetween<T>
extends AbstractTwoValueCondition<@NonNull T>
implements AbstractTwoValueCondition.Filterable<T>, AbstractTwoValueCondition.Mappable<T>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.mybatis.dynamic.sql.AbstractTwoValueCondition
AbstractTwoValueCondition.Filterable<T>, AbstractTwoValueCondition.Mappable<T> -
Field Summary
Fields inherited from class org.mybatis.dynamic.sql.AbstractTwoValueCondition
value1, value2 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> IsBetween<T> empty()filter(BiPredicate<? super @NonNull T, ? super @NonNull T> predicate) If renderable and the values match the predicate, returns this condition.If renderable and both values match the predicate, returns this condition.static <T> IsBetween.Builder<T> isBetween(T value1) <R> IsBetween<R> If renderable, apply the mapping to both values and return a new condition with the new values.<R> IsBetween<R> map(Function<? super @NonNull T, ? extends @NonNull R> mapper1, Function<? super @NonNull T, ? extends @NonNull R> mapper2) If renderable, apply the mappings to the values and return a new condition with the new values.Methods inherited from class org.mybatis.dynamic.sql.AbstractTwoValueCondition
filterSupport, filterSupport, mapSupport, renderCondition, value1, value2Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.mybatis.dynamic.sql.RenderableCondition
isEmpty, renderingSkipped, renderLeftColumn, shouldRender
-
Constructor Details
-
IsBetween
-
-
Method Details
-
empty
-
operator1
- Specified by:
operator1in classAbstractTwoValueCondition<@NonNull T>
-
operator2
- Specified by:
operator2in classAbstractTwoValueCondition<@NonNull T>
-
filter
Description copied from interface:AbstractTwoValueCondition.FilterableIf renderable and the values match the predicate, returns this condition. Else returns a condition that will not render.- Specified by:
filterin interfaceAbstractTwoValueCondition.Filterable<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
Description copied from interface:AbstractTwoValueCondition.FilterableIf 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 interfaceAbstractTwoValueCondition.Filterable<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 @NonNull T, ? extends @NonNull R> mapper1, Function<? super @NonNull T, ? extends @NonNull R> mapper2) Description copied from interface:AbstractTwoValueCondition.MappableIf 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).- Specified by:
mapin interfaceAbstractTwoValueCondition.Mappable<T>- 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
Description copied from interface:AbstractTwoValueCondition.MappableIf 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).- Specified by:
mapin interfaceAbstractTwoValueCondition.Mappable<T>- 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
-