org.figure8.join.core.persistence
Interface XmlDatabinder

All Known Implementing Classes:
HibernateXmlDatabinder

public interface XmlDatabinder

This is an interface defining export/import methods for entity objects to/from the Xml format. Entities should loaded/saved from another mean before using these methods.

Version:
$Revision: 1.1 $
Author:
Laurent Broudoux

Method Summary
 java.util.Collection loadFromXml(java.io.InputStream is)
          Load a collection of EntityObjects from a Xml stream
 void writeToXml(java.io.Writer writer, ObjectDao dao)
          Write a collection of EntityObjects using their Xml form
 

Method Detail

loadFromXml

java.util.Collection loadFromXml(java.io.InputStream is)
                                 throws InfrastructureException,
                                        java.io.IOException
Load a collection of EntityObjects from a Xml stream

Parameters:
is - An input stream containing Xml exported form of entity objects
Returns:
A collection of EntityObjects
Throws:
InfrastructureException - if entity objects cannot be recreated from stream
java.io.IOException - if stream cannot be correctly read

writeToXml

void writeToXml(java.io.Writer writer,
                ObjectDao dao)
                throws InfrastructureException,
                       java.io.IOException
Write a collection of EntityObjects using their Xml form

Parameters:
writer - The writer to use for outputing entity objects
dao - The data access objects from whom are retrievied entities (using the findAll() method)
Throws:
InfrastructureException - if entity objects cannot be exported corectly
java.io.IOException - if writer cannot be correctly written


Copyright © 2005-2008 Join. All Rights Reserved.