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

Object
  extended by FilterTypeHint
All Implemented Interfaces:
Serializable

public class FilterTypeHint
extends Object
implements Serializable

The FilterTypeHint is used by a Filter object in order to provide metadata about the type of the data in a data set represented by a filter expression. When used on a Filter, infrastructure used to build or perform querying using Filter instances can use type hints in order to build or perform filtering correctly. For example, when using Filter instances with SQL, a type hint can be used to know when to quote a value inside of a WHERE clause.

See Also:
Serialized Form

Field Summary
static FilterTypeHint DATE
          Filter type hint representing a date type.
static FilterTypeHint NUMERIC
          Filter type hint representing a numeric type.
static FilterTypeHint STRING
          Filter type hint representing a string type.
 
Method Summary
static FilterTypeHint getDefault()
          Get the default filter type hint.
 String getHint()
          Get the type hint string.
static FilterTypeHint getTypeHint(String hint)
          Given a String, lookup a FilterTypeHint for the String.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATE

public static final FilterTypeHint DATE
Filter type hint representing a date type.


STRING

public static final FilterTypeHint STRING
Filter type hint representing a string type.


NUMERIC

public static final FilterTypeHint NUMERIC
Filter type hint representing a numeric type.

Method Detail

getHint

public String getHint()
Get the type hint string.

Returns:
the type hint string

getDefault

public static FilterTypeHint getDefault()
Get the default filter type hint. This is STRING.

Returns:
the default type hint

getTypeHint

public static FilterTypeHint getTypeHint(String hint)
Given a String, lookup a FilterTypeHint for the String. Valid

Parameters:
hint - the String to use when looking up a filter type hint
Returns:
the type hint
Throws:
IllegalArgumentException - if the given hint doesn't match a know type hint