org.slim3.commons.beanutil
Class TimestampConverter

java.lang.Object
  extended by org.slim3.commons.beanutil.TimestampConverter
All Implemented Interfaces:
Converter

public class TimestampConverter
extends Object
implements Converter

The converter for Timestamp.

Author:
higa

Field Summary
protected  String pattern
          the pattern for SimpleDateFormat.
 
Constructor Summary
TimestampConverter(String pattern)
          Constructor.
 
Method Summary
 Object getAsObject(String value)
          Returns the value as object.
 String getAsString(Object value)
          Returns the value as string.
 boolean isTarget(Class<?> clazz)
          Determines if the class is target.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pattern

protected String pattern
the pattern for SimpleDateFormat.

Constructor Detail

TimestampConverter

public TimestampConverter(String pattern)
                   throws NullPointerException
Constructor.

Parameters:
pattern - the pattern for SimpleDateFormat
Throws:
NullPointerException - if the pattern parameter is null
Method Detail

getAsObject

public Object getAsObject(String value)
Description copied from interface: Converter
Returns the value as object.

Specified by:
getAsObject in interface Converter
Parameters:
value - the value
Returns:
the converted value

getAsString

public String getAsString(Object value)
Description copied from interface: Converter
Returns the value as string.

Specified by:
getAsString in interface Converter
Parameters:
value - the value
Returns:
the converted value

isTarget

public boolean isTarget(Class<?> clazz)
Description copied from interface: Converter
Determines if the class is target.

Specified by:
isTarget in interface Converter
Parameters:
clazz - the class
Returns:
whether the class is target


Copyright © 2008-2009 The Slim3 project. All Rights Reserved.