All Packages Class Hierarchy This Package Previous Next Index
Class com.roguewave.vsj.ReadTable
java.lang.Object
|
+----com.roguewave.vsj.ReadTable
- public class ReadTable
- extends Object
- implements RestoreContext
Class ReadTable is an implementation of the RestoreContext
interface written to correspond to the read tables used in
Tools.h++.
(In particular, this implementation primes itself with the null
object at the start of each persistence context.)
-
table_
- Implementation of the ReadTable
-
ReadTable()
-
-
addElement(Object)
- Add an object to the ReadTable
-
elementAt(int)
- Return an object from the ReadTable.
-
endContext()
- End the current persistence context.
-
inContext()
- Return true if the ReadTable is currently within a persistence
context.
-
newContext()
- Begin a new persistence context.
-
newContext(int)
- Begin a new persistence context with initial capacity
for the given number of objects.
table_
protected Vector table_
- Implementation of the ReadTable
ReadTable
public ReadTable()
newContext
public void newContext()
- Begin a new persistence context. A persistence context
defines the scope of back references used for isomorphic
persistence.
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.
inContext
public boolean inContext()
- Return true if the ReadTable is currently within a persistence
context. That is, returns true if newContext() has been
called, but endContext() has not.
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 ReadTable 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 ReadTable itself is reclaimed.
addElement
public void addElement(Object obj)
- Add an object to the ReadTable
elementAt
public Object elementAt(int idx)
- Return an object from the ReadTable. The index idx
is a back reference to a previously read object.
All Packages Class Hierarchy This Package Previous Next Index