[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nameForObject()?



On Mon, 29 Jan 2001, Tim Brown wrote:
> I store the name in all of my ozone objects but I would be interested to
> know if there is a way to get from the ozone object itslf.

No "official" way yet. But you may get the name of the object from inside the
object via "container().name()".

Falko

> 
> Andreas Monitzer wrote:
> 
> > 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.
-- 
______________________________________________________________________
Falko Braeutigam                              mailto:falko@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com