public class DateTypeHandler extends DateTypeHandlerSupport
Date,
DateFormat,
SimpleDateFormatlenient, pattern, timeZonelocaleFORMAT_SETTINGNIL| Constructor and Description |
|---|
DateTypeHandler()
Constructs a new DateTypeHandler.
|
DateTypeHandler(String pattern)
Constructs a new DateTypeHandler.
|
| Modifier and Type | Method and Description |
|---|---|
String |
format(Object value)
Formats a Java object into field text.
|
Class<?> |
getType()
Returns the class type supported by this handler.
|
Date |
parse(String text)
Parses field text into a Java object.
|
createDateFormat, createDefaultDateFormat, formatDate, getPattern, getTimeZone, getTimeZoneId, isLenient, newInstance, parseDate, setLenient, setPattern, setTimeZoneIdgetLocale, setLocalepublic DateTypeHandler()
public DateTypeHandler(String pattern)
pattern - the SimpleDateFormat patternpublic Date parse(String text) throws TypeConversionException
TypeHandlertext - the field text to parse, which may be null if the field was not passed in the recordTypeConversionException - if the text cannot be parsedpublic String format(Object value)
TypeHandlervalue - the Java object to format, which may be nullTypeHandler.NIL for XML formatted streamspublic Class<?> getType()
TypeHandler