Package com.blazebit.persistence.view
Class AttributeFilterProvider<FilterValue>
java.lang.Object
com.blazebit.persistence.view.AttributeFilterProvider<FilterValue>
- Type Parameters:
FilterValue- The filter value type
- Direct Known Subclasses:
BetweenFilter,ContainsFilter,ContainsIgnoreCaseFilter,EndsWithFilter,EndsWithIgnoreCaseFilter,EqualFilter,GreaterOrEqualFilter,GreaterThanFilter,LessOrEqualFilter,LessThanFilter,NullFilter,StartsWithFilter,StartsWithIgnoreCaseFilter
An attribute filter provider is an object that applies restrictions on a
WhereBuilder.
Attribute filter providers must have a constructor that accepts either of the following parameter types
The Class argument refers to the expected type i.e. the attribute type. The object argument refers to the filter value.- Since:
- 1.0.0
- Author:
- Christian Beikov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> Tapply(RestrictionBuilder<T> restrictionBuilder) Applies a restriction on the given restriction builder.<T extends WhereBuilder<T>>
TApplies restrictions for the given attributeExpression on the given where builder.<T extends WhereBuilder<T>>
Tapply(T whereBuilder, String subqueryAlias, String subqueryExpresion, SubqueryProvider provider) Applies restrictions for the given subquery on the given where builder.
-
Constructor Details
-
AttributeFilterProvider
public AttributeFilterProvider()
-
-
Method Details
-
apply
Applies restrictions for the given attributeExpression on the given where builder.- Type Parameters:
T- The actual type of the where builder- Parameters:
whereBuilder- The where builder on which the restrictions should be appliedattributeExpression- The expression for the attribute on which a restriction should be applied- Returns:
- The object which the restriction builder returns on a terminal operation
-
apply
public <T extends WhereBuilder<T>> T apply(T whereBuilder, String subqueryAlias, String subqueryExpresion, SubqueryProvider provider) Applies restrictions for the given subquery on the given where builder.- Type Parameters:
T- The actual type of the where builder- Parameters:
whereBuilder- The where builder on which the restrictions should be appliedsubqueryAlias- The alias for the subquery which will be replaced by the actual subquerysubqueryExpresion- The expression which wraps a subqueryprovider- The provider for the subquery- Returns:
- The object which the restriction builder returns on a terminal operation
-
apply
Applies a restriction on the given restriction builder.- Type Parameters:
T- The return type of terminal operations of the restriction builder- Parameters:
restrictionBuilder- The restriction builder- Returns:
- The object which the restriction builder returns on a terminal operation
-