com.espertech.esper.filter
Class IndexHelper

java.lang.Object
  extended by com.espertech.esper.filter.IndexHelper

public class IndexHelper
extends java.lang.Object

Utility class for matching filter parameters to indizes. Matches are indicated by the index FilterParamIndexBase and the filter parameter FilterSpecParam featuring the same event property name and filter operator.


Constructor Summary
IndexHelper()
           
 
Method Summary
static Pair<FilterValueSetParam,FilterParamIndexBase> findIndex(java.util.ArrayDeque<FilterValueSetParam> parameters, java.util.List<FilterParamIndexBase> indizes)
          Find an index that matches one of the filter parameters passed.
static FilterValueSetParam findParameter(java.util.ArrayDeque<FilterValueSetParam> parameters, FilterParamIndexBase index)
          Determine among the passed in filter parameters any parameter that matches the given index on property name and filter operator type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexHelper

public IndexHelper()
Method Detail

findIndex

public static Pair<FilterValueSetParam,FilterParamIndexBase> findIndex(java.util.ArrayDeque<FilterValueSetParam> parameters,
                                                                       java.util.List<FilterParamIndexBase> 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. NOTE: Doesn't match non-property based index - thus boolean expressions don't get found and are always entered as a new index

Parameters:
parameters - is the list of sorted filter parameters
indizes - 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(java.util.ArrayDeque<FilterValueSetParam> parameters,
                                                FilterParamIndexBase 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 list
index - is a filter parameter constant value index
Returns:
filter parameter, or null if no matching parameter found.

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com