Package org.mybatis.dynamic.sql
Interface AbstractSingleValueCondition.Filterable<T>
- Type Parameters:
T- the Java type related to the database column type
- All Known Implementing Classes:
IsEqualTo,IsEqualToWhenPresent,IsGreaterThan,IsGreaterThanOrEqualTo,IsGreaterThanOrEqualToWhenPresent,IsGreaterThanWhenPresent,IsLessThan,IsLessThanOrEqualTo,IsLessThanOrEqualToWhenPresent,IsLessThanWhenPresent,IsLike,IsLikeCaseInsensitive,IsLikeCaseInsensitiveWhenPresent,IsLikeWhenPresent,IsNotEqualTo,IsNotEqualToWhenPresent,IsNotLike,IsNotLikeCaseInsensitive,IsNotLikeCaseInsensitiveWhenPresent,IsNotLikeWhenPresent
- Enclosing class:
AbstractSingleValueCondition<T>
public static interface AbstractSingleValueCondition.Filterable<T>
Conditions may implement Filterable to add optionality to rendering.
If a condition is Filterable, then a user may add a filter to the usage of the condition that makes a decision whether to render the condition at runtime. Conditions that fail the filter will be dropped from the rendered SQL.
Implementations of Filterable may call
AbstractSingleValueCondition.filterSupport(Predicate, Supplier, AbstractSingleValueCondition) as
a common implementation of the filtering algorithm.
-
Method Summary
Modifier and TypeMethodDescriptionIf renderable and the value matches the predicate, returns this condition.
-
Method Details
-
filter
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.
-