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 aResultSet. Instances coerce values into a target types.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Objectapply(Class<?> parameter, Object value)Stores the givenvalueinto an instance of typeparameter.booleanmatch(Class<?> parameter, Object value)Tests whether to handle settingvalueinto an instance ofparameter.
-
-
-
Method Detail
-
apply
Object apply(Class<?> parameter, Object value)
Stores the givenvalueinto 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.
-
-