Package org.mybatis.dynamic.sql
Class AbstractListValueCondition<T>
java.lang.Object
org.mybatis.dynamic.sql.AbstractListValueCondition<T>
- All Implemented Interfaces:
VisitableCondition<T>
- Direct Known Subclasses:
IsIn,IsInCaseInsensitive,IsInCaseInsensitiveWhenPresent,IsInWhenPresent,IsNotIn,IsNotInCaseInsensitive,IsNotInCaseInsensitiveWhenPresent,IsNotInWhenPresent
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<R> Raccept(ConditionVisitor<T, R> visitor) abstract AbstractListValueCondition<T> If not empty, apply the predicate to each value in the list and return a new condition with the filtered values.protected <S extends AbstractListValueCondition<T>>
SfilterSupport(Predicate<? super T> predicate, Function<Collection<T>, S> constructor, S self, Supplier<S> emptySupplier) booleanisEmpty()Subclasses can override this to indicate whether the condition is considered empty.protected <R,S extends AbstractListValueCondition<R>>
SmapSupport(Function<? super T, ? extends R> mapper, Function<Collection<R>, S> constructor, Supplier<S> emptySupplier) abstract Stringoperator()values()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
overrideRenderedLeftColumn, renderingSkipped, shouldRender
-
Field Details
-
values
-
-
Constructor Details
-
AbstractListValueCondition
-
-
Method Details
-
values
-
isEmpty
public boolean isEmpty()Description copied from interface:VisitableConditionSubclasses can override this to indicate whether the condition is considered empty. This is primarily used in map and filter operations - the map and filter functions will not be applied if the condition is empty.- Specified by:
isEmptyin interfaceVisitableCondition<T>- Returns:
- true if the condition is empty.
-
accept
- Specified by:
acceptin interfaceVisitableCondition<T>
-
filterSupport
protected <S extends AbstractListValueCondition<T>> S filterSupport(Predicate<? super T> predicate, Function<Collection<T>, S> constructor, S self, Supplier<S> emptySupplier) -
mapSupport
protected <R,S extends AbstractListValueCondition<R>> S mapSupport(Function<? super T, ? extends R> mapper, Function<Collection<R>, S> constructor, Supplier<S> emptySupplier) -
filter
If not empty, apply the predicate to each value in the list and return a new condition with the filtered values. Else returns an empty condition (this).- Parameters:
predicate- predicate applied to the values, if not empty- Returns:
- a new condition with filtered values if renderable, otherwise an empty condition
-
operator
-