org.pojava.persistence.factories
Interface SerialFactory<T>

All Known Implementing Classes:
DateFactory, DateTimeFactory, DefaultFactory

public interface SerialFactory<T>

A SerialFactory defines the interface for serialization and deserialization for a set of types.

Author:
John Pile

Method Summary
 T construct(Class<T> type, Map<String,?> params)
          Construct an object from a property map.
 T construct(Class<T> type, Object[] params)
          Construct an object from an array.
 String serialize(T obj)
          Serialize an object to XML.
 

Method Detail

construct

T construct(Class<T> type,
            Object[] params)
Construct an object from an array.

Parameters:
type -
params -
Returns:
typed object constructed from parameters

construct

T construct(Class<T> type,
            Map<String,?> params)
Construct an object from a property map.

Parameters:
type -
params -
Returns:
typed object constructed from mapped parameters

serialize

String serialize(T obj)
Serialize an object to XML.

Parameters:
obj -
Returns:
xml string from object


Copyright © 2011. All Rights Reserved.