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

public abstract class AttributeFilterProvider<FilterValue>
extends Object
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 Details

  • Method Details

    • apply

      public <T extends WhereBuilder<T>> T apply​(T whereBuilder, String attributeExpression)
      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 applied
      attributeExpression - 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 applied
      subqueryAlias - The alias for the subquery which will be replaced by the actual subquery
      subqueryExpresion - The expression which wraps a subquery
      provider - The provider for the subquery
      Returns:
      The object which the restriction builder returns on a terminal operation
    • apply

      protected <T> T apply​(RestrictionBuilder<T> restrictionBuilder)
      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