org.objectweb.jorm.lib
Class PSerializableImpl

java.lang.Object
  extended byorg.objectweb.jorm.lib.PSerializableImpl
All Implemented Interfaces:
PAccessor, PSerializable, java.io.Serializable

public abstract class PSerializableImpl
extends java.lang.Object
implements PSerializable, PAccessor

This class is incomplete implementation of PSerializable interface. This class is subclasses by generated XXXserializable class.

Author:
S.Chassande-Barrioz
See Also:
Serialized Form

Field Summary
protected  java.lang.String pName
           
 
Constructor Summary
PSerializableImpl()
           
 
Method Summary
protected  PName decodeString(java.lang.String val, java.lang.String fieldName, java.lang.Object hints)
          Decodes a String value in a PName.
protected  java.lang.String encodeString(PName pn)
          Encodes a PName into a String value
abstract  java.lang.String getClassName()
          Get the name of the jorm class.
 java.lang.Object getMemoryInstance()
          It returns the memory instance within which the persistent variables are defined.
 PName getPName(PBinder pnc)
           
abstract  void read(PClassMapping pcm, PAccessor pa)
          Read all the fields of the serializable object and put it in the PAccessor pa.
 java.lang.String setPName(PName pName)
          Set the encoded PName of the object sent to the replicas
abstract  void write(PClassMapping pcm, PAccessor pa)
          Write the PAccessor in the serializable object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pName

protected java.lang.String pName
Constructor Detail

PSerializableImpl

public PSerializableImpl()
Method Detail

getClassName

public abstract java.lang.String getClassName()
Description copied from interface: PSerializable
Get the name of the jorm class.

Specified by:
getClassName in interface PSerializable
Returns:

read

public abstract void read(PClassMapping pcm,
                          PAccessor pa)
                   throws PException
Description copied from interface: PSerializable
Read all the fields of the serializable object and put it in the PAccessor pa.

Specified by:
read in interface PSerializable
Parameters:
pa -
Throws:
PException

write

public abstract void write(PClassMapping pcm,
                           PAccessor pa)
                    throws PException
Description copied from interface: PSerializable
Write the PAccessor in the serializable object.

Specified by:
write in interface PSerializable
Throws:
PException

getMemoryInstance

public java.lang.Object getMemoryInstance()
Description copied from interface: PAccessor
It returns the memory instance within which the persistent variables are defined.

Specified by:
getMemoryInstance in interface PAccessor
Returns:
The actual object containing memory persistent variables.

getPName

public PName getPName(PBinder pnc)
               throws PExceptionNaming
Specified by:
getPName in interface PSerializable
Returns:
the decoded PName of the object sent to the replicas
Throws:
PExceptionNaming

setPName

public java.lang.String setPName(PName pName)
Description copied from interface: PSerializable
Set the encoded PName of the object sent to the replicas

Specified by:
setPName in interface PSerializable
Parameters:
pName -

encodeString

protected java.lang.String encodeString(PName pn)
Encodes a PName into a String value

Parameters:
pn - is the PName to encode
Returns:
a String representation of the PName

decodeString

protected PName decodeString(java.lang.String val,
                             java.lang.String fieldName,
                             java.lang.Object hints)
Decodes a String value in a PName. This value is linked to a persistent field.

Parameters:
val - is a String representation of a PName
fieldName - is the name of the field associated to the reference
hints - has to be PClassMapping or a PNameCoder
Returns:
a PName instance or null.