Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Constructor Summary
`TimestampConverter()`

Method Summary
`protected Object` | `convertToDate(Class type, Object value)` Convert a String to a date
`protected Object` | `convertToString(Class type, Object value)` Convert from a java.util.Date to a String

Methods inherited from class com.gisgraphy.util.DateConverter
`convert, convertToDate`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### TS_FORMAT

    public static final String TS_FORMAT

  i18n-ized timestamp format - based on values in ApplicationResources.properties

Constructor Detail

### TimestampConverter

    public TimestampConverter()

Method Detail

### convertToDate

    protected Object convertToDate(Class type,
                                   Object value)

  Convert a String to a date

  Parameters:
    `type` - java.util.Date
    `value` - 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.String
    `value` - the date instance
  Returns:
    string version of date using default date pattern

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012. All Rights Reserved.