com.gisgraphy.util
Class TimestampConverter
java.lang.Object
com.gisgraphy.util.DateConverter
com.gisgraphy.util.TimestampConverter
- All Implemented Interfaces:
- org.apache.commons.beanutils.Converter
public class TimestampConverter
- extends DateConverter
This class is converts a java.util.Date to a String and a String to a
java.util.Date for use as a Timestamp. It is used by BeanUtils when copying
properties.
- Author:
- Dan Kibler
Field Summary |
static String |
TS_FORMAT
i18n-ized timestamp format - based on values in
ApplicationResources.properties |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TS_FORMAT
public static final String TS_FORMAT
- i18n-ized timestamp format - based on values in
ApplicationResources.properties
TimestampConverter
public TimestampConverter()
convertToDate
protected Object convertToDate(Class type,
Object value)
- Convert a String to a date
- Parameters:
type
- java.util.Datevalue
- the String value
- Returns:
- a converted date
convertToString
protected Object convertToString(Class type,
Object value)
- Convert from a java.util.Date to a String
- Overrides:
convertToString
in class DateConverter
- Parameters:
type
- java.lang.Stringvalue
- the date instance
- Returns:
- string version of date using default date pattern
Copyright © 2012. All Rights Reserved.