com.extjs.gxt.ui.client.data
Interface FilterConfig

All Known Implementing Classes:
BaseBooleanFilterConfig, BaseDateFilterConfig, BaseFilterConfig, BaseListFilterConfig, BaseNumericFilterConfig, BaseStringFilterConfig

public interface FilterConfig

Filter config object for GridFilters


Method Summary
 java.lang.String getComparison()
          Returns the comparison value.
 java.lang.String getField()
          Returns the model property name.
 java.lang.String getType()
           
 java.lang.Object getValue()
          Returns the filter value.
 boolean isFiltered(ModelData model, java.lang.Object test, java.lang.String compariosn, java.lang.Object value)
          Determines if the model will be filtered by the given filter.
 void setComparison(java.lang.String comparison)
          Sets the comparison value.
 void setField(java.lang.String field)
          Sets the model property name the filter is bound to.
 void setType(java.lang.String type)
          Sets the type of filter ('string', 'numeric', 'date', 'boolean', 'list').
 void setValue(java.lang.Object value)
          Sets the value.
 

Method Detail

getComparison

java.lang.String getComparison()
Returns the comparison value. This value will be set by numeric ('lt', 'gt', 'eq') and date ('after', 'before', 'on') filter types.

Returns:
the comparison value

getField

java.lang.String getField()
Returns the model property name.

Returns:
the property name

getType

java.lang.String getType()

getValue

java.lang.Object getValue()
Returns the filter value.

Returns:
the filter value

isFiltered

boolean isFiltered(ModelData model,
                   java.lang.Object test,
                   java.lang.String compariosn,
                   java.lang.Object value)
Determines if the model will be filtered by the given filter.

Parameters:
model - the model
test - the filter config value
value -
Returns:
true if filtered

setComparison

void setComparison(java.lang.String comparison)
Sets the comparison value. This value will be set by numeric ('lt', 'gt', 'eq') and date ('after', 'before', 'on') filter types.

Parameters:
comparison - the comparison

setField

void setField(java.lang.String field)
Sets the model property name the filter is bound to.

Parameters:
field - the property name

setType

void setType(java.lang.String type)
Sets the type of filter ('string', 'numeric', 'date', 'boolean', 'list').

Parameters:
type - the filter type

setValue

void setValue(java.lang.Object value)
Sets the value. The type of the value will be determined by the type of filter.

Parameters:
value - the value