The Filter class is a JavaBean that abstractly represents the data needed to calculate a filter for a data set. A filter consists of some {@link String} expression, a {@link FilterOperation}and a filter value. The mechanism for applying a filter to a data set is not provided here.
The filter expression is used to abstractly name some part of a data set to filter. The filter operation is used to describe the operation to use when performing filtering. The set of operations for available for use should be related to a subclass of the Filter type; there are no implicitly defined operations. The filter value is used to describe how to filter a given filter expression. For example, in an application performing filtering using SQL, a filter expression pet
with a filter operation mapping to "equals" and a filter value of "dog" could be transformed into a SQL WHERE fragment as:
WHERE pet = 'dog'The Filter class simply provides an abstraction for a filter's metadata; the mechanism for performing this transformation from Filter instance to SQL fragment is not provided here.
In addition to the fundamental data fora Filter, two additional properties can be defined. The {@link org.apache.beehive.netui.databinding.datagrid.api.filter.FilterOperationHint} property canbe used to reference a class of operation related to the hint. The {@link org.apache.beehive.netui.databinding.datagrid.api.filter.FilterTypeHint} propertydefines a hint for the type of data associated with the Filter's filter expression. This data can be used to handle quoting and type conversion for a given filter value. In the example above, a type hint of a {@link org.apache.beehive.netui.databinding.datagrid.api.filter.FilterTypeHint#STRING} can be usedwhen constructing the SQL fragment in order to perform the correct quoting of the filter value.
|
|
|
|