*/
protected boolean registerable = false;
-
+ /**
+ * reference to containing object for this Vobject.
+ */
+ protected Vobject V_parent=null;
/**
* unique id for all vamsas objects allows unambiguous referencing to any
* Vobject in the vamsas document
* the source of unique VorbaIds.
*/
protected IVorbaIdFactory __vorba = null;
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#finalize()
+ */
+ protected void finalize() throws Throwable {
+ V_parent=null;
+ __vorba=null;
+ vorbaId=null;
+ super.finalize();
+ }
/**
*
synchronized protected boolean doHash() {
long __old_hash = __last_hash;
__last_hash = 0;
+ Vobject _V_parent=V_parent;
+ V_parent=null;
VorbaId thisid = vorbaId;
IVorbaIdFactory factory = __vorba;
boolean stored = __stored_in_document;
vorbaId = thisid;
__vorba = factory;
__stored_in_document = stored;
+ V_parent=_V_parent;
return (__old_hash==0) || (__old_hash == __last_hash);
}
for (int k=0, l=vals.length; k<l; k++) {
if (vals[k].__vorba==null)
vals[k].__vorba = __vorba; // propagate IVorbaIdFactory
+ if (vals[k].V_parent==null)
+ vals[k].V_parent=this; // propagate parent reference to this element.
vals[k].__ensure_instance_ids();
}
}
for (int k=0, l=vals.length; k<l; k++) {
if (vals[k].__vorba==null)
vals[k].__vorba = __vorba; // propagate IVorbaIdFactory
+ if (vals[k].V_parent==null)
+ vals[k].V_parent=this; // propagate parent reference to this field object
vals[k].__ensure_instance_ids();
}
}
}
}
} else {
+ // castor's mechanism doesn't work for this object... so...*/
// fuck around, fuck around, jump up jump up and get down! */
Object o = fields[i].getClassDescriptor();
if (o!=null) {
if (rf!=null) {
if (rf.__vorba==null)
rf.__vorba = __vorba; // propagate IVorbaIdFactory
- rf.__ensure_instance_ids();
+ if (rf.V_parent==null)
+ rf.V_parent=this; // propagate parent reference
+ rf.__ensure_instance_ids();
}
}
catch (Exception e) {
}
}
+
+ /**
+ * @return the __parent
+ */
+ public Vobject getV_parent() {
+ return V_parent;
+ }
+
+ /**
+ * @param __parent the __parent to set
+ */
+ protected void setV_parent(Vobject V_parent) {
+ this.V_parent = V_parent;
+ }
}