[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Getting Object while we forgot
Quoting Don Berendsen <donberendsen@hotmail.com>:
Thanks again Don,
Anyone got a clue about improving performance of ozone
cause i've just testing ozone using two class ClassA
as a root ClassB is holded to ClassA using List
Collection, when i'm inserting 1000 objects of ClassB
it goes so slow (using pentium
166Mhz,win98,jdk1.2.2,ram 64MB)
T I A
> >From: rekaakmar@catcha.com
> >Reply-To: ozone-users@ozone-db.org
> >To: ozone-users@ozone-db.org
> >Subject: Re: Getting Object while we forgot
> >Date: 6 Oct 2000 11:51:04 +0800
> >
> >Quoting Don Berendsen <donberendsen@hotmail.com>:
> >OK Thanks I got it,
> >BTW in my system,there's 50 IDs, 50 name(s) in my log
> >file. As Far As I Know those values is return by
startup
> >() method in WizardStore, then i only have 2 class
> >(ClassA,ClassB)for example:
> >ClassA root objects are : code1,code2,code3,code4...
> >ClassB root objects are : name1,name2,name3,name4...
> >
> >when i do this:
> >ClassA objA=(ClassA)db.objectForName("name1");
> >i got java.lang.ClassCastException: ClassBImpl_Proxy
>
> That's due to name1 being associated with a ClassB
object. Try
> ClassA objA=(ClassA)db.objectForName("code1") or
> ClassB objB=(ClassB)db.objectForName("name1")
>
> >Ok, Here's my point ,how can i get all name(root
names)
> >or OID from client so i can get all objects of a
class ?
> >(by evaluating using objecForName() method)
> >TIA
>
> It's not required and generally not desirable to have
a root name for each
> object.
>
> Perhaps it might be simpler to have a root name for
each class and then
> store a Map of the objects of the class at that root
with name1, name2, ...
>
> as keys. Then the application would only need to
retain the root names
> associated with the Maps. Retrieving the Map would
give you all the objects
>
> of the class and you could get the individual objects
by name.
>
> Hope this helps,
>
> cheers,
>
> don
>
-----------------------------------------------------
Get your FREE email from Catcha! http://mail.catcha.com