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

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

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

The DateTimeFactory is a factory for handling objects compatible with the DateTime class. It is compatible with a wide variety of Date formats.

Author:
John Pile

Constructor Summary
DateTimeFactory()
           
 
Method Summary
 Object construct(Class type, Map params)
          Costruct an object from mapped parameters.
 Object construct(Class type, Object[] params)
          Construct a DateTime object from a parameter array.
 String serialize(Object obj)
          Serialize a DateTime class to xml.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateTimeFactory

public DateTimeFactory()
Method Detail

construct

public Object construct(Class type,
                        Object[] params)
Construct a DateTime object from a parameter array.

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

construct

public Object construct(Class type,
                        Map params)
Costruct an object from mapped parameters.

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

serialize

public String serialize(Object obj)
Serialize a DateTime class to xml.

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


Copyright © 2011. All Rights Reserved.