org.apache.wsrp4j.persistence.xml.driver
Class PersistentHandlerImpl

java.lang.Object
  extended byorg.apache.wsrp4j.persistence.xml.driver.PersistentHandlerImpl
All Implemented Interfaces:
PersistentHandler

public class PersistentHandlerImpl
extends java.lang.Object
implements PersistentHandler

This class serves the store, restore and delete funtionality for PersistentDataObject XML files.

Version:
$Id: PersistentHandlerImpl.java,v 1.4 2005/08/10 14:59:56 cziegeler Exp $
Author:
Ralf Altrichter

Field Summary
private static java.util.HashMap _filenameMap
           
private static PersistentHandler _persistentHandler
           
private  Logger logger
           
 
Constructor Summary
private PersistentHandlerImpl()
          Private Constructor
 
Method Summary
static PersistentHandler create()
          Create a PersistentHandler
 void delete(PersistentDataObject persistentDataObject)
          Delete the related XML persistent file of the input persistentDataObject information.
 PersistentDataObject restore(PersistentDataObject persistentDataObject)
          Restores a single XML file into the persistentDataObject.
 PersistentDataObject restoreMultiple(PersistentDataObject persistentDataObject)
          Restore all known XML files from the persistent store into the PersistentDataObject.
 void store(PersistentDataObject persistentDataObject)
          Store a single XML file, contained in the persistentDataObject to the persistent file store via the marshalFile method of the input object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_persistentHandler

private static PersistentHandler _persistentHandler

_filenameMap

private static java.util.HashMap _filenameMap

logger

private Logger logger
Constructor Detail

PersistentHandlerImpl

private PersistentHandlerImpl()
Private Constructor

Method Detail

create

public static PersistentHandler create()
Create a PersistentHandler


store

public void store(PersistentDataObject persistentDataObject)
           throws WSRPException
Store a single XML file, contained in the persistentDataObject to the persistent file store via the marshalFile method of the input object. The filename of the object is collected with it's hashcode internally.

Specified by:
store in interface PersistentHandler
Parameters:
persistentDataObject -
Throws:
WSRPException

restore

public PersistentDataObject restore(PersistentDataObject persistentDataObject)
                             throws WSRPException
Restores a single XML file into the persistentDataObject. The filename used is the filename stored in the PersistentFileInformation, contained in the PersistentDataObject.

Specified by:
restore in interface PersistentHandler
Parameters:
persistentDataObject -
Returns:
PersistentDataObjct
Throws:
WSRPException

restoreMultiple

public PersistentDataObject restoreMultiple(PersistentDataObject persistentDataObject)
                                     throws WSRPException
Restore all known XML files from the persistent store into the PersistentDataObject. The class type, which is part of the filename is stored in the PersistentInformation object of the PersistentDataObject.

Specified by:
restoreMultiple in interface PersistentHandler
Parameters:
persistentDataObject -
Returns:
PersistentDataObject
Throws:
WSRPException

delete

public void delete(PersistentDataObject persistentDataObject)
Delete the related XML persistent file of the input persistentDataObject information.

Specified by:
delete in interface PersistentHandler
Parameters:
persistentDataObject -


--