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 java.lang.Object implements VisitableCondition<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.function.Supplier<T>valueSupplier
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractSingleValueCondition(java.util.function.Supplier<T> valueSupplier)protectedAbstractSingleValueCondition(java.util.function.Supplier<T> valueSupplier, java.util.function.Predicate<T> predicate)
-
Method Summary
Modifier and Type Method Description <R> Raccept(ConditionVisitor<T,R> visitor)abstract java.lang.StringrenderCondition(java.lang.String columnName, java.lang.String placeholder)booleanshouldRender()Subclasses can override this to inform the renderer if the condition should not be included in the rendered SQL.Tvalue()
-
-
-
Field Detail
-
valueSupplier
protected java.util.function.Supplier<T> valueSupplier
-
-
Method Detail
-
value
public T value()
-
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
public <R> R accept(ConditionVisitor<T,R> visitor)
- Specified by:
acceptin interfaceVisitableCondition<T>
-
renderCondition
public abstract java.lang.String renderCondition(java.lang.String columnName, java.lang.String placeholder)
-
-