Class DatePropertyHandler
- java.lang.Object
-
- org.apache.commons.dbutils.handlers.properties.DatePropertyHandler
-
- All Implemented Interfaces:
PropertyHandler
public class DatePropertyHandler extends java.lang.Object implements PropertyHandler
PropertyHandlerfor date fields. Will convertDate,Time, andTimestampfrom SQL types to java types.
-
-
Constructor Summary
Constructors Constructor Description DatePropertyHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectapply(java.lang.Class<?> parameter, java.lang.Object value)Do the work required to storevalueinto something of typeparameter.booleanmatch(java.lang.Class<?> parameter, java.lang.Object value)Test whether thisPropertyHandlerwants to handle settingvalueinto something of typeparameter.
-
-
-
Method Detail
-
match
public boolean match(java.lang.Class<?> parameter, java.lang.Object value)Description copied from interface:PropertyHandlerTest whether thisPropertyHandlerwants to handle settingvalueinto something of typeparameter.- Specified by:
matchin 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.
-
apply
public java.lang.Object apply(java.lang.Class<?> parameter, java.lang.Object value)Description copied from interface:PropertyHandlerDo the work required to storevalueinto something of typeparameter. This method is called only if this handler respondedtrueafter a call toPropertyHandler.match(Class, Object).- Specified by:
applyin interfacePropertyHandler- Parameters:
parameter- The type of the target parameter.value- The value to be set.- Returns:
- The converted value or the original value if something doesn't work out.
-
-