com.sencha.gxt.data.shared.loader
Class FilterConfigBean

java.lang.Object
  extended by com.sencha.gxt.data.shared.loader.FilterConfigBean
All Implemented Interfaces:
FilterConfig, Serializable

public class FilterConfigBean
extends Object
implements FilterConfig, Serializable

Default implementation of the FilterConfig interface. Provides a convenience method to set field and type in one operation.

See Also:
Serialized Form

Constructor Summary
FilterConfigBean()
           
 
Method Summary
 String getComparison()
          Returns the type of filter comparison.
 String getField()
          Returns the name of the filter field.
 String getType()
          Returns the filter type.
 String getValue()
          Gets the filter value.
 void setComparison(String comparison)
          Sets the type of filter comparison (e.g.
 void setField(String field)
          Sets the name of the filter field.
<V> void
setFieldAndType(ValueProvider<?,V> valueProvider, Class<? extends V> type)
          Convenience method to set both field name and type in one operation.
 void setType(String type)
          Sets the filter type (e.g.
 void setValue(String value)
          Sets the filter value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterConfigBean

public FilterConfigBean()
Method Detail

getComparison

public String getComparison()
Description copied from interface: FilterConfig
Returns the type of filter comparison.

Specified by:
getComparison in interface FilterConfig
Returns:
the type of filter comparison

getField

public String getField()
Description copied from interface: FilterConfig
Returns the name of the filter field.

Specified by:
getField in interface FilterConfig
Returns:
the name of the filter field.

getType

public String getType()
Description copied from interface: FilterConfig
Returns the filter type.

Specified by:
getType in interface FilterConfig
Returns:
the filter type

getValue

public String getValue()
Description copied from interface: FilterConfig
Gets the filter value. To convert from String to native representation, see FilterHandler.convertToObject(String).

Specified by:
getValue in interface FilterConfig
Returns:
the string representation of the value

setComparison

public void setComparison(String comparison)
Description copied from interface: FilterConfig
Sets the type of filter comparison (e.g. "after", "before", "on").

Specified by:
setComparison in interface FilterConfig
Parameters:
comparison - the type of filter comparison

setField

public void setField(String field)
Description copied from interface: FilterConfig
Sets the name of the filter field.

Specified by:
setField in interface FilterConfig
Parameters:
field - the name of the filter field

setFieldAndType

public <V> void setFieldAndType(ValueProvider<?,V> valueProvider,
                                Class<? extends V> type)
Convenience method to set both field name and type in one operation.

Parameters:
valueProvider - the value provider. The value provider's path supplies the field name.
type - the field type. The class name supplies the field type.

setType

public void setType(String type)
Description copied from interface: FilterConfig
Sets the filter type (e.g. "boolean", "date", "list", "numeric", "string").

Specified by:
setType in interface FilterConfig
Parameters:
type - the type name

setValue

public void setValue(String value)
Description copied from interface: FilterConfig
Sets the filter value. To convert from native to String representation, see FilterHandler.convertToString(Object).

Specified by:
setValue in interface FilterConfig
Parameters:
value - the string representation of the value


Copyright © 2012. All Rights Reserved.