All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.roguewave.vsj.StoreTable

java.lang.Object
   |
   +----com.roguewave.vsj.StoreTable

public class StoreTable
extends Object
implements SaveContext
Class StoreTable is an implementation of the SaveContext interface meant to correspond to the store tables used in Tools.h++ for doing both isomorphic and polymorphic persistence. In particular, this implementation primes itself with the null object at the start of each persistence context.


Variable Index

 o table_
Implementation of StoreTable

Constructor Index

 o StoreTable()

Method Index

 o addElement(Object)
Add an object to the StoreTable.
 o endContext()
End the current persistence context.
 o inContext()
Return true if StoreTable is currently within a persistence context.
 o index(Object)
Return the index of an object in the StoreTable.
 o newContext()
Begin a new persistence context.
 o newContext(int)
Begin a new persistence context with initial capacity for the given number of objects.

Variables

 o table_
 protected IdentityDictionary table_
Implementation of StoreTable

Constructors

 o StoreTable
 public StoreTable()

Methods

 o newContext
 public void newContext()
Begin a new persistence context. A persistence context defines the scope of back references used for isomorphic persistence.

 o newContext
 public void newContext(int initCapacity)
Begin a new persistence context with initial capacity for the given number of objects. A persistence context defines the scope of back references used for isomorphic persistence.

 o inContext
 public boolean inContext()
Return true if StoreTable is currently within a persistence context. That is, returns true if newContext() has been called, but endContext() has not.

 o endContext
 public void endContext()
End the current persistence context. A persistence context defines the scope of back references used for isomorphic persistence.

Note that the StoreTable will maintain a reference to every object added since the call to newContext(). Thus you must call this method in order for those objects to be available for garbage collection before either newContext() is called again or the StoreTable itself is reclaimed.

 o addElement
 public void addElement(Object obj)
Add an object to the StoreTable.

 o index
 public int index(Object obj)
Return the index of an object in the StoreTable. The index can be used for back referencing an object already stored.

Returns:
The reference number of the object, or -1 if the object is not in the StoreTable

All Packages  Class Hierarchy  This Package  Previous  Next  Index