public abstract class AbstractListValueCondition<T> extends Object implements VisitableCondition<T>
Modifier and Type | Field and Description |
---|---|
protected Callback |
emptyCallback |
protected Collection<T> |
values |
Modifier | Constructor and Description |
---|---|
protected |
AbstractListValueCondition(Collection<T> values) |
protected |
AbstractListValueCondition(Collection<T> values,
Callback emptyCallback) |
Modifier and Type | Method and Description |
---|---|
<R> R |
accept(ConditionVisitor<T,R> visitor) |
abstract AbstractListValueCondition<T> |
filter(Predicate<? super T> predicate)
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>> |
filterSupport(Predicate<? super T> predicate,
BiFunction<Collection<T>,Callback,S> constructor,
S self,
Supplier<S> emptySupplier) |
protected <R,S extends AbstractListValueCondition<R>> |
mapSupport(Function<? super T,? extends R> mapper,
BiFunction<Collection<R>,Callback,S> constructor,
Supplier<S> emptySupplier) |
<R> Stream<R> |
mapValues(Function<T,R> mapper) |
abstract String |
renderCondition(String columnName,
Stream<String> placeholders) |
void |
renderingSkipped()
This method will be called during rendering when
VisitableCondition.shouldRender()
returns false. |
boolean |
shouldRender()
Subclasses can override this to inform the renderer if the condition should not be included
in the rendered SQL.
|
abstract AbstractListValueCondition<T> |
withListEmptyCallback(Callback callback) |
protected final Collection<T> values
protected final Callback emptyCallback
protected AbstractListValueCondition(Collection<T> values)
protected AbstractListValueCondition(Collection<T> values, Callback emptyCallback)
public boolean shouldRender()
VisitableCondition
shouldRender
in interface VisitableCondition<T>
public void renderingSkipped()
VisitableCondition
VisitableCondition.shouldRender()
returns false.renderingSkipped
in interface VisitableCondition<T>
public <R> R accept(ConditionVisitor<T,R> visitor)
accept
in interface VisitableCondition<T>
protected <S extends AbstractListValueCondition<T>> S filterSupport(Predicate<? super T> predicate, BiFunction<Collection<T>,Callback,S> constructor, S self, Supplier<S> emptySupplier)
protected <R,S extends AbstractListValueCondition<R>> S mapSupport(Function<? super T,? extends R> mapper, BiFunction<Collection<R>,Callback,S> constructor, Supplier<S> emptySupplier)
public abstract AbstractListValueCondition<T> filter(Predicate<? super T> predicate)
predicate
- predicate applied to the values, if renderablepublic abstract AbstractListValueCondition<T> withListEmptyCallback(Callback callback)
Copyright © 2016–2021 MyBatis.org. All rights reserved.