[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
nameForObject()?
- To: ozone-dev@ozone-db.org
- Subject: nameForObject()?
- From: Andreas Monitzer <a@blackbox.net>
- Date: Mon, 29 Jan 2001 20:13:59 +0100
- Delivered-To: softw7-ozone-db:org-ozone-dev@ozone-db.org
hi
I need the opposite of org.ozoneDB.ExternalDatabase.objectForName(), is there something available? I could just store the string inside the database object, but that wouldn't be very efficient.
Background story:
I got one database object which points to another database object.
One object stores the proxy of the other by using the following:
class FirstObjectImpl extends OzoneRemote implements FirstObject {
private transient SecondObject obj=null;
private String objId;
public FirstObjectImpl(SecondObject in_obj) {
obj=in_obj;
objId=in_obj.getId(); // how?
}
public getSecondObject() {
if(obj==null)
obj=db.objectForName(objId); // db is static
return obj;
}
}
Or maybe somebody has a better idea?
andy
--
Description forthcoming.