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,IsNotIn,IsNotInCaseInsensitive
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<R> Raccept(ConditionVisitor<T, R> visitor) abstract AbstractListValueCondition<T>If renderable, 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) protected <R,S extends AbstractListValueCondition<R>>
SmapSupport(Function<? super T, ? extends R> mapper, Function<Collection<R>, S> constructor, Supplier<S> emptySupplier) final <R> Stream<R>abstract StringrenderCondition(String columnName, Stream<String> placeholders) booleanSubclasses can override this to inform the renderer if the condition should not be included in the rendered SQL.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
-
Field Details
-
values
-
-
Constructor Details
-
AbstractListValueCondition
-
-
Method Details
-
mapValues
-
shouldRender
public boolean shouldRender()Description copied from interface:VisitableConditionSubclasses can override this to inform the renderer if the condition should not be included in the rendered SQL. For example, IsEqualWhenPresent will not render if the value is null.- Specified by:
shouldRenderin interfaceVisitableCondition<T>- Returns:
- true if the condition should render.
-
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 renderable, apply the predicate to each value in the list and return a new condition with the filtered values. Else returns a condition that will not render (this). If all values are filtered out of the value list, then the condition will not render.- Parameters:
predicate- predicate applied to the values, if renderable- Returns:
- a new condition with filtered values if renderable, otherwise a condition that will not render.
-
renderCondition
-