public interface FilterFactory
| Modifier and Type | Method and Description |
|---|---|
MultipleFilterFilter |
createAndFilter(Filter... filters)
Creates a filter that matches when all specified filters
match (i.e. that performs a logical AND).
|
AttributeFactory |
createAttributeFactory(java.lang.Class<?> rootClass)
Creates a new attribute factory for filters working on the specified root class
|
ComparisonFilter |
createComparisonFilter(Attribute attr,
ComparisonOperator operator,
java.lang.Comparable<?> compareValue)
Creates a filter that matches when a comparison of an attribute to a constant
value succeeds.
|
Filter |
createConstantFilter(boolean matchAll)
Creates a constant filter that either matches all objects or no objects
based on the designated parameter.
|
ConstPositionFilter |
createConstPositionFilter(Attribute attr,
Filter filter,
ComparisonOperator operator,
int position)
Creates a filter that matches when comparison between the position of the
first object in the list returned by the attribute matching the filter and the specified
integer succeeds.
|
ContainsAllFilter |
createContainsAllFilter(Attribute attr,
Filter filter,
java.util.Collection<java.io.Serializable> allObjects)
Creates a filter that matches when all of the objects in the allObjects collection
matching the specified filter are also contained in the collection
returned by the attribute (i.e. if {o "in" allObjects | filter.matches(o)} is a subset
of the attribute value)
|
ContainsFilter |
createContainsAnyFilter(Attribute attr,
Filter filter)
Creates a filter that matches when any of the objects in the collection
returned by the specified attribute match the specified filter
(analogous to a existential quantifier)
|
ContainsFilter |
createContainsOnlyFilter(Attribute attr,
Filter filter)
Creates a filter that matches when all of the objects in the collection
returned by the specified attribute match the specified filter
(analogous to a universal quantifier)
|
UnaryFilter |
createNotFilter(Filter filter)
Creates a filter that matches when the specified filter does not
match (i.e. that performs a logical NOT).
|
MultipleFilterFilter |
createOrFilter(Filter... filters)
Creates a filter that matches when one of the specified filters
matches (i.e. that performs a logical OR).
|
TwoFiltersPositionFilter |
createTwoFiltersPositionFilter(Attribute attr,
Filter filter1,
ComparisonOperator operator,
Filter filter2)
Creates a filter that matches when comparison between the position of the
first object in the list returned by the attribute matching the first filter and
the first object matching the second filter succeeds.
|
AttributeFactory createAttributeFactory(java.lang.Class<?> rootClass)
rootClass - ComparisonFilter createComparisonFilter(Attribute attr, ComparisonOperator operator, java.lang.Comparable<?> compareValue)
attr - operator - compareValue - UnaryFilter createNotFilter(Filter filter)
filter - Filter createConstantFilter(boolean matchAll)
matchAll - Whether to create a True- or a
False-filter.MultipleFilterFilter createAndFilter(Filter... filters)
filters - MultipleFilterFilter createOrFilter(Filter... filters)
filters - ContainsFilter createContainsAnyFilter(Attribute attr, Filter filter)
attr - an attribute that returns a collection of objectsfilter - a filter that works on the objects contained in the attribute's collectionContainsFilter createContainsOnlyFilter(Attribute attr, Filter filter)
attr - an attribute that returns a collection of objectsfilter - a filter that works on the objects contained in the attribute's collectionContainsAllFilter createContainsAllFilter(Attribute attr, Filter filter, java.util.Collection<java.io.Serializable> allObjects)
attr - an attribute that returns a collection of objectsfilter - a filter that works on the objects contained in the attribute's collectionallObjects - all existing objects of the type returned by the attributeConstPositionFilter createConstPositionFilter(Attribute attr, Filter filter, ComparisonOperator operator, int position)
attr - an attribute that returns a collection of objectfilter - a filter that works on the objects contained in the attribute's collectionoperator - the comparison operator usedposition - the position to compare toTwoFiltersPositionFilter createTwoFiltersPositionFilter(Attribute attr, Filter filter1, ComparisonOperator operator, Filter filter2)
attr - an attribute that returns a collection of objectfilter1 - a filter that works on the objects contained in the attribute's collectionfilter2 - a filter that works on the objects contained in the attribute's collectionoperator - the comparison operator used