All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.roguewave.vsj.DefinePersistable

public interface DefinePersistable
The DefinePersistable interface is used to map Java classes to C++ classes that gain their persistance capabilities through the use of the RWDEFINE_PERSISTABLE macro from Tools.h++. This interface must be implemented by classes that are supplied when constructing a PersistableStreamer.

See Also:
PersistableStreamer

Method Index

 o create(VirtualInputStream)
This method will be called by PersistableStreamer to create an instance of the object being restored.
 o restoreGuts(Object, VirtualInputStream)
This method will be called by PersistableStreamer to restore the guts, or internal state, of the object being restored.
 o saveGuts(Object, VirtualOutputStream)
This method will be called by PersistableStreamer to save the guts of the given object to the stream.

Methods

 o create
 public abstract Object create(VirtualInputStream vstr) throws IOException
This method will be called by PersistableStreamer to create an instance of the object being restored. Note that the guts (internal state) of the object will be restored in the restoreGuts() method and should not be restored here. You may, if you must, carefully read built-in types from the supplied stream if they are necessary for the creation of the object. You may not, however, do anything which would result in a recursive call to vstr.restoreObject(). This would cause the read table to be out of sync and the results could be catastrophic.

 o restoreGuts
 public abstract void restoreGuts(Object obj,
                                  VirtualInputStream vstr) throws IOException
This method will be called by PersistableStreamer to restore the guts, or internal state, of the object being restored. Here you may make recursive calls to vstr.getObject().

 o saveGuts
 public abstract void saveGuts(Object obj,
                               VirtualOutputStream vstr) throws IOException
This method will be called by PersistableStreamer to save the guts of the given object to the stream. Here you may make recursive calls to vstr.saveObject().


All Packages  Class Hierarchy  This Package  Previous  Next  Index