org.eobjects.analyzer.beans.filter
Class MaxRowsFilter
java.lang.Object
org.eobjects.analyzer.beans.filter.MaxRowsFilter
- All Implemented Interfaces:
- Filter<ValidationCategory>, QueryOptimizedFilter<ValidationCategory>
@FilterBean(value="Max rows")
@Description(value="Sets a maximum of rows to process.")
@Categorized(value=FilterCategory.class)
public class MaxRowsFilter
- extends Object
- implements QueryOptimizedFilter<ValidationCategory>
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MaxRowsFilter
public MaxRowsFilter()
MaxRowsFilter
public MaxRowsFilter(int maxRows)
setMaxRows
public void setMaxRows(int maxRows)
getMaxRows
public int getMaxRows()
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.
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.