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

java.lang.Object
  extended byorg.apache.wsrp4j.persistence.xml.driver.PersistentDataObjectImpl
All Implemented Interfaces:
PersistentDataObject, PersistentDataObjectXML
Direct Known Subclasses:
ConsumerConfiguredPortletList, ConsumerPortletContextList, ConsumerPortletRegistrationList, PageList, PortletDescriptionList, PortletList, ProducerList, RegistrationList, ServiceDescriptionList, UserList

public abstract class PersistentDataObjectImpl
extends java.lang.Object
implements PersistentDataObjectXML

This class is the abstract implementation of the class PersistentDataObjectXML.

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

Field Summary
protected  java.lang.Object _lastElement
           
protected  java.util.ArrayList _objects
           
private  PersistentInformation _persistentInfo
           
 
Constructor Summary
PersistentDataObjectImpl()
           
 
Method Summary
 void addObject(java.lang.Object object)
          Add an object to the internal list.
 void clear()
          Clears the object array
 java.lang.Object getLastElement()
          Returns the last element (object) of the list
 java.util.Iterator getObjects()
          Returns the list of objects as an iterator.
 PersistentInformation getPersistentInformation()
          Returns the persistent information object, contained in this data object.
abstract  void marshalFile(java.io.FileWriter fileWriter, org.exolab.castor.xml.Marshaller marshaller)
          Marshal of persistent objects
 void setPersistentInformation(PersistentInformation persistentInfo)
          Set the persistent information object to this data object.
abstract  void unMarshalFile(java.io.FileReader fileReader, org.exolab.castor.xml.Unmarshaller unmarshaller)
          Unmarshal of persistent objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_persistentInfo

private PersistentInformation _persistentInfo

_objects

protected java.util.ArrayList _objects

_lastElement

protected java.lang.Object _lastElement
Constructor Detail

PersistentDataObjectImpl

public PersistentDataObjectImpl()
Method Detail

setPersistentInformation

public void setPersistentInformation(PersistentInformation persistentInfo)
Set the persistent information object to this data object.

Specified by:
setPersistentInformation in interface PersistentDataObject
Parameters:
persistentInfo -
See Also:
PersistentInformation

getPersistentInformation

public PersistentInformation getPersistentInformation()
Returns the persistent information object, contained in this data object.

Specified by:
getPersistentInformation in interface PersistentDataObject
Returns:
persistentInformation
See Also:
PersistentInformation

clear

public void clear()
Clears the object array

Specified by:
clear in interface PersistentDataObject

getObjects

public java.util.Iterator getObjects()
Returns the list of objects as an iterator.

Specified by:
getObjects in interface PersistentDataObject
Returns:
iterator of objects

addObject

public void addObject(java.lang.Object object)
Add an object to the internal list.

Specified by:
addObject in interface PersistentDataObject
Parameters:
object - to be added

getLastElement

public java.lang.Object getLastElement()
Returns the last element (object) of the list

Specified by:
getLastElement in interface PersistentDataObject
Returns:
object

unMarshalFile

public abstract void unMarshalFile(java.io.FileReader fileReader,
                                   org.exolab.castor.xml.Unmarshaller unmarshaller)
                            throws WSRPException
Unmarshal of persistent objects.

Specified by:
unMarshalFile in interface PersistentDataObjectXML
Parameters:
fileReader - of the input XML file
unmarshaller - Unmarshaller, optional
Throws:
WSRPException

marshalFile

public abstract void marshalFile(java.io.FileWriter fileWriter,
                                 org.exolab.castor.xml.Marshaller marshaller)
                          throws WSRPException
Marshal of persistent objects

Specified by:
marshalFile in interface PersistentDataObjectXML
Parameters:
fileWriter - to the output XML file
Throws:
WSRPException


--