wt.fc
Class ObjectTable
java.lang.Object
wt.fc.ObjectTable
- public class ObjectTable
- extends Object
A table of Persistable
objects with support for maintaining a set of
shared ObjectReference
objects which may refer to objects in the table.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RESOURCE
private static final String RESOURCE
- See Also:
- Constant Field Values
nullOid
private static ObjectIdentifier nullOid
objTable
private Hashtable objTable
refTable
private Hashtable refTable
ObjectTable
public ObjectTable()
get
public Persistable get(ObjectIdentifier oid)
- Get a persistent object from the table given its
ObjectIdentifier
.
- Parameters:
oid
- ObjectIdentifier
of the Persistent Object
- Returns:
- the cached object or null if not found
put
public void put(Persistable obj)
- Put a persistent object in the table. The object must be persistent,
that is, it must have an assigned
ObjectIdentifier
. If an
ObjectReference
exists in the table which refers to this
Persistable
, its derived object
field is set to
this object.
- Parameters:
obj
- the persistent object
getRef
public ObjectReference getRef(ObjectReference obj_ref)
- Get or store an
ObjectReference
. If an ObjectReference
already exists for the referenced object, it will be returned. Otherwise, the
given ObjectReference
will be added to the table and returned.
- Parameters:
obj_ref
- ObjectReference
to a Persistent Object
- Returns:
- the
ObjectReference
getOidArray
public OidArray getOidArray()
- Get an OidArray for the ObjectReferences in this table.
- Returns:
- OidArray for the ObjectReferences in this table