com.tivoli.twg.engine
Class TWGPersistentObjectDictionary

java.lang.Object
  extended bycom.tivoli.twg.engine.TWGPersistentObjectDictionary

public class TWGPersistentObjectDictionary
extends java.lang.Object

Dictionary used to save/restore persistent objects.


Field Summary
static int SIZEOF_INT
           
static int SIZEOF_LONG
           
static int SIZEOF_SHORT
           
 
Constructor Summary
TWGPersistentObjectDictionary(byte[] data, int length)
          constructor (for restoring).
TWGPersistentObjectDictionary(java.lang.Class persistentObjectClass)
          constructor (for saving).
 
Method Summary
 byte[] get(java.lang.String name)
          method for retrieving data associated with a class name.
 java.lang.String getRestoreClassName()
          method for getting the class name of the persistent object being restored.
 java.util.Enumeration hierarchy()
          method for enumerating class hierarchy of a persistent object.
 void put(java.lang.String name, byte[] data)
          method for associating data with a class name.
protected  void setRestoreClassName(java.lang.String className)
          method for setting the class name of the persistent object being restored (for use by TWGPersistentObject only!)
 byte[] toByteArray()
          method for converting persistent object data to an array of bytes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIZEOF_INT

public static final int SIZEOF_INT
See Also:
Constant Field Values

SIZEOF_LONG

public static final int SIZEOF_LONG
See Also:
Constant Field Values

SIZEOF_SHORT

public static final int SIZEOF_SHORT
See Also:
Constant Field Values
Constructor Detail

TWGPersistentObjectDictionary

public TWGPersistentObjectDictionary(java.lang.Class persistentObjectClass)
constructor (for saving).

Parameters:
persistentObjectClass - class of persistent object to save.

TWGPersistentObjectDictionary

public TWGPersistentObjectDictionary(byte[] data,
                                     int length)
                              throws TWGPersistentObjectDictionaryException
constructor (for restoring).

Parameters:
data - persistent object data.
length - length of persistent object data.
Throws:
TWGPersistentObjectDictionaryException - thrown to abort instantiation.
Method Detail

getRestoreClassName

public java.lang.String getRestoreClassName()
method for getting the class name of the persistent object being restored.

Returns:
String class name of the persistent object being restored.

setRestoreClassName

protected void setRestoreClassName(java.lang.String className)
method for setting the class name of the persistent object being restored (for use by TWGPersistentObject only!)

Parameters:
className - class name of the persistent object being restored.

toByteArray

public byte[] toByteArray()
                   throws TWGPersistentObjectDictionaryException
method for converting persistent object data to an array of bytes.

Returns:
byte[] persistent object data.
Throws:
TWGPersistentObjectDictionaryException - thrown to encapsulate another exception.

get

public byte[] get(java.lang.String name)
method for retrieving data associated with a class name.

Returns:
byte[] data associated with class name.

put

public void put(java.lang.String name,
                byte[] data)
method for associating data with a class name.


hierarchy

public java.util.Enumeration hierarchy()
method for enumerating class hierarchy of a persistent object.