org.pojava.persistence.factories
Class DefaultFactory

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

public class DefaultFactory
extends Object
implements SerialFactory<Object>

The DefaultFactory is a multi-purpose factory for handling objects with single-value constructors, such as primitives.

Author:
John Pile

Constructor Summary
DefaultFactory()
           
 
Method Summary
 Object construct(Class type, Map params)
          Construct an object based on mapped parameters.
 Object construct(Class type, Object[] values)
          Construct an object.
 String serialize(Object obj)
          Serialize an Object to XML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFactory

public DefaultFactory()
Method Detail

construct

public Object construct(Class type,
                        Object[] values)
Construct an object.

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

construct

public Object construct(Class type,
                        Map params)
Construct an object based on mapped parameters.

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

serialize

public String serialize(Object obj)
Serialize an Object to XML.

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


Copyright © 2011. All Rights Reserved.