Class EqualFilter<FilterValue>

java.lang.Object
com.blazebit.persistence.view.AttributeFilterProvider<FilterValue>
com.blazebit.persistence.view.filter.EqualFilter<FilterValue>
Type Parameters:
FilterValue - The type of the filter value i.e. the attribute type

public abstract class EqualFilter<FilterValue>
extends AttributeFilterProvider<FilterValue>
A placeholder for a filter implementation that implements an equal filter. This placeholder can be used in a AttributeFilter annotation. An equal filter accepts a class and an object. The class is interpreted as the expected type. This is used to convert the object parameter. The following conversion are done based on the expected type in the right order.
  • If the value is a SubqueryProvider, the filter will create a subquery restriction.
  • If the value is an instance of the expected type, the value will be used in the restriction as is.
  • If the parsing of the Object.toString() representation of the object to the expected type is successful, the parsed value will be used in the restriction.
  • If the parsing of the object fails, an IllegalArgumentException is thrown.
Since:
1.0.0
Author:
Christian Beikov