com.google.visualization.datasource.query
Class ColumnIsNullFilter

java.lang.Object
  extended by com.google.visualization.datasource.query.QueryFilter
      extended by com.google.visualization.datasource.query.ColumnIsNullFilter

public class ColumnIsNullFilter
extends QueryFilter

A filter that matches null values. Its isMatch function returns true if the value at the column is a null value (as defined by TableCell.isNull()).

Author:
Yonatan B.Y.

Constructor Summary
ColumnIsNullFilter(AbstractColumn column)
          Constructs a new instance of this class with the given column ID.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
protected  java.util.List<AggregationColumn> getAggregationColumns()
          Returns a list of all aggregation columns this filter uses.
 java.util.Set<java.lang.String> getAllColumnIds()
          Returns all the columnIds this filter uses.
 AbstractColumn getColumn()
          Returns the column that should be null.
 java.util.List<ScalarFunctionColumn> getScalarFunctionColumns()
          Returns a list of all scalarFunctionColumns this filter uses, in this case the scalarFunctionColumns in column (e.g, in the filter 'year(a) is null' it will return year(a).
 int hashCode()
           
 boolean isMatch(DataTable table, TableRow row)
          Checks if this row should be part of the result set.
 java.lang.String toQueryString()
          Returns a string that, when parsed by the query parser, should return an identical filter.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnIsNullFilter

public ColumnIsNullFilter(AbstractColumn column)
Constructs a new instance of this class with the given column ID.

Parameters:
column - The column that should be null.
Method Detail

getColumn

public AbstractColumn getColumn()
Returns the column that should be null.

Returns:
The column that should be null.

getAllColumnIds

public java.util.Set<java.lang.String> getAllColumnIds()
Returns all the columnIds this filter uses.

Specified by:
getAllColumnIds in class QueryFilter
Returns:
All the columnIds this filter uses.

getScalarFunctionColumns

public java.util.List<ScalarFunctionColumn> getScalarFunctionColumns()
Returns a list of all scalarFunctionColumns this filter uses, in this case the scalarFunctionColumns in column (e.g, in the filter 'year(a) is null' it will return year(a).

Specified by:
getScalarFunctionColumns in class QueryFilter
Returns:
A list of all scalarFunctionColumns this filter uses.

getAggregationColumns

protected java.util.List<AggregationColumn> getAggregationColumns()
Returns a list of all aggregation columns this filter uses. This is kept for future use, as currently filters are not allowed to have aggregation columns. This is still used currently for validation purposes.

Specified by:
getAggregationColumns in class QueryFilter
Returns:
A list of all aggregation columns this filter uses.

isMatch

public boolean isMatch(DataTable table,
                       TableRow row)
Checks if this row should be part of the result set.

Specified by:
isMatch in class QueryFilter
Parameters:
table - The table containing this row.
row - The row to check.
Returns:
true if this row should be part of the result set, false otherwise.

toQueryString

public java.lang.String toQueryString()
Returns a string that, when parsed by the query parser, should return an identical filter. The string returned does not contain the WHERE keyword.

Specified by:
toQueryString in class QueryFilter
Returns:
A string form of this filter.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2009 Google. All Rights Reserved.