net.esper.filter
Class IndexHelper
java.lang.Object
net.esper.filter.IndexHelper
public class IndexHelper
- extends Object
Utility class for matching filter parameters to indizes. Matches are indicated by the index FilterParamIndex
and the filter parameter FilterSpecParam
featuring the same event property name and filter operator.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IndexHelper
public IndexHelper()
findIndex
public static Pair<FilterValueSetParam,FilterParamIndex> findIndex(SortedSet<FilterValueSetParam> parameters,
List<FilterParamIndex> indizes)
- Find an index that matches one of the filter parameters passed.
The parameter type and index type match up if the property name and
filter operator are the same for the index and the filter parameter.
For instance, for a filter parameter of "count EQUALS 10", the index against property "count" with
operator type EQUALS will be returned, if present.
NOTE: The caller is expected to obtain locks, if necessary, on the collections passed in.
- Parameters:
parameters
- is the list of sorted filter parametersindizes
- is the collection of indexes
- Returns:
- A matching pair of filter parameter and index, if any matches were found. Null if no matches were found.
findParameter
public static FilterValueSetParam findParameter(SortedSet<FilterValueSetParam> parameters,
FilterParamIndex index)
- Determine among the passed in filter parameters any parameter that matches the given index on property name and
filter operator type. Returns null if none of the parameters matches the index.
- Parameters:
parameters
- is the filter parameter listindex
- is a filter parameter constant value index
- Returns:
- filter parameter, or null if no matching parameter found.