org.pojava.persistence.factories
Class DateFactory<T>

java.lang.Object
  extended by org.pojava.persistence.factories.DateFactory<T>
All Implemented Interfaces:
SerialFactory<T>

public class DateFactory<T>
extends Object
implements SerialFactory<T>

DateFactory provides serialization for the java.util.Date and its derived objects up to millisecond precision.

Author:
John Pile

Constructor Summary
DateFactory()
           
 
Method Summary
 Object construct(Class type, Map params)
          Construct a java.util.Date object.
 Object construct(Class type, Object[] params)
          Construct a java.util.Date object.
 String serialize(Object obj)
          Serialize a java.util.Date object to UTC millis.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateFactory

public DateFactory()
Method Detail

construct

public Object construct(Class type,
                        Object[] params)
Construct a java.util.Date object.

Specified by:
construct in interface SerialFactory<T>
Returns:
typed object constructed from parameters

construct

public Object construct(Class type,
                        Map params)
Construct a java.util.Date object.

Specified by:
construct in interface SerialFactory<T>
Returns:
typed object constructed from mapped parameters

serialize

public String serialize(Object obj)
Serialize a java.util.Date object to UTC millis.

Specified by:
serialize in interface SerialFactory<T>
Returns:
xml string from object


Copyright © 2011. All Rights Reserved.