org.datamanager.persistence
Interface DataAccessObject

All Known Implementing Classes:
JispIndexDataAccessObject, SerializableDataAccessObject

public interface DataAccessObject

The DataAccessObject class defines the standard interface for access to the persistence layer.

Author:
xi rao & Jason Lynn Baumgartner

Method Summary
 void persist(Object object, File file)
          keep the object as a xml file in the disk
 void persist(Object object, OutputStream outputStream)
          keep the object as a xml file in the disk
 Object restore(File fileLocation)
          return the instance object which store in the xml file the client need to cast the return to the correct type.
 Object restore(InputStream inputStream)
          return the instance object which store in the xml file the client need to cast the return to the correct type.
 

Method Detail

persist

public void persist(Object object,
                    File file)
keep the object as a xml file in the disk

Parameters:
object - any object
file - name and path to keep the object as file on disk

restore

public Object restore(File fileLocation)
return the instance object which store in the xml file the client need to cast the return to the correct type.

Parameters:
fileLocation - xml file path
Returns:
an instance which restore state from the xml file

persist

public void persist(Object object,
                    OutputStream outputStream)
keep the object as a xml file in the disk

Parameters:
object - any object
outputStream - write to output stream

restore

public Object restore(InputStream inputStream)
return the instance object which store in the xml file the client need to cast the return to the correct type.

Parameters:
inputStream - read from input stream
Returns:
an instance which restore state from the xml file


See the Helium Website