arlut.csd.ganymede
Class DBNameSpaceHandle

java.lang.Object
  |
  +--arlut.csd.ganymede.DBNameSpaceHandle
All Implemented Interfaces:
java.lang.Cloneable

class DBNameSpaceHandle
extends java.lang.Object
implements java.lang.Cloneable

This class is intended to be the targets of elements of a name space's unique value hash. The fields in this class are used to keep track of who currently 'owns' a given value, and whether or not there is actually any field in the namespace that really contains that value.

This class will be manipulated by the DBNameSpace class and by the DBEditObject class.


Field Summary
private  short fieldId
          If this handle is associated with a value that has been checked into the database, fieldId will be the field number for the field that holds that value in the database, within the object referenced by fieldInvid.
private  arlut.csd.ganymede.Invid fieldInvid
          so the namespace hash can be used as an index fieldInvid always points to the object that contained the field that contained this value at the time this field was last committed in a transaction.
(package private)  boolean inuse
          is the value currently in use?
(package private)  boolean original
          remember if the value was in use at the start of the transaction
(package private)  arlut.csd.ganymede.DBEditSet owner
          if this value is currently being shuffled by a transaction, this is the transaction
(package private)  arlut.csd.ganymede.DBField shadowField
          if this handle is currently being edited by an editset, shadowField points to the field in the transaction that contains this value.
 
Constructor Summary
DBNameSpaceHandle(arlut.csd.ganymede.DBEditSet owner, boolean originalValue)
           
DBNameSpaceHandle(arlut.csd.ganymede.DBEditSet owner, boolean originalValue, arlut.csd.ganymede.DBField field)
           
 
Method Summary
 void cleanup()
           
 java.lang.Object clone()
           
 arlut.csd.ganymede.DBField getField(arlut.csd.ganymede.GanymedeSession session)
           
 boolean matches(arlut.csd.ganymede.DBEditSet set)
           
 boolean matches(arlut.csd.ganymede.Invid fieldInvid, short fieldId)
          This method is used to verify that this handle points to the same field as the one specified by the parameter list.
 boolean matches(short objectType, short fieldId)
          This method is used to verify that this handle points to the same kind of field as the one specified by the parameter list.
 void setField(arlut.csd.ganymede.DBField field)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

owner

arlut.csd.ganymede.DBEditSet owner
if this value is currently being shuffled by a transaction, this is the transaction


original

boolean original
remember if the value was in use at the start of the transaction


inuse

boolean inuse
is the value currently in use?


fieldInvid

private arlut.csd.ganymede.Invid fieldInvid

so the namespace hash can be used as an index fieldInvid always points to the object that contained the field that contained this value at the time this field was last committed in a transaction.

fieldInvid will be null if the value pointing to this handle has not been committed into the database outside of an active transaction.


fieldId

private short fieldId

If this handle is associated with a value that has been checked into the database, fieldId will be the field number for the field that holds that value in the database, within the object referenced by fieldInvid.


shadowField

arlut.csd.ganymede.DBField shadowField
if this handle is currently being edited by an editset, shadowField points to the field in the transaction that contains this value. If the transaction is committed, the DBField pointer in shadowField will be transferred to field. If this value is not being manipulated by a transaction, shadowField will be equal to null.

Constructor Detail

DBNameSpaceHandle

public DBNameSpaceHandle(arlut.csd.ganymede.DBEditSet owner,
                         boolean originalValue)

DBNameSpaceHandle

public DBNameSpaceHandle(arlut.csd.ganymede.DBEditSet owner,
                         boolean originalValue,
                         arlut.csd.ganymede.DBField field)
Method Detail

matches

public boolean matches(arlut.csd.ganymede.DBEditSet set)

getField

public arlut.csd.ganymede.DBField getField(arlut.csd.ganymede.GanymedeSession session)

setField

public void setField(arlut.csd.ganymede.DBField field)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

matches

public boolean matches(arlut.csd.ganymede.Invid fieldInvid,
                       short fieldId)

This method is used to verify that this handle points to the same field as the one specified by the parameter list.


matches

public boolean matches(short objectType,
                       short fieldId)

This method is used to verify that this handle points to the same kind of field as the one specified by the parameter list.


cleanup

public void cleanup()