org.apache.wicket.util.convert.converter
Class SqlTimestampConverter

java.lang.Object
  extended by org.apache.wicket.util.convert.converter.AbstractConverter<java.sql.Timestamp>
      extended by org.apache.wicket.util.convert.converter.SqlTimestampConverter
All Implemented Interfaces:
java.io.Serializable, IClusterable, IConverter<java.sql.Timestamp>

public class SqlTimestampConverter
extends AbstractConverter<java.sql.Timestamp>

Converts to Timestamp.

Author:
eelcohillenius
See Also:
Serialized Form

Constructor Summary
SqlTimestampConverter()
          Construct.
SqlTimestampConverter(int dateFormat)
          Construct.
SqlTimestampConverter(int dateFormat, int timeFormat)
          Construct.
 
Method Summary
 java.sql.Timestamp convertToObject(java.lang.String value, java.util.Locale locale)
          Converts the given String value
 java.lang.String convertToString(java.sql.Timestamp timestamp, java.util.Locale locale)
          Converts the given value to a string.
protected  java.lang.Class<java.sql.Timestamp> getTargetType()
           
 
Methods inherited from class org.apache.wicket.util.convert.converter.AbstractConverter
newConversionException, parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlTimestampConverter

public SqlTimestampConverter()
Construct.


SqlTimestampConverter

public SqlTimestampConverter(int dateFormat)
Construct.

Parameters:
dateFormat - See java.text.DateFormat for details. Defaults to DateFormat.SHORT

SqlTimestampConverter

public SqlTimestampConverter(int dateFormat,
                             int timeFormat)
Construct.

Parameters:
dateFormat - See java.text.DateFormat for details. Defaults to DateFormat.SHORT * @param timeFormat See java.text.DateFormat for details. Defaults to DateFormat.SHORT
timeFormat -
Method Detail

convertToObject

public java.sql.Timestamp convertToObject(java.lang.String value,
                                          java.util.Locale locale)
Description copied from interface: IConverter
Converts the given String value

Parameters:
value - The string value to convert
locale - The locale used to convert the value
Returns:
The converted value
See Also:
IConverter.convertToObject(java.lang.String, java.util.Locale)

convertToString

public java.lang.String convertToString(java.sql.Timestamp timestamp,
                                        java.util.Locale locale)
Description copied from interface: IConverter
Converts the given value to a string.

Specified by:
convertToString in interface IConverter<java.sql.Timestamp>
Overrides:
convertToString in class AbstractConverter<java.sql.Timestamp>
Parameters:
timestamp - The value to convert
locale - The locale used to convert the value
Returns:
The converted string value
See Also:
AbstractConverter.convertToString(java.lang.Object, java.util.Locale)

getTargetType

protected java.lang.Class<java.sql.Timestamp> getTargetType()
Specified by:
getTargetType in class AbstractConverter<java.sql.Timestamp>
Returns:
The target type of this type converter
See Also:
AbstractConverter.getTargetType()


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.