Class DatePropertyHandler
- java.lang.Object
-
- org.apache.commons.dbutils.handlers.properties.DatePropertyHandler
-
- All Implemented Interfaces:
PropertyHandler
public class DatePropertyHandler extends Object implements PropertyHandler
PropertyHandler
for date fields. Will convertDate
,Time
, andTimestamp
from SQL types to java types.
-
-
Constructor Summary
Constructors Constructor Description DatePropertyHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
apply(Class<?> parameter, Object value)
Stores the givenvalue
into an instance of typeparameter
.boolean
match(Class<?> parameter, Object value)
Tests whether to handle settingvalue
into an instance ofparameter
.
-
-
-
Constructor Detail
-
DatePropertyHandler
public DatePropertyHandler()
-
-
Method Detail
-
apply
public Object apply(Class<?> parameter, Object value)
Description copied from interface:PropertyHandler
Stores the givenvalue
into an instance of typeparameter
. This method is only called ifPropertyHandler.match(Class, Object)
return true.- Specified by:
apply
in interfacePropertyHandler
- 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
public boolean match(Class<?> parameter, Object value)
Description copied from interface:PropertyHandler
Tests whether to handle settingvalue
into an instance ofparameter
.- Specified by:
match
in interfacePropertyHandler
- 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.
-
-