org.eobjects.analyzer.beans.filter
Class NullCheckFilter

java.lang.Object
  extended by org.eobjects.analyzer.beans.filter.NullCheckFilter
All Implemented Interfaces:
Filter<NullCheckFilter.NullCheckCategory>, QueryOptimizedFilter<NullCheckFilter.NullCheckCategory>

@FilterBean(value="Null check")
@Alias(value="Not null")
@Description(value="Filter rows that contain null values.")
@Categorized(value=FilterCategory.class)
public class NullCheckFilter
extends Object
implements QueryOptimizedFilter<NullCheckFilter.NullCheckCategory>


Nested Class Summary
static class NullCheckFilter.NullCheckCategory
           
 
Constructor Summary
NullCheckFilter()
           
NullCheckFilter(InputColumn<?>[] columns, boolean considerEmptyStringAsNull)
           
 
Method Summary
 NullCheckFilter.NullCheckCategory categorize(InputRow inputRow)
          Categorizes/filters a single row.
 boolean isOptimizable(NullCheckFilter.NullCheckCategory category)
          Inquires the filter if a given category is optimizable by the use of a query.
 Query optimizeQuery(Query q, NullCheckFilter.NullCheckCategory category)
          Optimizes the filter execution by retrieving a query (as opposed to invoking the categorize(...) method for each row).
 void setConsiderEmptyStringAsNull(boolean considerEmptyStringAsNull)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullCheckFilter

public NullCheckFilter()

NullCheckFilter

public NullCheckFilter(InputColumn<?>[] columns,
                       boolean considerEmptyStringAsNull)
Method Detail

setConsiderEmptyStringAsNull

public void setConsiderEmptyStringAsNull(boolean considerEmptyStringAsNull)

isOptimizable

public boolean isOptimizable(NullCheckFilter.NullCheckCategory 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<NullCheckFilter.NullCheckCategory>
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,
                           NullCheckFilter.NullCheckCategory 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<NullCheckFilter.NullCheckCategory>
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.

categorize

public NullCheckFilter.NullCheckCategory categorize(InputRow inputRow)
Description copied from interface: Filter
Categorizes/filters a single row.

Specified by:
categorize in interface Filter<NullCheckFilter.NullCheckCategory>
Parameters:
inputRow - the row to categorize.
Returns:
an enum representing the category applied to the row.


Copyright © 2012 eobjects.org. All Rights Reserved.