Package org.apache.commons.dbutils
Interface PropertyHandler
- All Known Implementing Classes:
DatePropertyHandler
,StringEnumPropertyHandler
public interface PropertyHandler
Defines how to handle properties when constructing a bean from a
ResultSet
. Instances coerce values into a target types.-
Method Summary
-
Method Details
-
apply
Stores the givenvalue
into an instance of typeparameter
. This method is only called ifmatch(Class, Object)
return true.- Parameters:
parameter
- The type of the target parameter.value
- The value to set.- Returns:
- The converted value or the original value if something doesn't work out.
-
match
Tests whether to handle settingvalue
into an instance ofparameter
.- Parameters:
parameter
- The type of the target parameter.value
- The value to be set.- Returns:
- true is this property handler can/wants to handle this value; false otherwise.
-