Package org.mybatis.dynamic.sql
Class AbstractSingleValueCondition<T>
- java.lang.Object
-
- org.mybatis.dynamic.sql.AbstractSingleValueCondition<T>
-
- All Implemented Interfaces:
VisitableCondition<T>
- Direct Known Subclasses:
IsEqualTo
,IsGreaterThan
,IsGreaterThanOrEqualTo
,IsLessThan
,IsLessThanOrEqualTo
,IsLike
,IsLikeCaseInsensitive
,IsNotEqualTo
,IsNotLike
,IsNotLikeCaseInsensitive
public abstract class AbstractSingleValueCondition<T> extends Object implements VisitableCondition<T>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSingleValueCondition(T value)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <R> R
accept(ConditionVisitor<T,R> visitor)
abstract AbstractSingleValueCondition<T>
filter(Predicate<? super T> predicate)
If renderable and the value matches the predicate, returns this condition.protected <S extends AbstractSingleValueCondition<T>>
SfilterSupport(Predicate<? super T> predicate, Supplier<S> emptySupplier, S self)
protected <R,S extends AbstractSingleValueCondition<R>>
SmapSupport(Function<? super T,? extends R> mapper, Function<R,S> constructor, Supplier<S> emptySupplier)
abstract String
renderCondition(String columnName, String placeholder)
T
value()
-
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
-
-
-
-
Field Detail
-
value
protected final T value
-
-
Constructor Detail
-
AbstractSingleValueCondition
protected AbstractSingleValueCondition(T value)
-
-
Method Detail
-
value
public T value()
-
accept
public <R> R accept(ConditionVisitor<T,R> visitor)
- Specified by:
accept
in interfaceVisitableCondition<T>
-
filterSupport
protected <S extends AbstractSingleValueCondition<T>> S filterSupport(Predicate<? super T> predicate, Supplier<S> emptySupplier, S self)
-
mapSupport
protected <R,S extends AbstractSingleValueCondition<R>> S mapSupport(Function<? super T,? extends R> mapper, Function<R,S> constructor, Supplier<S> emptySupplier)
-
filter
public abstract AbstractSingleValueCondition<T> filter(Predicate<? super T> predicate)
If renderable and the value matches the predicate, returns this condition. Else returns a condition that will not render.- Parameters:
predicate
- predicate applied to the value, if renderable- Returns:
- this condition if renderable and the value matches the predicate, otherwise a condition that will not render.
-
-