org.eobjects.analyzer.beans.filter
Class EqualsFilter
java.lang.Object
org.eobjects.analyzer.beans.filter.EqualsFilter
- All Implemented Interfaces:
- Filter<ValidationCategory>, QueryOptimizedFilter<ValidationCategory>
@FilterBean(value="Equals")
@Description(value="A filter that excludes values that are not equal (=) to specific set of valid values")
@Categorized(value=FilterCategory.class)
public class EqualsFilter
- extends Object
- implements QueryOptimizedFilter<ValidationCategory>
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EqualsFilter
public EqualsFilter()
EqualsFilter
public EqualsFilter(String[] values,
InputColumn<?> column)
setValues
public void setValues(String[] values)
init
@Initialize
public void init()
categorize
public ValidationCategory categorize(InputRow inputRow)
- Description copied from interface:
Filter
- Categorizes/filters a single row.
- Specified by:
categorize in interface Filter<ValidationCategory>
- Parameters:
inputRow - the row to categorize.
- Returns:
- an enum representing the category applied to the row.
filter
public ValidationCategory filter(Object v)
isOptimizable
public boolean isOptimizable(ValidationCategory category)
- Description copied from interface:
QueryOptimizedFilter
- Inquires the filter if a given category is optimizable by the use of a
query.
- Specified by:
isOptimizable in interface QueryOptimizedFilter<ValidationCategory>
- Parameters:
category - the category to optimize
- Returns:
- a boolean indicating whether or not the provided category is
query optimizable.
optimizeQuery
public Query optimizeQuery(Query q,
ValidationCategory category)
- Description copied from interface:
QueryOptimizedFilter
- Optimizes the filter execution by retrieving a query (as opposed to
invoking the categorize(...) method for each row).
This method will only be invoked if a preceding call to
isOptimizable(...) with the same category returned true.
- Specified by:
optimizeQuery in interface QueryOptimizedFilter<ValidationCategory>
- Parameters:
q - the query to optimize.category - the filter category to optimize.
- Returns:
- a new query (or a mutated version of the parameterized query)
that includes query optimization.
Copyright © 2012 eobjects.org. All Rights Reserved.