org.apache.beehive.netui.databinding.datagrid.api.filter
Class FilterModel

Object
  extended by FilterModel
All Implemented Interfaces:
Serializable

public class FilterModel
extends Object
implements Serializable

The FilterModel class supports grouping a data grid's Filter objects into a single JavaBean that implements functionality for interacting with them together.

The list of Filter objects in a FilterModel are ordered. This class provides methods that can be used to find all the filters for a data grid and to determine if a given filter expression is sorted.

See Also:
Serialized Form

Constructor Summary
FilterModel(List filters)
          Construct an a filter model given a List of Filter instances.
 
Method Summary
 List getFilters()
          Get the List of filters for a data grid.
 List getFilters(String filterExpression)
          Get a List of Filter objects.
 boolean isFiltered(String filterExpression)
          Utility method that checks to see if the given filterExpression matches any of the current Filter instances.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterModel

public FilterModel(List filters)
Construct an a filter model given a List of Filter instances.

Parameters:
filters - the filters for a data grid.
Method Detail

getFilters

public List getFilters()
Get the List of filters for a data grid.

Returns:
a data grid's fitlers

getFilters

public List getFilters(String filterExpression)
Get a List of Filter objects. The list returned will contain all of the Filter objects whose Filter.getFilterExpression() matches the given filterExpression.

Parameters:
filterExpression - the expression whose matching filters to find
Returns:
null if no matching Filter objects are found; a List of Filter objects otherwise.

isFiltered

public boolean isFiltered(String filterExpression)
Utility method that checks to see if the given filterExpression matches any of the current Filter instances.

Parameters:
filterExpression - the filter expression to check
Returns:
true if at least one filter matches the filterExpression; false otherwise.